[Pharo-project] printing Scientific notation of float
Hi, Does Pharo have scientific float notation printing? http://en.wikipedia.org/wiki/Scientific_notation I want to control the length of string of a float in my GUI. Thanks HwaJong Oh -- View this message in context: http://forum.world.st/printing-Scientific-notation-of-float-tp3778559p377855... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
If you mean '"%e".' printf: 0.0000000061. --> '"6.1".' There is some support here: http://www.squeaksource.com/Printf.html 2011/8/30 HwaJong Oh <daliot.oh@gmail.com>:
Hi, Does Pharo have scientific float notation printing? http://en.wikipedia.org/wiki/Scientific_notation
I want to control the length of string of a float in my GUI.
Thanks HwaJong Oh
-- View this message in context: http://forum.world.st/printing-Scientific-notation-of-float-tp3778559p377855... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
The package is installed and working. Thanks. -- View this message in context: http://forum.world.st/printing-Scientific-notation-of-float-tp3778559p377900... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
'Here is a float "%e" and an integer "%d".' printf: #(0.000000000001 42). evalutes to 'Here is a float "1.0" and an integer "42".' I think 'Here is a float "1.0e-12" and an integer "42".' is the right answer. -- View this message in context: http://forum.world.st/printing-Scientific-notation-of-float-tp3778559p382008... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (2)
-
Hernán Morales Durand -
HwaJong Oh