Float readFrom:'1e0.5' does not equal 1 * (10 raisedTo:0.5)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
tty
Reply | Threaded
Open this post in threaded view
|

Float readFrom:'1e0.5' does not equal 1 * (10 raisedTo:0.5)

tty
Float readFrom:'1e0.5'   print it ->1.0
1 * (10 raisedTo:0.5) print it -> 3.1622776601683795


What am I missing here?

thank you for your time.



--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
tty
Reply | Threaded
Open this post in threaded view
|

Re: Float readFrom:'1e0.5' does not equal 1 * (10 raisedTo:0.5)

tty
Figured it out. PHP is a crap language.

https://meta.wikimedia.org/wiki/Help:Calculation#Operators,_numbers,_and_constants


*e between subexpressions *10^ * pow (10,..) *


The PHP definition states Powers of 10. I saw the "e" and assumed Floating
Point.


Did I mention PHP sucks?

Thank you for your time.








--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners