Fix a scale setting bug in root()

Signed-off-by: Gavin D. Howard <[email protected]>
This commit is contained in:
Gavin D. Howard 2023-03-13 01:36:13 -06:00
parent b0a366c315
commit da4a533759
Signed by: gavin
GPG Key ID: 93D31C8CA4AB6C63
1 changed files with 4 additions and 1 deletions

View File

@ -126,7 +126,10 @@ define root(x,n){
if(n==2)return sqrt(x)
s=scale
scale=0
if(x<0&&n%2==0)sqrt(x)
if(x<0&&n%2==0){
scale=s
sqrt(x)
}
scale=s+2
m=(x<0)
x=abs(x)