It’s a silly question, but why are you using single precession floating point.

The ONLY times I have used floating point is having to do with extremely large 
numbers or some extremely small number of very fine precision
Used in CAD/CAM

Steve

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Charles Mills
Sent: Monday, March 13, 2017 6:56 PM
To: [email protected]
Subject: Re: C fprintf() format code for 32-bit float?

OK. I just coded a static_cast on @Gil's suggestion. Should not hurt anything; 
actually makes the code a little clearer, except for all the <> and () LOL.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Farley, Peter x23353
Sent: Monday, March 13, 2017 4:32 PM
To: [email protected]
Subject: Re: C fprintf() format code for 32-bit float?

I believe that formatting types e/E, f/F and g/G will all handle float, double 
and long double without casts.

Example CELEBF30 available in the Runtime Library Reference under:

Library Functions
fprintf(), printf() and sprint() - Format and write data

Shows a float printed with g and G specifiers with no cast.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to