Q
Problem solve Get help with specific problems with your technologies, process and projects.

Problems converting a FLOAT8 field

I am trying to convert a FLOAT8 field to a 17 6 packed and the results are showing a reduction of 1/100000th in value. This is causing a tax calculation to be off by pennies. What can I do?

I am trying to convert a FLOAT8 field to a 17 6 packed and the results are showing a reduction of 1/100000th in value. This is causing a tax calculation to be off by pennies. What can I do?
Use half-adjust (i.e. EVAL (H) ) to round the greater precision of the FLOAT field into the lesser precision of the PACKED field.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Visit the ITKnowledge Exchange and get answers to your developing questions fast.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.

Dig Deeper on RPG iSeries programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close