Show HN: libRmath.js – A port of R's Nmath numeric library to JavaScript
I am really suspect of this being actually useful for highly technical work. Why? Because I work with R, and the math that is done has very specific results that fudging floating point numbers may be a concern. I don&#x27;t know enough about Javascript to be certain, but I feel like (from memory) that it does not maintain numeric accuracy at a certain level.<p>I am not the R nerd, my friend with the PhD is, I just do the coding around it and help clean up his brainy coding. (ie, he can code ok, so he creates the initial R code, and I clean it up so I don&#x27;t go mad having to work with it) But he explained that even Excel (which I will bet is more accurate than JS) will put out inaccurate results because of number fudging at some level. (again beyond my nerd level to grok)<p>All of this is too bad, because R syntax is just plain rotten icky stuff. (but I may be seeing things with some of the examples looking like awful R syntax... maybe I need sleep)<p>Edit: Here&#x27;s a comment on JS number accuracy, basically what I recalled. (this is a quick search, so take some salt with it). The issue being how JS decided to &quot;fix&quot; the numbers for me, felt like the magic semi colons, only not as predictable.<p><i>&quot;In JavaScript all numbers are IEEE 754 floating point numbers.[1] Due to the binary nature of their encoding, some decimal numbers cannot be represented with perfect accuracy. This is analagous to how the fraction 1&#x2F;3 cannot be accurately represented with a decimal number with a finite number of digits. Once you hit the limit of your storage you&#x27;ll need to round the last digit up or down.&quot;</i><p>[0] <a href="http:&#x2F;&#x2F;adripofjavascript.com&#x2F;blog&#x2F;drips&#x2F;avoiding-problems-with-decimal-math-in-javascript.html" rel="nofollow">http:&#x2F;&#x2F;adripofjavascript.com&#x2F;blog&#x2F;drips&#x2F;avoiding-problems-wi...</a><p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;IEEE_754" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;IEEE_754</a>