Yes, trunc() to remove all decimals, but the issue (at one point) was that a "100's" digit was being rounded, so that procedure was to remove the 100's digit to avoid it being rounded.
Multiplication can be done in a parallel cascade (with asynchronous logic), division requires feedback of outputs to inputs i.e. algorithmic action (synchronous logic).
Also explains the speed difference.
Convert the float to a string, parse that out till the non-numeric is found and then go one character after that.
1 Like
How about deleting the word ugly?
I think type manipulation to perform such rounding is ugly… sorry..
Aesthetics matters in math and programming
1 Like
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.