NFun icon indicating copy to clipboard operation
NFun copied to clipboard

Replace X**1, x**2, x**3 with x, x*x and x*x*x respectively

Open tmteam opened this issue 4 years ago • 0 comments

Signature of the exponentiation function: **(x:real, y:real):real The signature is as follows, because for integers, negative numbers, it is possible to use a negative degree (which will lead to floating-point numbers), and for unsigned integers, overflow is easily possible.

However, the user expects a record of the type:

y:int = x**2

It will not give errors.

Goal: to allow a record of type y:int = x**2

tmteam avatar Jan 10 '22 17:01 tmteam