You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Ruth Morris <ch...@gmail.com> on 2020/05/01 12:00:13 UTC
Issues with attributes being to long
Hi Nifi Dev,
Within the UpdateAttribute processor, I am using the following to create a new attribute, ${myVar:toDecimal():math(“pow”, 2.5)}, myVar being a number like, -766160892. The value that is returned in the new attribute is not a number but the value ‘NaN’ I would be most grateful if you could advise if there is a solution for this?
Kind regards
Ruth Morris
Re: Issues with attributes being to long
Posted by Mark Bean <ma...@gmail.com>.
This is not an issue with the attribute (or value) being too long. This is
part of the rules of the java Math.pow() function. See the javadoc at [1].
But, the pertinent rule is as follows:
If the first argument is finite and less than zero and if the second
argument is finite and not an integer, then the result is NaN.
[1]
https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#pow-double-double-
-Mark
On Fri, May 1, 2020 at 8:00 AM Ruth Morris <ch...@gmail.com> wrote:
> Hi Nifi Dev,
>
> Within the UpdateAttribute processor, I am using the following to create a
> new attribute, ${myVar:toDecimal():math(“pow”, 2.5)}, myVar being a number
> like, -766160892. The value that is returned in the new attribute is not a
> number but the value ‘NaN’ I would be most grateful if you could advise if
> there is a solution for this?
>
> Kind regards
> Ruth Morris