[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support of log10?

From: Peng Yu
Subject: Re: Support of log10?
Date: Thu, 24 Jun 2021 09:01:47 -0500

> Who said you will always get exactly 3 if you have log10?

Because the number 1000 can be represent in float exactly, and the
answer 3 can be represent in float exactly. Therefore, the correct
result for log10(1000) must be exact 3 in float. Anything that
deviated from it, no matter how small, is not exactly correct.

> And why are exact powers of 10 even interesting enough to justify yet
> another built-in function?

I can ask the same question. Why it is justified not include it. Given
it is trivial to include it?

> After all, if you are only interested in
> exact powers of 10, you don't need a math function at all, you simply
> count the zero digits in the string representation of the number.

No. 1000 is just an example that has an exact result in float. There
can be other examples that has exact answers in float.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]