in reply to Why is this comparison failing?
then you'll see the following two outputs for the supposedly identical 0.3 cases:warn sprintf "scale: %.40f\nscaled_index: %.40f\n" . "index: %.40f\nadjusted_hue: %.40f\n\n", $scale, $scaled_index, $index, $adjusted_hue;
adjusted_hue (75) equals 75 scale: 0.2999999999999999888977697537484345957637 scaled_index: 3.0000000000000000000000000000000000000000 index: 3.0000000000000000000000000000000000000000 adjusted_hue: 75.0000000000000000000000000000000000000000 adjusted_hue (75) does not equal 75 scale: 0.3000000000000000444089209850062616169453 scaled_index: 3.0000000000000004440892098500626161694527 index: 3.0000000000000000000000000000000000000000 adjusted_hue: 75.0000000000000142108547152020037174224854
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why is this comparison failing?
by johnrcomeau (Novice) on Oct 08, 2015 at 22:21 UTC | |
by mr_ron (Deacon) on Oct 09, 2015 at 01:18 UTC | |
by dave_the_m (Monsignor) on Oct 09, 2015 at 08:45 UTC |