# what happened to square_root() for rationals?

I have some old code that takes the square_root() of rational numbers. This function seems to be long gone. How do I replace its functionality?

what happened to square_root() for rationals?

**
asked 2013-02-11 15:21:08 +0200 **

Anonymous

I have some old code that takes the square_root() of rational numbers. This function seems to be long gone. How do I replace its functionality?

add a comment

1

Or are you thinking of `sqrt_approx` - deprecated since http://trac.sagemath.org/sage_trac/ticket/4611 ?

0

I found online an old (ver 1.4.1) sage manual that says that square_root() for rationals: "Return the positive rational square root of self, or raises a ValueError if self is not a perfect square."

So with this information is easy enough to code up a simple function to replace it.

I do wonder why it went away and or if it has been renamed or replaced somehow.

2

Please start posting anonymously - your entry will be published after you log in or create a new account.

Asked: ** 2013-02-11 15:21:08 +0200 **

Seen: **132 times**

Last updated: **Feb 13 '13**

Is there a way to set arbitrary function commuting rules?

Preload defined functions for later use

Use the properties of inverse functions to find the exact value of the expression

Is there any way to define an as-yet-unknown function?

plotting multiple functions from a for loop

what type of object is a function defined with the piecewise command?

How to plot many functions on the same graph

Generating functions and plotting them with different colors

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.