0

Hi I am using the EXP() command in DB2 on a column of type float as so

select distinct 1 - power(0.9144,exp(beta - 0.1)) from mytable

where this all works fine until I introduce the exp() around (beta - 0.1). beta is a float and ranges between 3018.878989897931 and 12289.951602012534.

the error I am getting is

Arithmetic overflow or other arithmetic exception occurred.. SQLCODE=-802,SQLSTATE=22003,DRIVER=3.64.106

what could be the issue here?

1 Answer 1

1

Obviously, the issue here is your exceeding the maximum range representable by a 64-bit floating point number format, which is about +1.79769E+308.

If you do need to work with larger numbers, consider performing calculations in DECFLOAT(34) instead (if your DB2 version supports this data type).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.