Nuprl Definition : near-root

near-root(k;p;q;n) ==
  if q=1
     then if n=1
             then eval c = 2^k - 1 in
                  eval a = p * 2 * c in
                  eval d = (2 * c) - 1 in
                  eval M = iroot(k;|a| + d) + 1 in
                  eval y = ((k * 2 * M^k - 1) ÷ d) + 1 in
                  eval x = iroot(k;(|a| + d) * y^k) ÷ 2 in
                    <if (p) < (0)  then -x  else x, y>
             else eval b = q * n in
                  eval c = b^k - 1 in
                  eval a = p * n * c in
                  eval d = c - 1 in
                  eval M = iroot(k;|a| + d) + 1 in
                  eval y = ((k * b * M^k - 1) ÷ d) + 1 in
                  eval x = iroot(k;(|a| + d) * y^k) ÷ b in
                    <if (p) < (0)  then -x  else x, y>
     else eval b = q * n in
          eval c = b^k - 1 in
          eval a = p * n * c in
          eval d = c - 1 in
          eval M = iroot(k;|a| + d) + 1 in
          eval y = ((k * b * M^k - 1) ÷ d) + 1 in
          eval x = iroot(k;(|a| + d) * y^k) ÷ b in
            <if (p) < (0)  then -x  else x, y>



Definitions occuring in Statement :  absval: |i|,  callbyvalue: callbyvalue,  less: if (a) < (b)  then c  else d,  int_eq: if a=b  then c  else d,  pair: <a, b>,  divide: n ÷ m,  multiply: n * m,  subtract: n - m,  add: n + m,  minus: -n,  natural_number: $n,  iroot: iroot(n;x),  fastexp: i^n
Definitions occuring in definition :  absval: |i|,  add: n + m,  iroot: iroot(n;x),  callbyvalue: callbyvalue,  natural_number: $n,  subtract: n - m,  multiply: n * m,  fastexp: i^n,  minus: -n,  less: if (a) < (b)  then c  else d,  pair: <a, b>,  divide: n ÷ m,  int_eq: if a=b  then c  else d
FDL editor aliases :  near-root

Latex:
near-root(k;p;q;n)  ==
    if  q=1
          then  if  n=1
                          then  eval  c  =  2\^{}k  -  1  in
                                    eval  a  =  p  *  2  *  c  in
                                    eval  d  =  (2  *  c)  -  1  in
                                    eval  M  =  iroot(k;|a|  +  d)  +  1  in
                                    eval  y  =  ((k  *  2  *  M\^{}k  -  1)  \mdiv{}  d)  +  1  in
                                    eval  x  =  iroot(k;(|a|  +  d)  *  y\^{}k)  \mdiv{}  2  in
                                        <if  (p)  <  (0)    then  -x    else  x,  y>
                          else  eval  b  =  q  *  n  in
                                    eval  c  =  b\^{}k  -  1  in
                                    eval  a  =  p  *  n  *  c  in
                                    eval  d  =  c  -  1  in
                                    eval  M  =  iroot(k;|a|  +  d)  +  1  in
                                    eval  y  =  ((k  *  b  *  M\^{}k  -  1)  \mdiv{}  d)  +  1  in
                                    eval  x  =  iroot(k;(|a|  +  d)  *  y\^{}k)  \mdiv{}  b  in
                                        <if  (p)  <  (0)    then  -x    else  x,  y>
          else  eval  b  =  q  *  n  in
                    eval  c  =  b\^{}k  -  1  in
                    eval  a  =  p  *  n  *  c  in
                    eval  d  =  c  -  1  in
                    eval  M  =  iroot(k;|a|  +  d)  +  1  in
                    eval  y  =  ((k  *  b  *  M\^{}k  -  1)  \mdiv{}  d)  +  1  in
                    eval  x  =  iroot(k;(|a|  +  d)  *  y\^{}k)  \mdiv{}  b  in
                        <if  (p)  <  (0)    then  -x    else  x,  y>



Date html generated: 2016_05_18-AM-09_31_39
Last ObjectModification: 2015_09_23-AM-09_11_31

Theory : reals


Home Index