Re: Converting integer + mantissa to float

[email protected] ("Jay Savage")
Newsgroups perl.beginners
Message-ID <[email protected]>
On Fri, Jun 13, 2008 at 1:19 PM, Rob Dixon <[email protected]> wrote:
> Jay Savage wrote:
>>
>> You're right, the mantissa may have leading zeros. Good catch. I need
>> to keep them, though, or any later math will be off by multiple powers
>> of ten. I'd completely missed that on the first go-around, but what I
>> really need is
>>
>> $x = sprinf "%u.%s", $int, $mantissa;
>
> I think what you you really need is
>
>  $x = sprintf "%s.%s", $int, $mantissa;
>
> or really
>
>  $x = "$int.$mantissa";
>
> Get over it :)
>
> Rob
>

So it seems.

Thanks again!

--j
--------------------------------------------------
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com http://www.downloadsquad.com http://www.engatiki.org

values of β will give rise to dom!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.