error message RNX9001

pts.
Tags:
Programming Languages
RPG
I have a RPGILE which input X and Y and return Z as (X to the power of Y) eg X = 2 and Y = 2 then Z = 4 I define X, Y and Z as 30P9 However when I can this function with parmeter X= 10 and Y = 10 Error occur like this : Can anyone tell me how to fix it or why error come out ? Many thanks ILE RPG/400 FORMATTED DUMP Program Status Area: Procedure Name . . . . . . . . . . . . : GETPOWERVL Program Name . . . . . . . . . . . . . : GETPOWERVL Library . . . . . . . . . . . . . . : PFTSTLIB Module Name. . . . . . . . . . . . . . : GETPOWERVL Program Status . . . . . . . . . . . . : 00202 The call to ended in error (C G D F). Previous Status . . . . . . . . . . . : 00000 Statement in Error . . . . . . . . . . : 00006400 RPG Routine . . . . . . . . . . . . . : GETPOWER Number of Parameters . . . . . . . . . : Message Type . . . . . . . . . . . . . : MCH Additional Message Info . . . . . . . : 1212 Message Data . . . . . . . . . . . . . : Invalid floating point format change detected

Answer Wiki

Thanks. We'll let you know when a new response is added.

30p9 ** 30p9 has a result in 60p18, that does not exists.

try rounding the result
eval(h) z = x ** y; or
eval z = %decimal(x ** y : 30 : 9);

or try to adjust variables (less decimals)

or eval the result in a double float, such as explained in the “Precision of Intermediate Results” chapter of ILE rpg reference SC09-2508-04 page 429 (pdf page number 447)

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following