Floating point error when obtaining the result of two high negative numbers in SQL Server

1

I want to perform the following operation

SELECT POWER(-0.616666,-1.6441441441441)

but it returns the following error

Msg 3623, Level 16, State 1, Line 3
An invalid floating point operation occurred.

I already tried to cast both numbers and convert, but I still get the same error, there is a way to carry out this function, but being floating type numbers, that are not int

greetings

UPDATE

I want to make this line in my Store Procedure

select POWER((@TEMP_FX_TASAS_DXVENCER/360.00),(365.00/@TEMP_FX_TASAS_DXVENCER)) AS POW

but I got the error mentioned above, how can I take this operation ?, In both variables sometimes I get a negative number, greetings

    
asked by Abraham Araujo Moreno 05.03.2018 в 20:42
source

1 answer

3

the problem is actually mathematical, that result would give a complex number but have no representation in SQL. You should ask if it makes sense in the domain of your application that @TEMP_FX_TASAS_DXVENCER can be negative.

    
answered by 07.03.2018 в 21:56