20 karma · joined Mar 27, 2015 (11y ago) · 9 submissions
comment 7mo ago · link · parent
The longer answer is that Waputer has a package system that Nako will soon take advantage of. NakoIDE itself is just a package that gets loaded when you go to the URL. The APIs for creating packages and allowing others to run them already exist; I have not had time to document them or integrate them directly into Nako. Users will be able to directly publish to URLs of the form "waputer.app/@user/package", while main applications like Nako exist just as "waputer.app/package". I will have a blog post that digs into the details of packages and publishing in a few weeks.
I also want to emphasize that I do not require everything end up on Waputer. The compiler that is running inside NakoIDE generates WASM files by default, but it can output x86_64 object files. I love interoperability.
2.
Show HN: Waputer – The WebAssembly Computer(waputer.app ↗)
7 points · by marcandrysco · 7mo ago · 2 comments
comment 8y ago · link · parent
There is very exciting news coming up with printing floating point. Ulf Adams from Google will be presenting a new algorithm called Ryu that appears to be super fast, simple, and perfectly accurate. Assuming the claims are correct, Ryu ought displace all of the current algorithms.
comment 10y ago · link · parent
If you are willing to print numbers that are correct but possibly suboptimal, you can also use Errol2 and modify it to remove checking. This will give you the speed of Errol3 without having a lookup table. I might look at making such an implementation and maybe call it Errol2b.
[math for calculating approximate error rate] With an input floating-point format with p bits of precision and an intermediate format with q-bits of precision: the "chance" of value failing is close to 1 in 2^(q-p). With 2^p values per exponent, you're going to see about 2^(2p-q) errors per exponent. In the case if Grisu, q is 64 and p is 53, for a total of about 2^42 errors. These numbers only give rough estimates, you'd have to verify them manually.
comment 10y ago · link · parent
I will have to look at this further. It might mean generating lookup table for every rounding mode and using their union. In general, changing the global state of the FPU seems to be a risky proposition.
comment 10y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
So, how can we make sure that such numbers are converted correctly? The answer from Steel & White's paper is to perform arbitrary integer arithmetic and leave nothing up to chance. The Grisu3 algorithm by Loitsch showed that 64-bits correct converts about 99.5% of numbers. As you increase the amount of precision, you can improve your accuracy, but there is no guarantee that even 128-bits or 256-bits is enough to correctly convert all numbers.
Instead of trying to be 100% correct, our algorithm sidesteps the issue entirely by enumerating all failures a priori.