question

Upvotes
Accepted
3 0 0 1

+/- Infinity and NAN - how to use them?

Since I have not found anything in the docs...

I'm using OMMNumeric#toBigDecimal() to read the values. Do I have to do anything regarding the new values or does that method already handle it? And if not what should I do?

treprfarfa-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
20.3k 73 10 20

Hi @reidemei

According to the Java documentation BigDecimal does not support NaN or infinite numbers.

So, if you do try to convert a OMMNumeric which contains a NaN or infinite number I would expect that an exception would be thrown.

If you are concerned about the above scenario, then you can check the Hint value with getHint() to check if the OMMNumeric contains NaN or Infinite value before attempting to convert to BigDecimal

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 0 0 1

Ok, thanks.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea