News for hackers. Stuff that matters.
Re:The most surprising Unix programs by ur-whale on Sunday March 15, 2020 @06:27AM (#22582604)
The fact that dc does (or at least tries to) guarantee error bounds on the result is news to me.

And if that does indeed work, that's pretty cool.

Re:The most surprising Unix programs by bloomer on Sunday March 15, 2020 @12:37PM (#22584386)
The default Android calculator app by Hans Boehm (developer of the Boehm Garbage Collector as well) does this by using the computable real numbers.

https://dl.acm.org/doi/10.1145/2911981

Provides a good overview of how it works and perms website has more information.

What’s cool about the computable reals implementation is you can increase the precision after the fact and it will recalculate up to that precision. Basically it memoizes the steps of the calculation and how they affect the precision.

Re:The most surprising Unix programs by nn3 on Sunday March 15, 2020 @09:54AM (#22583485)
I doubt the modern GNU or BSD versions of it that you are likely using do. Noone uses the original anymore.
Re:The most surprising Unix programs by swixmix on Sunday March 15, 2020 @11:51AM (#22584083)
Is scale factor the same as error bounds in http://man.openbsd.org/dc ?
Re:The most surprising Unix programs by nn3 on Sunday March 15, 2020 @12:03PM (#22584148)
I believe it's just the number of digits when the printing cuts off