D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Maths! not my strong point



mike wrote:
> OK,
>
> Do I have a bit code that has taken me ages to get right.
> In perl...
>
> What I need to do is take 51.1234 and turn in back into a binary  string.
>
> (This is actually taking 4 hex values that are a float and turning them
> into a value, so the hex values is actually 844C7E5C which = 51.1234,
> need to go the other way, 51.1234 -> 844C7E5C)

Why re-invent the wheel? Use CPAN.

http://search.cpan.org/~smueller/Bundle-Math-Base-1.00/Base.pm

Why do it yourself when the code is tested and proven and a simple:
use Bundle::Math
away.

:-)

TIMTOWTDI


--


Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/

http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3

Attachment: signature.asc
Description: OpenPGP digital signature


Lynx friendly