On Sat, Jun 6, 2015 at 7:44 PM, Max abonnements@revolwear.com wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I'm trying to get [pow 2] from -0.019022952498528478. because it is negative, [pow 2] will just return 0 unfortunately. IOhannes suggested in a thread from 2013 to use [expr pow($f1, 2)] instead. This returns 0.000361872
however, in Python and my on-screen pocket calculator I get
- -0.019022952498528478**2
- -0.0003618727217612709
so apart from the 32 bit float, shouldn't the result be negative?
As far as the math is concerned, when you multiply two negative numbers, you get a positive, right? why expect a negative then? Maybe I'm missing something obvious here, dunno...