Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Para.

Asked: March 29, 2017 - 1:27 am UTC

Last updated: March 29, 2017 - 1:40 am UTC

Version: 12.1.0.2

Viewed 1000+ times

You Asked

When I run the new Oracle 12c approximate square root function on a negative number, I keep getting the same answer. What's going on?
SQL> select approximate_sqrt(-1) from dual;

   APPROXIMATE_SQRT(-1)
----------------------
                    42

SQL> select approximate_sqrt(-2) from dual;

   APPROXIMATE_SQRT(-2)
----------------------
                    42

and Connor said...

I hope you're pulling my leg

https://en.wiktionary.org/wiki/pull_someone%27s_leg

otherwise I think one of your co-workers is pulling yours :-)




Is this answer out of date? If it is, please let us know via a Comment