Avoiding in underflow in double -> real conversions - Mailing list pgsql-general

From David Wilson
Subject Avoiding in underflow in double -> real conversions
Date
Msg-id AANLkTimAyMgvd-QGYg1mD3dk5qA+WsNGLdbyxwkyZits@mail.gmail.com
Whole thread Raw
List pgsql-general
List-

I've got a calculation that, due to its use of exp(), is produces double precision intermediate results which I ultimately need to cast back to real to store in a table column. However, with certain inputs, this results in an underflow error. Is there any way outside of an exception-trapping plpgsql function to performance the conversion and simply cause underflows to result in a 0?

Thanks for any ideas.

--
- David T. Wilson
david.t.wilson@gmail.com

pgsql-general by date:

Previous
From: Leif Biberg Kristensen
Date:
Subject: Re: Front End Application (OFF-TOPIC)
Next
From: Lincoln Yeoh
Date:
Subject: Re: Trade Study on Oracle vs. PostgreSQL