[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Support of log10?
From: |
Peng Yu |
Subject: |
Support of log10? |
Date: |
Wed, 23 Jun 2021 17:03:44 -0500 |
$ seq 3 | awk -v 'OFS=\t' -v OFMT=%.20g -e 'function log10(x) { return
log(x)/log(10); } { print "log10(" 10^$1 ")", log10(10^$1) }'
log10(10) 1
log10(100) 2
log10(1000) 2.9999999999999995559
I don't find a native support of log10(). But if I implement log10
with log, I got the above problem. The result of log10(1000) should be
exact 3. But it is not.
Is it worthwhile to consider the support of log10 in gawk?
--
Regards,
Peng
- Support of log10?,
Peng Yu <=
- Re: Support of log10?, Neil R. Ormos, 2021/06/23
- Re: Support of log10?, Peng Yu, 2021/06/23
- Re: Support of log10?, Eli Zaretskii, 2021/06/24
- Re: Support of log10?, Peng Yu, 2021/06/24
- Re: Support of log10?, Ed Morton, 2021/06/24
- Re: Support of log10?, Eli Zaretskii, 2021/06/24
- Re: Support of log10?, Peng Yu, 2021/06/24
Re: Support of log10?, Nelson H. F. Beebe, 2021/06/23
Re: Support of log10?, arnold, 2021/06/24