JS rounding: "...the implementation in the spec does not correctly implement the spec." http://ridiculousfish.com/blog/posts/JavaScript-Rounding.html …
-
Show this thread
-
@rygorous@FioraAeterna how would you wizards write a +inf biased round in C?2 replies 0 retweets 1 likeShow this thread -
[untested] provisional = floor(x) fraction = x - provisional return copysign(provisional + (fraction >= 0.5), x)
7 replies 0 retweets 1 like -
Replying to @stephentyrone @ridiculous_fish and
See the musl version of round(), which is a combination of bit-fiddling and a similar technique to what you have: https://git.musl-libc.org/cgit/musl/tree/src/math/round.c#n10 …
1 reply 0 retweets 1 like -
Replying to @pcwalton @stephentyrone and
BTW cgit doesn't do it for you, but appending ?id=v1.1.19 (or whatever current ver at the time is) before any # will ensure the link doesn't rot if/when changes are made.
1 reply 0 retweets 1 like
I wish cgit had somewhere to click for "permalink" that would automatically resolve to most-recent-tag if file was unchanged since then, otherwise to full sha1.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.