[comp.sources.wanted] Radix Conversion Algorithm

simnet@ssc-vax.UUCP (Mark R Poulson) (06/09/87)

An Algorithm is needed that converts the ASCII string representation of a 
decimal floating point number to binary floating point representation.  
The conversion must be done with integer calculations only.  There is no 
floating point processor available.  

EXAMPLE:
    Given the ascii representation of a decimal floating point
    number.        2.57e6

    This can be converted to decimal integer variables.
	whole      2
	fraction -  numerator  57
		    denominator  100 
	exponent   6
	
    An algorithm is needed to convert these variables to the binary form.
		 fraction
		 exponent

The results are placed in IEEE double precision floating point format.  This 
will be written in C, on the Intel 80286.

The opposite conversion is also needed.  The IEEE double precision
floating point format is converted to ASCII string representation of a
decimal floating point number.

Public domain listing for sscanf in C, could have the solution.  If 
available, please send.

Send responses to ...!uw-beaver!ssc-vax!ssc-bee!simnet

brianc@cognos.uucp (Brian Campbell) (06/23/87)

In article <836@ssc-bee.ssc-vax.UUCP> simnet@ssc-vax.UUCP (Mark R Poulson) writes:
! An Algorithm is needed that converts the ASCII string representation of a 
! decimal floating point number to binary floating point representation.  
! The conversion must be done with integer calculations only.  There is no 
! floating point processor available.  
!    ...
! Send responses to ...!uw-beaver!ssc-vax!ssc-bee!simnet


  Please post any results.  I tried sending mail, but it seems I can't get
there from here.
-- 

Brian Campbell          decvax!utzoo!dciem!nrcaer!cognos!brianc
Cognos Incorporated     3755 Riverside Drive, Ottawa, Ontario, CANADA  K1G 3N3
                        (613) 738-1440