I wish the node Math Formula could produce Long values. Now, it produces Double values or Integer values when the corresponding option is checked. It is necessary to employ additional Double to Int node to convert Math Formula’s output to Long.
Please keep in mind working this out by using Math Formula’s option Convert to Int would produce wrong output facing values out of the range of integer.