News for hackers. Stuff that matters.
Re:AssemblyScript: A variant of TypeScript targeting WebAsse... by 29athrowaway on Saturday December 19, 2020 @01:00PM (#25479483)
A function that calculates Fibonacci is used as an example. Just a reminder that if you want to calculate the nth Fibonacci number you can use Binet's formula.

https://mathworld.wolfram.com/BinetsFibonacciNumberFormula.h...

Re:AssemblyScript: A variant of TypeScript targeting WebAsse... by frongpik on Saturday December 19, 2020 @04:52PM (#25481564)
The caveat is that computing this formula with enough precision to get the correct result needs as many steps as the recursive algorithm.
Re:AssemblyScript: A variant of TypeScript targeting WebAsse... by aitchnyu on Saturday December 19, 2020 @02:13PM (#25480222)
If I implement this with floating point numbers, will I get the correct integer value?
Re:AssemblyScript: A variant of TypeScript targeting WebAsse... by user-the-name on Saturday December 19, 2020 @08:01PM (#25482901)
In general, no.