New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

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 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
25.4k 90 13 26

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 512.0 KiB each and 1.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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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