Mega Search
23.2 Million


Sign Up

Make a donation  
Converting IBM floating point to IEEE (delphi) [Edit]  
News Group: embarcadero.public.delphi.language.delphi.general

Is there a function to convert IBM mainframe double precision floating point to a format compatible with Delphi.  I also need the reverse function to move a delphi double to IBM floating point.

Alain

Edited by: Alain Forget on Jan 9, 2015 7:47 AM

Edited by: Alain Forget on Jan 9, 2015 8:01 AM

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 9-Jan-2015, at 8:02 AM EST
From: Alain Forget
 
Re: Converting IBM floating point to IEEE (delphi)  
News Group: embarcadero.public.delphi.language.delphi.general
> {quote:title=serg kas wrote:}{quote}
> > {quote:title=Alain Forget wrote:}{quote}
> > Is there a function to convert IBM mainframe double precision floating point to a format compatible with Delphi.  I also need the reverse function to move a delphi double to IBM floating point.
> > 
> 
> Easy to write if you have the format spec. I remember IBM Fortran double precision had same exp size as single precision and +32 bits of mantissa, but I maybe wrong.

Yeah, that's what I read on wikipedia: http://en.wikipedia.org/wiki/IBM_Floating_Point_Architecture


I found some code in C++ that converts IEEE574 (Delphi) to IBM floating point but I was wondering if there was any functions that already exist on Delphi.

Alain

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 12-Jan-2015, at 6:44 AM EST
From: Alain Forget
 
Re: Converting IBM floating point to IEEE (delphi)  
News Group: embarcadero.public.delphi.language.delphi.general
> {quote:title=Alain Forget wrote:}{quote}
> Is there a function to convert IBM mainframe double precision floating point to a format compatible with Delphi.  I also need the reverse function to move a delphi double to IBM floating point.
> 

Easy to write if you have the format spec. I remember IBM Fortran double precision had same exp size as single precision and +32 bits of mantissa, but I maybe wrong.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 12-Jan-2015, at 2:41 AM EST
From: serg kas