Question: I Have defined an input field like below:

```html
    <label>Enter more months</label>
    <input #mname type='text' id="mname" >
    <button (click)="addMonth(mname.value)" style="height: 30px;"></button>

```

on clicking on the button I want the value of the input field to be printed on the console ,for which i am defining a function as below:

```js
    addMonth(mname){
        console.log(mname.value);
    }

```

But I am not able to pass the value of the field. How can I do so?

Answer: 
I don't have an explanation of why your cube root call to `POWER` is not working. However, given that the input is a negative number (`-8`), the output should be equivalent to the negative of the cube root of the positive input:

```
SELECT -1.0*POWER(8.000, 1.000 / 3) AS output;

```

This outputs `-2.000` as expected. You could even write more general logic to workaround this problem:

```
SELECT
    CASE WHEN input > 0 THEN POWER(input, 1.000 / 3)
         ELSE -1.0*POWER(-1.0*input, 1.000 / 3) END AS output
FROM yourTable;

```
The reason your calculation doesn't work is because:

```
(-8)^(1/3)              --> an integer, -2
(-8)^(0.33333333333333) --> a complex number

```

That is, floating point values are inexact and cannot represent something like one-third. And the value has to be *exactly* 1/3 in order for the value to be a floating point number.

If you know the value is representable as a floating point value, then you can use:

```
sign(-8) * power(abs(-8), 1.0 / 3)

```

Note: This does not work for all cases. Trivially:

```
sign(-4) * power(abs(-4), 1.0 / 2)

```

will return -2, which is not the correct answer.