Float to string conversion

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

Float to string conversion

Bob.Cowdery
With the worry of crashes behind me its back to fixing some bugs. Is
there a float to string conversion somewhere. I was using asString until
I realized that as the number got small it converted it in exponent
form. Using Selector Browser seems to confirm that there is no
conversion for anything less than 0.0001.

Thanks
Bob
*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else.  In such case, you should destroy this
message and are asked to notify the sender by reply email.

Reply | Threaded
Open this post in threaded view
|

Re: Float to string conversion

Chris Muller-2
There's to ByteArray and back:

  Float fromIEEE32Bit: 7.4 asIEEE32BitWord



--- "Cowdery, Bob [UK]" <[hidden email]> wrote:

> With the worry of crashes behind me its back to fixing some bugs. Is
> there a float to string conversion somewhere. I was using asString
> until
> I realized that as the number got small it converted it in exponent
> form. Using Selector Browser seems to confirm that there is no
> conversion for anything less than 0.0001.
>
> Thanks
> Bob
> *** Confidentiality Notice *** Proprietary/Confidential
> Information belonging to CGI Group Inc. and its affiliates
> may be contained in this message. If you are not a recipient
> indicated or intended in this message (or responsible for
> delivery of this message to such person), or you think for
> any reason that this message may have been addressed to you
> in error, you may not use or copy or deliver this message
> to anyone else.  In such case, you should destroy this
> message and are asked to notify the sender by reply email.
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Float to string conversion

Nicolas Cellier-3
If you plan using denormalized numbers like 1.0e-316 (gradual underflow),

you'd better check patch at http://bugs.impara.de/view.php?id=3133 
before processing with

fromIEEE32Bit: and asIEEE32BitWord
 

Nicolas


Chris Muller a écrit :

> There's to ByteArray and back:
>
>   Float fromIEEE32Bit: 7.4 asIEEE32BitWord
>
>
> --- "Cowdery, Bob [UK]" <[hidden email]> wrote:
>
>  
>> With the worry of crashes behind me its back to fixing some bugs. Is
>> there a float to string conversion somewhere. I was using asString
>> until
>> I realized that as the number got small it converted it in exponent
>> form. Using Selector Browser seems to confirm that there is no
>> conversion for anything less than 0.0001.
>>
>> Thanks
>> Bob
>> *** Confidentiality Notice *** Proprietary/Confidential
>> Information belonging to CGI Group Inc. and its affiliates
>> may be contained in this message. If you are not a recipient
>> indicated or intended in this message (or responsible for
>> delivery of this message to such person), or you think for
>> any reason that this message may have been addressed to you
>> in error, you may not use or copy or deliver this message
>> to anyone else.  In such case, you should destroy this
>> message and are asked to notify the sender by reply email.
>>
>>
>>