Smalltalk
›
Pharo
›
Pharo Smalltalk Developers
Search
everywhere
only in this topic
Advanced Search
printing Scientific notation of float
‹
Previous Topic
Next Topic
›
Classic
List
Threaded
♦
♦
Locked
4 messages
HwaJong Oh
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
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
hernanmd
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: printing Scientific notation of float
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 <
[hidden email]
>:
> 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-tp3778559p3778559.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>
HwaJong Oh
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: printing Scientific notation of float
The package is installed and working.
Thanks.
HwaJong Oh
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
bug report
In reply to
this post
by hernanmd
'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.
Free forum by Nabble
Edit this page