How to round up the light year #131
Answered
by
PaddiM8
sergeevabc
asked this question in
Q&A
-
Dear fellows, Right now there is $ kalker 9460730472581
9 460 730 472 581 ≈ 9.4607304726×10^12 What I'm looking for is |
Beta Was this translation helpful? Give feedback.
Answered by
PaddiM8
Jan 19, 2024
Replies: 1 comment 10 replies
-
|
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah well for integers it would be
truncate(x, n) = floor(x / 10^(floor(log(x)) - n)) * 10^floor(log(x) - n)
I think. A bit more complicated, but10^(floor(log(x)) - n)
could be its own function to make it more readable.