in reply to Re^2: number comparison with a twist
in thread number comparison with a twist
I am not so sure about that.
print "1989.9999999999998" + 0 ; # 1990The 'target form' is decimal string.
From perlnumber Target form: If the source number can be represented in the target form, that representation is used.
Also: When a numeric value is passed as an argument to such an operator, it will be converted to the format understood by the operator.. My assumption is that this counts for + - / * etc applied to the decimal string and eventually also for eq.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: number comparison with a twist
by LanX (Saint) on Mar 02, 2020 at 17:15 UTC | |
by Veltro (Hermit) on Mar 02, 2020 at 18:16 UTC | |
by LanX (Saint) on Mar 02, 2020 at 18:22 UTC | |
by Veltro (Hermit) on Mar 02, 2020 at 21:18 UTC | |
by LanX (Saint) on Mar 03, 2020 at 00:55 UTC |