
(FPCore (x y) :precision binary64 (* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))
double code(double x, double y) {
return (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (3.0d0 * sqrt(x)) * ((y + (1.0d0 / (x * 9.0d0))) - 1.0d0)
end function
public static double code(double x, double y) {
return (3.0 * Math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
def code(x, y): return (3.0 * math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0)
function code(x, y) return Float64(Float64(3.0 * sqrt(x)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) - 1.0)) end
function tmp = code(x, y) tmp = (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0); end
code[x_, y_] := N[(N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))
double code(double x, double y) {
return (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (3.0d0 * sqrt(x)) * ((y + (1.0d0 / (x * 9.0d0))) - 1.0d0)
end function
public static double code(double x, double y) {
return (3.0 * Math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
def code(x, y): return (3.0 * math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0)
function code(x, y) return Float64(Float64(3.0 * sqrt(x)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) - 1.0)) end
function tmp = code(x, y) tmp = (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0); end
code[x_, y_] := N[(N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
\end{array}
(FPCore (x y) :precision binary64 (* (pow (/ 0.1111111111111111 x) -0.5) (+ (/ 0.1111111111111111 x) (+ y -1.0))))
double code(double x, double y) {
return pow((0.1111111111111111 / x), -0.5) * ((0.1111111111111111 / x) + (y + -1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((0.1111111111111111d0 / x) ** (-0.5d0)) * ((0.1111111111111111d0 / x) + (y + (-1.0d0)))
end function
public static double code(double x, double y) {
return Math.pow((0.1111111111111111 / x), -0.5) * ((0.1111111111111111 / x) + (y + -1.0));
}
def code(x, y): return math.pow((0.1111111111111111 / x), -0.5) * ((0.1111111111111111 / x) + (y + -1.0))
function code(x, y) return Float64((Float64(0.1111111111111111 / x) ^ -0.5) * Float64(Float64(0.1111111111111111 / x) + Float64(y + -1.0))) end
function tmp = code(x, y) tmp = ((0.1111111111111111 / x) ^ -0.5) * ((0.1111111111111111 / x) + (y + -1.0)); end
code[x_, y_] := N[(N[Power[N[(0.1111111111111111 / x), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(0.1111111111111111 / x), $MachinePrecision] + N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(\frac{0.1111111111111111}{x}\right)}^{-0.5} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)
\end{array}
Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
metadata-eval99.5%
div-inv99.5%
clear-num99.5%
Applied egg-rr99.5%
inv-pow99.5%
sqrt-pow199.6%
metadata-eval99.6%
Applied egg-rr99.6%
(FPCore (x y)
:precision binary64
(if (<= y -1.45e+49)
(* y (sqrt (/ x 0.1111111111111111)))
(if (<= y 24000000.0)
(* (sqrt (* x 9.0)) (+ (/ 0.1111111111111111 x) -1.0))
(* (pow (/ 0.1111111111111111 x) -0.5) (+ y -1.0)))))
double code(double x, double y) {
double tmp;
if (y <= -1.45e+49) {
tmp = y * sqrt((x / 0.1111111111111111));
} else if (y <= 24000000.0) {
tmp = sqrt((x * 9.0)) * ((0.1111111111111111 / x) + -1.0);
} else {
tmp = pow((0.1111111111111111 / x), -0.5) * (y + -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.45d+49)) then
tmp = y * sqrt((x / 0.1111111111111111d0))
else if (y <= 24000000.0d0) then
tmp = sqrt((x * 9.0d0)) * ((0.1111111111111111d0 / x) + (-1.0d0))
else
tmp = ((0.1111111111111111d0 / x) ** (-0.5d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.45e+49) {
tmp = y * Math.sqrt((x / 0.1111111111111111));
} else if (y <= 24000000.0) {
tmp = Math.sqrt((x * 9.0)) * ((0.1111111111111111 / x) + -1.0);
} else {
tmp = Math.pow((0.1111111111111111 / x), -0.5) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.45e+49: tmp = y * math.sqrt((x / 0.1111111111111111)) elif y <= 24000000.0: tmp = math.sqrt((x * 9.0)) * ((0.1111111111111111 / x) + -1.0) else: tmp = math.pow((0.1111111111111111 / x), -0.5) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.45e+49) tmp = Float64(y * sqrt(Float64(x / 0.1111111111111111))); elseif (y <= 24000000.0) tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(Float64(0.1111111111111111 / x) + -1.0)); else tmp = Float64((Float64(0.1111111111111111 / x) ^ -0.5) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.45e+49) tmp = y * sqrt((x / 0.1111111111111111)); elseif (y <= 24000000.0) tmp = sqrt((x * 9.0)) * ((0.1111111111111111 / x) + -1.0); else tmp = ((0.1111111111111111 / x) ^ -0.5) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.45e+49], N[(y * N[Sqrt[N[(x / 0.1111111111111111), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 24000000.0], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(N[(0.1111111111111111 / x), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(0.1111111111111111 / x), $MachinePrecision], -0.5], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+49}:\\
\;\;\;\;y \cdot \sqrt{\frac{x}{0.1111111111111111}}\\
\mathbf{elif}\;y \leq 24000000:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{0.1111111111111111}{x}\right)}^{-0.5} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if y < -1.45e49Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
metadata-eval99.6%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 86.7%
if -1.45e49 < y < 2.4e7Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in y around 0 95.5%
sub-neg95.5%
associate-*r/95.5%
metadata-eval95.5%
metadata-eval95.5%
+-commutative95.5%
Simplified95.5%
if 2.4e7 < y Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
metadata-eval99.5%
div-inv99.4%
clear-num99.6%
Applied egg-rr99.6%
inv-pow99.6%
sqrt-pow199.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 75.8%
Final simplification88.8%
(FPCore (x y)
:precision binary64
(if (<= y -1.1e+47)
(* y (sqrt (/ x 0.1111111111111111)))
(if (<= y 12500000.0)
(* (sqrt x) (- -3.0 (/ -0.3333333333333333 x)))
(* (pow (/ 0.1111111111111111 x) -0.5) (+ y -1.0)))))
double code(double x, double y) {
double tmp;
if (y <= -1.1e+47) {
tmp = y * sqrt((x / 0.1111111111111111));
} else if (y <= 12500000.0) {
tmp = sqrt(x) * (-3.0 - (-0.3333333333333333 / x));
} else {
tmp = pow((0.1111111111111111 / x), -0.5) * (y + -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.1d+47)) then
tmp = y * sqrt((x / 0.1111111111111111d0))
else if (y <= 12500000.0d0) then
tmp = sqrt(x) * ((-3.0d0) - ((-0.3333333333333333d0) / x))
else
tmp = ((0.1111111111111111d0 / x) ** (-0.5d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.1e+47) {
tmp = y * Math.sqrt((x / 0.1111111111111111));
} else if (y <= 12500000.0) {
tmp = Math.sqrt(x) * (-3.0 - (-0.3333333333333333 / x));
} else {
tmp = Math.pow((0.1111111111111111 / x), -0.5) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.1e+47: tmp = y * math.sqrt((x / 0.1111111111111111)) elif y <= 12500000.0: tmp = math.sqrt(x) * (-3.0 - (-0.3333333333333333 / x)) else: tmp = math.pow((0.1111111111111111 / x), -0.5) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.1e+47) tmp = Float64(y * sqrt(Float64(x / 0.1111111111111111))); elseif (y <= 12500000.0) tmp = Float64(sqrt(x) * Float64(-3.0 - Float64(-0.3333333333333333 / x))); else tmp = Float64((Float64(0.1111111111111111 / x) ^ -0.5) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.1e+47) tmp = y * sqrt((x / 0.1111111111111111)); elseif (y <= 12500000.0) tmp = sqrt(x) * (-3.0 - (-0.3333333333333333 / x)); else tmp = ((0.1111111111111111 / x) ^ -0.5) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.1e+47], N[(y * N[Sqrt[N[(x / 0.1111111111111111), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 12500000.0], N[(N[Sqrt[x], $MachinePrecision] * N[(-3.0 - N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(0.1111111111111111 / x), $MachinePrecision], -0.5], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \sqrt{\frac{x}{0.1111111111111111}}\\
\mathbf{elif}\;y \leq 12500000:\\
\;\;\;\;\sqrt{x} \cdot \left(-3 - \frac{-0.3333333333333333}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{0.1111111111111111}{x}\right)}^{-0.5} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if y < -1.1e47Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
metadata-eval99.6%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 86.7%
if -1.1e47 < y < 1.25e7Initial program 99.4%
*-commutative99.4%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 95.4%
sub-neg95.4%
metadata-eval95.4%
associate-*r/95.5%
metadata-eval95.5%
+-commutative95.5%
metadata-eval95.5%
distribute-neg-frac95.5%
unsub-neg95.5%
Simplified95.5%
if 1.25e7 < y Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
metadata-eval99.5%
div-inv99.4%
clear-num99.6%
Applied egg-rr99.6%
inv-pow99.6%
sqrt-pow199.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 75.8%
Final simplification88.8%
(FPCore (x y)
:precision binary64
(if (<= y -1.4e+50)
(* y (sqrt (/ x 0.1111111111111111)))
(if (<= y 50000000.0)
(* (sqrt x) (- -3.0 (/ -0.3333333333333333 x)))
(* (sqrt (* x 9.0)) (+ y -1.0)))))
double code(double x, double y) {
double tmp;
if (y <= -1.4e+50) {
tmp = y * sqrt((x / 0.1111111111111111));
} else if (y <= 50000000.0) {
tmp = sqrt(x) * (-3.0 - (-0.3333333333333333 / x));
} else {
tmp = sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.4d+50)) then
tmp = y * sqrt((x / 0.1111111111111111d0))
else if (y <= 50000000.0d0) then
tmp = sqrt(x) * ((-3.0d0) - ((-0.3333333333333333d0) / x))
else
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.4e+50) {
tmp = y * Math.sqrt((x / 0.1111111111111111));
} else if (y <= 50000000.0) {
tmp = Math.sqrt(x) * (-3.0 - (-0.3333333333333333 / x));
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.4e+50: tmp = y * math.sqrt((x / 0.1111111111111111)) elif y <= 50000000.0: tmp = math.sqrt(x) * (-3.0 - (-0.3333333333333333 / x)) else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.4e+50) tmp = Float64(y * sqrt(Float64(x / 0.1111111111111111))); elseif (y <= 50000000.0) tmp = Float64(sqrt(x) * Float64(-3.0 - Float64(-0.3333333333333333 / x))); else tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.4e+50) tmp = y * sqrt((x / 0.1111111111111111)); elseif (y <= 50000000.0) tmp = sqrt(x) * (-3.0 - (-0.3333333333333333 / x)); else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.4e+50], N[(y * N[Sqrt[N[(x / 0.1111111111111111), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 50000000.0], N[(N[Sqrt[x], $MachinePrecision] * N[(-3.0 - N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+50}:\\
\;\;\;\;y \cdot \sqrt{\frac{x}{0.1111111111111111}}\\
\mathbf{elif}\;y \leq 50000000:\\
\;\;\;\;\sqrt{x} \cdot \left(-3 - \frac{-0.3333333333333333}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if y < -1.3999999999999999e50Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
metadata-eval99.6%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 86.7%
if -1.3999999999999999e50 < y < 5e7Initial program 99.4%
*-commutative99.4%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 95.4%
sub-neg95.4%
metadata-eval95.4%
associate-*r/95.5%
metadata-eval95.5%
+-commutative95.5%
metadata-eval95.5%
distribute-neg-frac95.5%
unsub-neg95.5%
Simplified95.5%
if 5e7 < y Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in x around inf 75.8%
Final simplification88.8%
(FPCore (x y)
:precision binary64
(if (<= y -8.6e+49)
(* y (sqrt (/ x 0.1111111111111111)))
(if (<= y 300000000.0)
(* (sqrt x) (- -3.0 (/ -0.3333333333333333 x)))
(* 3.0 (* (sqrt x) (+ y -1.0))))))
double code(double x, double y) {
double tmp;
if (y <= -8.6e+49) {
tmp = y * sqrt((x / 0.1111111111111111));
} else if (y <= 300000000.0) {
tmp = sqrt(x) * (-3.0 - (-0.3333333333333333 / x));
} else {
tmp = 3.0 * (sqrt(x) * (y + -1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-8.6d+49)) then
tmp = y * sqrt((x / 0.1111111111111111d0))
else if (y <= 300000000.0d0) then
tmp = sqrt(x) * ((-3.0d0) - ((-0.3333333333333333d0) / x))
else
tmp = 3.0d0 * (sqrt(x) * (y + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -8.6e+49) {
tmp = y * Math.sqrt((x / 0.1111111111111111));
} else if (y <= 300000000.0) {
tmp = Math.sqrt(x) * (-3.0 - (-0.3333333333333333 / x));
} else {
tmp = 3.0 * (Math.sqrt(x) * (y + -1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8.6e+49: tmp = y * math.sqrt((x / 0.1111111111111111)) elif y <= 300000000.0: tmp = math.sqrt(x) * (-3.0 - (-0.3333333333333333 / x)) else: tmp = 3.0 * (math.sqrt(x) * (y + -1.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -8.6e+49) tmp = Float64(y * sqrt(Float64(x / 0.1111111111111111))); elseif (y <= 300000000.0) tmp = Float64(sqrt(x) * Float64(-3.0 - Float64(-0.3333333333333333 / x))); else tmp = Float64(3.0 * Float64(sqrt(x) * Float64(y + -1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -8.6e+49) tmp = y * sqrt((x / 0.1111111111111111)); elseif (y <= 300000000.0) tmp = sqrt(x) * (-3.0 - (-0.3333333333333333 / x)); else tmp = 3.0 * (sqrt(x) * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8.6e+49], N[(y * N[Sqrt[N[(x / 0.1111111111111111), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 300000000.0], N[(N[Sqrt[x], $MachinePrecision] * N[(-3.0 - N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+49}:\\
\;\;\;\;y \cdot \sqrt{\frac{x}{0.1111111111111111}}\\
\mathbf{elif}\;y \leq 300000000:\\
\;\;\;\;\sqrt{x} \cdot \left(-3 - \frac{-0.3333333333333333}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
if y < -8.5999999999999998e49Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
metadata-eval99.6%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 86.7%
if -8.5999999999999998e49 < y < 3e8Initial program 99.4%
*-commutative99.4%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 95.4%
sub-neg95.4%
metadata-eval95.4%
associate-*r/95.5%
metadata-eval95.5%
+-commutative95.5%
metadata-eval95.5%
distribute-neg-frac95.5%
unsub-neg95.5%
Simplified95.5%
if 3e8 < y Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 75.7%
Final simplification88.7%
(FPCore (x y)
:precision binary64
(if (<= x 1.26e-43)
(sqrt (/ 0.1111111111111111 x))
(if (<= x 1.25e+160)
(* (pow (/ 0.1111111111111111 x) -0.5) y)
(- (sqrt (/ x 0.1111111111111111))))))
double code(double x, double y) {
double tmp;
if (x <= 1.26e-43) {
tmp = sqrt((0.1111111111111111 / x));
} else if (x <= 1.25e+160) {
tmp = pow((0.1111111111111111 / x), -0.5) * y;
} else {
tmp = -sqrt((x / 0.1111111111111111));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.26d-43) then
tmp = sqrt((0.1111111111111111d0 / x))
else if (x <= 1.25d+160) then
tmp = ((0.1111111111111111d0 / x) ** (-0.5d0)) * y
else
tmp = -sqrt((x / 0.1111111111111111d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.26e-43) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else if (x <= 1.25e+160) {
tmp = Math.pow((0.1111111111111111 / x), -0.5) * y;
} else {
tmp = -Math.sqrt((x / 0.1111111111111111));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.26e-43: tmp = math.sqrt((0.1111111111111111 / x)) elif x <= 1.25e+160: tmp = math.pow((0.1111111111111111 / x), -0.5) * y else: tmp = -math.sqrt((x / 0.1111111111111111)) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.26e-43) tmp = sqrt(Float64(0.1111111111111111 / x)); elseif (x <= 1.25e+160) tmp = Float64((Float64(0.1111111111111111 / x) ^ -0.5) * y); else tmp = Float64(-sqrt(Float64(x / 0.1111111111111111))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.26e-43) tmp = sqrt((0.1111111111111111 / x)); elseif (x <= 1.25e+160) tmp = ((0.1111111111111111 / x) ^ -0.5) * y; else tmp = -sqrt((x / 0.1111111111111111)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.26e-43], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 1.25e+160], N[(N[Power[N[(0.1111111111111111 / x), $MachinePrecision], -0.5], $MachinePrecision] * y), $MachinePrecision], (-N[Sqrt[N[(x / 0.1111111111111111), $MachinePrecision]], $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.26 \cdot 10^{-43}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{+160}:\\
\;\;\;\;{\left(\frac{0.1111111111111111}{x}\right)}^{-0.5} \cdot y\\
\mathbf{else}:\\
\;\;\;\;-\sqrt{\frac{x}{0.1111111111111111}}\\
\end{array}
\end{array}
if x < 1.26e-43Initial program 99.3%
*-commutative99.3%
associate-*l*98.5%
associate--l+98.5%
distribute-lft-in98.5%
fma-define98.5%
sub-neg98.5%
+-commutative98.5%
distribute-lft-in98.5%
metadata-eval98.5%
metadata-eval98.5%
*-commutative98.5%
associate-/r*98.5%
associate-*r/98.6%
metadata-eval98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 76.2%
metadata-eval76.2%
sqrt-prod76.5%
div-inv76.6%
pow1/276.6%
Applied egg-rr76.6%
unpow1/276.6%
Simplified76.6%
if 1.26e-43 < x < 1.25e160Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
metadata-eval99.6%
div-inv99.6%
clear-num99.6%
Applied egg-rr99.6%
inv-pow99.6%
sqrt-pow199.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 58.4%
if 1.25e160 < x Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
metadata-eval99.8%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 62.3%
Taylor expanded in x around inf 62.3%
Final simplification67.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (sqrt (/ x 0.1111111111111111))))
(if (<= x 1.25e-27)
(sqrt (/ -1.0 (* x (- 9.0))))
(if (<= x 6e+160) (* y t_0) (- t_0)))))
double code(double x, double y) {
double t_0 = sqrt((x / 0.1111111111111111));
double tmp;
if (x <= 1.25e-27) {
tmp = sqrt((-1.0 / (x * -9.0)));
} else if (x <= 6e+160) {
tmp = y * t_0;
} else {
tmp = -t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((x / 0.1111111111111111d0))
if (x <= 1.25d-27) then
tmp = sqrt(((-1.0d0) / (x * -9.0d0)))
else if (x <= 6d+160) then
tmp = y * t_0
else
tmp = -t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt((x / 0.1111111111111111));
double tmp;
if (x <= 1.25e-27) {
tmp = Math.sqrt((-1.0 / (x * -9.0)));
} else if (x <= 6e+160) {
tmp = y * t_0;
} else {
tmp = -t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt((x / 0.1111111111111111)) tmp = 0 if x <= 1.25e-27: tmp = math.sqrt((-1.0 / (x * -9.0))) elif x <= 6e+160: tmp = y * t_0 else: tmp = -t_0 return tmp
function code(x, y) t_0 = sqrt(Float64(x / 0.1111111111111111)) tmp = 0.0 if (x <= 1.25e-27) tmp = sqrt(Float64(-1.0 / Float64(x * Float64(-9.0)))); elseif (x <= 6e+160) tmp = Float64(y * t_0); else tmp = Float64(-t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt((x / 0.1111111111111111)); tmp = 0.0; if (x <= 1.25e-27) tmp = sqrt((-1.0 / (x * -9.0))); elseif (x <= 6e+160) tmp = y * t_0; else tmp = -t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Sqrt[N[(x / 0.1111111111111111), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, 1.25e-27], N[Sqrt[N[(-1.0 / N[(x * (-9.0)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 6e+160], N[(y * t$95$0), $MachinePrecision], (-t$95$0)]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{x}{0.1111111111111111}}\\
\mathbf{if}\;x \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;\sqrt{\frac{-1}{x \cdot \left(-9\right)}}\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+160}:\\
\;\;\;\;y \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;-t\_0\\
\end{array}
\end{array}
if x < 1.25e-27Initial program 99.3%
*-commutative99.3%
associate-*l*98.5%
associate--l+98.5%
distribute-lft-in98.5%
fma-define98.5%
sub-neg98.5%
+-commutative98.5%
distribute-lft-in98.5%
metadata-eval98.5%
metadata-eval98.5%
*-commutative98.5%
associate-/r*98.5%
associate-*r/98.6%
metadata-eval98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 75.4%
metadata-eval75.4%
sqrt-prod75.7%
div-inv75.8%
pow1/275.8%
Applied egg-rr75.8%
unpow1/275.8%
Simplified75.8%
clear-num75.8%
frac-2neg75.8%
metadata-eval75.8%
distribute-frac-neg275.8%
div-inv75.8%
metadata-eval75.8%
Applied egg-rr75.8%
if 1.25e-27 < x < 5.9999999999999997e160Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
metadata-eval99.6%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 58.8%
if 5.9999999999999997e160 < x Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
metadata-eval99.8%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 62.3%
Taylor expanded in x around inf 62.3%
Final simplification67.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (sqrt (/ x 0.1111111111111111))))
(if (<= x 2.3e-27)
(sqrt (/ 0.1111111111111111 x))
(if (<= x 1.75e+160) (* y t_0) (- t_0)))))
double code(double x, double y) {
double t_0 = sqrt((x / 0.1111111111111111));
double tmp;
if (x <= 2.3e-27) {
tmp = sqrt((0.1111111111111111 / x));
} else if (x <= 1.75e+160) {
tmp = y * t_0;
} else {
tmp = -t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((x / 0.1111111111111111d0))
if (x <= 2.3d-27) then
tmp = sqrt((0.1111111111111111d0 / x))
else if (x <= 1.75d+160) then
tmp = y * t_0
else
tmp = -t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt((x / 0.1111111111111111));
double tmp;
if (x <= 2.3e-27) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else if (x <= 1.75e+160) {
tmp = y * t_0;
} else {
tmp = -t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt((x / 0.1111111111111111)) tmp = 0 if x <= 2.3e-27: tmp = math.sqrt((0.1111111111111111 / x)) elif x <= 1.75e+160: tmp = y * t_0 else: tmp = -t_0 return tmp
function code(x, y) t_0 = sqrt(Float64(x / 0.1111111111111111)) tmp = 0.0 if (x <= 2.3e-27) tmp = sqrt(Float64(0.1111111111111111 / x)); elseif (x <= 1.75e+160) tmp = Float64(y * t_0); else tmp = Float64(-t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt((x / 0.1111111111111111)); tmp = 0.0; if (x <= 2.3e-27) tmp = sqrt((0.1111111111111111 / x)); elseif (x <= 1.75e+160) tmp = y * t_0; else tmp = -t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Sqrt[N[(x / 0.1111111111111111), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, 2.3e-27], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 1.75e+160], N[(y * t$95$0), $MachinePrecision], (-t$95$0)]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{x}{0.1111111111111111}}\\
\mathbf{if}\;x \leq 2.3 \cdot 10^{-27}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{+160}:\\
\;\;\;\;y \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;-t\_0\\
\end{array}
\end{array}
if x < 2.2999999999999999e-27Initial program 99.3%
*-commutative99.3%
associate-*l*98.5%
associate--l+98.5%
distribute-lft-in98.5%
fma-define98.5%
sub-neg98.5%
+-commutative98.5%
distribute-lft-in98.5%
metadata-eval98.5%
metadata-eval98.5%
*-commutative98.5%
associate-/r*98.5%
associate-*r/98.6%
metadata-eval98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 75.4%
metadata-eval75.4%
sqrt-prod75.7%
div-inv75.8%
pow1/275.8%
Applied egg-rr75.8%
unpow1/275.8%
Simplified75.8%
if 2.2999999999999999e-27 < x < 1.75000000000000013e160Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
metadata-eval99.6%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 58.8%
if 1.75000000000000013e160 < x Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
metadata-eval99.8%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 62.3%
Taylor expanded in x around inf 62.3%
Final simplification67.5%
(FPCore (x y)
:precision binary64
(if (<= x 2.8e-41)
(sqrt (/ 0.1111111111111111 x))
(if (<= x 2.65e+160)
(* y (sqrt (* x 9.0)))
(- (sqrt (/ x 0.1111111111111111))))))
double code(double x, double y) {
double tmp;
if (x <= 2.8e-41) {
tmp = sqrt((0.1111111111111111 / x));
} else if (x <= 2.65e+160) {
tmp = y * sqrt((x * 9.0));
} else {
tmp = -sqrt((x / 0.1111111111111111));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 2.8d-41) then
tmp = sqrt((0.1111111111111111d0 / x))
else if (x <= 2.65d+160) then
tmp = y * sqrt((x * 9.0d0))
else
tmp = -sqrt((x / 0.1111111111111111d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 2.8e-41) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else if (x <= 2.65e+160) {
tmp = y * Math.sqrt((x * 9.0));
} else {
tmp = -Math.sqrt((x / 0.1111111111111111));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2.8e-41: tmp = math.sqrt((0.1111111111111111 / x)) elif x <= 2.65e+160: tmp = y * math.sqrt((x * 9.0)) else: tmp = -math.sqrt((x / 0.1111111111111111)) return tmp
function code(x, y) tmp = 0.0 if (x <= 2.8e-41) tmp = sqrt(Float64(0.1111111111111111 / x)); elseif (x <= 2.65e+160) tmp = Float64(y * sqrt(Float64(x * 9.0))); else tmp = Float64(-sqrt(Float64(x / 0.1111111111111111))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 2.8e-41) tmp = sqrt((0.1111111111111111 / x)); elseif (x <= 2.65e+160) tmp = y * sqrt((x * 9.0)); else tmp = -sqrt((x / 0.1111111111111111)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2.8e-41], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 2.65e+160], N[(y * N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], (-N[Sqrt[N[(x / 0.1111111111111111), $MachinePrecision]], $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.8 \cdot 10^{-41}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;x \leq 2.65 \cdot 10^{+160}:\\
\;\;\;\;y \cdot \sqrt{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;-\sqrt{\frac{x}{0.1111111111111111}}\\
\end{array}
\end{array}
if x < 2.8000000000000002e-41Initial program 99.3%
*-commutative99.3%
associate-*l*98.5%
associate--l+98.5%
distribute-lft-in98.5%
fma-define98.5%
sub-neg98.5%
+-commutative98.5%
distribute-lft-in98.5%
metadata-eval98.5%
metadata-eval98.5%
*-commutative98.5%
associate-/r*98.5%
associate-*r/98.6%
metadata-eval98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 76.2%
metadata-eval76.2%
sqrt-prod76.5%
div-inv76.6%
pow1/276.6%
Applied egg-rr76.6%
unpow1/276.6%
Simplified76.6%
if 2.8000000000000002e-41 < x < 2.65e160Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 58.4%
if 2.65e160 < x Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
metadata-eval99.8%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 62.3%
Taylor expanded in x around inf 62.3%
Final simplification67.5%
(FPCore (x y) :precision binary64 (if (<= x 2e-41) (sqrt (/ 0.1111111111111111 x)) (if (<= x 6e+159) (* y (sqrt (* x 9.0))) (* (sqrt x) -3.0))))
double code(double x, double y) {
double tmp;
if (x <= 2e-41) {
tmp = sqrt((0.1111111111111111 / x));
} else if (x <= 6e+159) {
tmp = y * sqrt((x * 9.0));
} else {
tmp = sqrt(x) * -3.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 2d-41) then
tmp = sqrt((0.1111111111111111d0 / x))
else if (x <= 6d+159) then
tmp = y * sqrt((x * 9.0d0))
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 2e-41) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else if (x <= 6e+159) {
tmp = y * Math.sqrt((x * 9.0));
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2e-41: tmp = math.sqrt((0.1111111111111111 / x)) elif x <= 6e+159: tmp = y * math.sqrt((x * 9.0)) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 2e-41) tmp = sqrt(Float64(0.1111111111111111 / x)); elseif (x <= 6e+159) tmp = Float64(y * sqrt(Float64(x * 9.0))); else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 2e-41) tmp = sqrt((0.1111111111111111 / x)); elseif (x <= 6e+159) tmp = y * sqrt((x * 9.0)); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2e-41], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 6e+159], N[(y * N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{-41}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+159}:\\
\;\;\;\;y \cdot \sqrt{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 2.00000000000000001e-41Initial program 99.3%
*-commutative99.3%
associate-*l*98.5%
associate--l+98.5%
distribute-lft-in98.5%
fma-define98.5%
sub-neg98.5%
+-commutative98.5%
distribute-lft-in98.5%
metadata-eval98.5%
metadata-eval98.5%
*-commutative98.5%
associate-/r*98.5%
associate-*r/98.6%
metadata-eval98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 76.2%
metadata-eval76.2%
sqrt-prod76.5%
div-inv76.6%
pow1/276.6%
Applied egg-rr76.6%
unpow1/276.6%
Simplified76.6%
if 2.00000000000000001e-41 < x < 6.0000000000000004e159Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 58.4%
if 6.0000000000000004e159 < x Initial program 99.6%
*-commutative99.6%
associate-*l*99.7%
associate--l+99.7%
distribute-lft-in99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.7%
metadata-eval99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 62.3%
sub-neg62.3%
metadata-eval62.3%
associate-*r/62.3%
metadata-eval62.3%
+-commutative62.3%
metadata-eval62.3%
distribute-neg-frac62.3%
unsub-neg62.3%
Simplified62.3%
Taylor expanded in x around inf 62.3%
*-commutative62.3%
Simplified62.3%
Final simplification67.5%
(FPCore (x y) :precision binary64 (if (<= x 1.56e-28) (sqrt (/ 0.1111111111111111 x)) (if (<= x 2.6e+160) (* (sqrt x) (* y 3.0)) (* (sqrt x) -3.0))))
double code(double x, double y) {
double tmp;
if (x <= 1.56e-28) {
tmp = sqrt((0.1111111111111111 / x));
} else if (x <= 2.6e+160) {
tmp = sqrt(x) * (y * 3.0);
} else {
tmp = sqrt(x) * -3.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.56d-28) then
tmp = sqrt((0.1111111111111111d0 / x))
else if (x <= 2.6d+160) then
tmp = sqrt(x) * (y * 3.0d0)
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.56e-28) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else if (x <= 2.6e+160) {
tmp = Math.sqrt(x) * (y * 3.0);
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.56e-28: tmp = math.sqrt((0.1111111111111111 / x)) elif x <= 2.6e+160: tmp = math.sqrt(x) * (y * 3.0) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 1.56e-28) tmp = sqrt(Float64(0.1111111111111111 / x)); elseif (x <= 2.6e+160) tmp = Float64(sqrt(x) * Float64(y * 3.0)); else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.56e-28) tmp = sqrt((0.1111111111111111 / x)); elseif (x <= 2.6e+160) tmp = sqrt(x) * (y * 3.0); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.56e-28], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 2.6e+160], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.56 \cdot 10^{-28}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+160}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 1.5599999999999999e-28Initial program 99.3%
*-commutative99.3%
associate-*l*98.5%
associate--l+98.5%
distribute-lft-in98.5%
fma-define98.5%
sub-neg98.5%
+-commutative98.5%
distribute-lft-in98.5%
metadata-eval98.5%
metadata-eval98.5%
*-commutative98.5%
associate-/r*98.5%
associate-*r/98.6%
metadata-eval98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 75.4%
metadata-eval75.4%
sqrt-prod75.7%
div-inv75.8%
pow1/275.8%
Applied egg-rr75.8%
unpow1/275.8%
Simplified75.8%
if 1.5599999999999999e-28 < x < 2.6e160Initial program 99.3%
*-commutative99.3%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
distribute-lft-in99.5%
metadata-eval99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 58.6%
*-commutative58.6%
associate-*l*58.7%
*-commutative58.7%
Simplified58.7%
if 2.6e160 < x Initial program 99.6%
*-commutative99.6%
associate-*l*99.7%
associate--l+99.7%
distribute-lft-in99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.7%
metadata-eval99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 62.3%
sub-neg62.3%
metadata-eval62.3%
associate-*r/62.3%
metadata-eval62.3%
+-commutative62.3%
metadata-eval62.3%
distribute-neg-frac62.3%
unsub-neg62.3%
Simplified62.3%
Taylor expanded in x around inf 62.3%
*-commutative62.3%
Simplified62.3%
Final simplification67.5%
(FPCore (x y) :precision binary64 (if (<= x 2.55e-43) (sqrt (/ 0.1111111111111111 x)) (if (<= x 2.8e+160) (* 3.0 (* y (sqrt x))) (* (sqrt x) -3.0))))
double code(double x, double y) {
double tmp;
if (x <= 2.55e-43) {
tmp = sqrt((0.1111111111111111 / x));
} else if (x <= 2.8e+160) {
tmp = 3.0 * (y * sqrt(x));
} else {
tmp = sqrt(x) * -3.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 2.55d-43) then
tmp = sqrt((0.1111111111111111d0 / x))
else if (x <= 2.8d+160) then
tmp = 3.0d0 * (y * sqrt(x))
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 2.55e-43) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else if (x <= 2.8e+160) {
tmp = 3.0 * (y * Math.sqrt(x));
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2.55e-43: tmp = math.sqrt((0.1111111111111111 / x)) elif x <= 2.8e+160: tmp = 3.0 * (y * math.sqrt(x)) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 2.55e-43) tmp = sqrt(Float64(0.1111111111111111 / x)); elseif (x <= 2.8e+160) tmp = Float64(3.0 * Float64(y * sqrt(x))); else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 2.55e-43) tmp = sqrt((0.1111111111111111 / x)); elseif (x <= 2.8e+160) tmp = 3.0 * (y * sqrt(x)); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2.55e-43], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 2.8e+160], N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.55 \cdot 10^{-43}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+160}:\\
\;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 2.5499999999999998e-43Initial program 99.3%
*-commutative99.3%
associate-*l*98.5%
associate--l+98.5%
distribute-lft-in98.5%
fma-define98.5%
sub-neg98.5%
+-commutative98.5%
distribute-lft-in98.5%
metadata-eval98.5%
metadata-eval98.5%
*-commutative98.5%
associate-/r*98.5%
associate-*r/98.6%
metadata-eval98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 76.2%
metadata-eval76.2%
sqrt-prod76.5%
div-inv76.6%
pow1/276.6%
Applied egg-rr76.6%
unpow1/276.6%
Simplified76.6%
if 2.5499999999999998e-43 < x < 2.8e160Initial program 99.4%
*-commutative99.4%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 58.3%
if 2.8e160 < x Initial program 99.6%
*-commutative99.6%
associate-*l*99.7%
associate--l+99.7%
distribute-lft-in99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
distribute-lft-in99.7%
metadata-eval99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 62.3%
sub-neg62.3%
metadata-eval62.3%
associate-*r/62.3%
metadata-eval62.3%
+-commutative62.3%
metadata-eval62.3%
distribute-neg-frac62.3%
unsub-neg62.3%
Simplified62.3%
Taylor expanded in x around inf 62.3%
*-commutative62.3%
Simplified62.3%
Final simplification67.4%
(FPCore (x y) :precision binary64 (if (<= x 65000000000.0) (* (sqrt (/ x 0.1111111111111111)) (+ (/ 0.1111111111111111 x) y)) (* (sqrt (* x 9.0)) (+ y -1.0))))
double code(double x, double y) {
double tmp;
if (x <= 65000000000.0) {
tmp = sqrt((x / 0.1111111111111111)) * ((0.1111111111111111 / x) + y);
} else {
tmp = sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 65000000000.0d0) then
tmp = sqrt((x / 0.1111111111111111d0)) * ((0.1111111111111111d0 / x) + y)
else
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 65000000000.0) {
tmp = Math.sqrt((x / 0.1111111111111111)) * ((0.1111111111111111 / x) + y);
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 65000000000.0: tmp = math.sqrt((x / 0.1111111111111111)) * ((0.1111111111111111 / x) + y) else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 65000000000.0) tmp = Float64(sqrt(Float64(x / 0.1111111111111111)) * Float64(Float64(0.1111111111111111 / x) + y)); else tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 65000000000.0) tmp = sqrt((x / 0.1111111111111111)) * ((0.1111111111111111 / x) + y); else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 65000000000.0], N[(N[Sqrt[N[(x / 0.1111111111111111), $MachinePrecision]], $MachinePrecision] * N[(N[(0.1111111111111111 / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 65000000000:\\
\;\;\;\;\sqrt{\frac{x}{0.1111111111111111}} \cdot \left(\frac{0.1111111111111111}{x} + y\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if x < 6.5e10Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.4%
pow1/299.4%
Applied egg-rr99.4%
unpow1/299.4%
Simplified99.4%
metadata-eval99.4%
div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in y around inf 97.3%
if 6.5e10 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around inf 99.6%
Final simplification98.4%
(FPCore (x y) :precision binary64 (if (<= x 1.08e-29) (sqrt (/ -1.0 (* x (- 9.0)))) (* (sqrt x) (* 3.0 (+ y -1.0)))))
double code(double x, double y) {
double tmp;
if (x <= 1.08e-29) {
tmp = sqrt((-1.0 / (x * -9.0)));
} else {
tmp = sqrt(x) * (3.0 * (y + -1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.08d-29) then
tmp = sqrt(((-1.0d0) / (x * -9.0d0)))
else
tmp = sqrt(x) * (3.0d0 * (y + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.08e-29) {
tmp = Math.sqrt((-1.0 / (x * -9.0)));
} else {
tmp = Math.sqrt(x) * (3.0 * (y + -1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.08e-29: tmp = math.sqrt((-1.0 / (x * -9.0))) else: tmp = math.sqrt(x) * (3.0 * (y + -1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.08e-29) tmp = sqrt(Float64(-1.0 / Float64(x * Float64(-9.0)))); else tmp = Float64(sqrt(x) * Float64(3.0 * Float64(y + -1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.08e-29) tmp = sqrt((-1.0 / (x * -9.0))); else tmp = sqrt(x) * (3.0 * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.08e-29], N[Sqrt[N[(-1.0 / N[(x * (-9.0)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.08 \cdot 10^{-29}:\\
\;\;\;\;\sqrt{\frac{-1}{x \cdot \left(-9\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
if x < 1.07999999999999995e-29Initial program 99.3%
*-commutative99.3%
associate-*l*98.5%
associate--l+98.5%
distribute-lft-in98.5%
fma-define98.5%
sub-neg98.5%
+-commutative98.5%
distribute-lft-in98.5%
metadata-eval98.5%
metadata-eval98.5%
*-commutative98.5%
associate-/r*98.5%
associate-*r/98.6%
metadata-eval98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 75.4%
metadata-eval75.4%
sqrt-prod75.7%
div-inv75.8%
pow1/275.8%
Applied egg-rr75.8%
unpow1/275.8%
Simplified75.8%
clear-num75.8%
frac-2neg75.8%
metadata-eval75.8%
distribute-frac-neg275.8%
div-inv75.8%
metadata-eval75.8%
Applied egg-rr75.8%
if 1.07999999999999995e-29 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around inf 95.4%
sub-neg95.4%
metadata-eval95.4%
associate-*r*95.4%
*-commutative95.4%
associate-*l*95.5%
Simplified95.5%
Final simplification86.2%
(FPCore (x y) :precision binary64 (if (<= x 9.2e-28) (sqrt (/ -1.0 (* x (- 9.0)))) (* 3.0 (* (sqrt x) (+ y -1.0)))))
double code(double x, double y) {
double tmp;
if (x <= 9.2e-28) {
tmp = sqrt((-1.0 / (x * -9.0)));
} else {
tmp = 3.0 * (sqrt(x) * (y + -1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 9.2d-28) then
tmp = sqrt(((-1.0d0) / (x * -9.0d0)))
else
tmp = 3.0d0 * (sqrt(x) * (y + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 9.2e-28) {
tmp = Math.sqrt((-1.0 / (x * -9.0)));
} else {
tmp = 3.0 * (Math.sqrt(x) * (y + -1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 9.2e-28: tmp = math.sqrt((-1.0 / (x * -9.0))) else: tmp = 3.0 * (math.sqrt(x) * (y + -1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= 9.2e-28) tmp = sqrt(Float64(-1.0 / Float64(x * Float64(-9.0)))); else tmp = Float64(3.0 * Float64(sqrt(x) * Float64(y + -1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 9.2e-28) tmp = sqrt((-1.0 / (x * -9.0))); else tmp = 3.0 * (sqrt(x) * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 9.2e-28], N[Sqrt[N[(-1.0 / N[(x * (-9.0)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9.2 \cdot 10^{-28}:\\
\;\;\;\;\sqrt{\frac{-1}{x \cdot \left(-9\right)}}\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
if x < 9.19999999999999942e-28Initial program 99.3%
*-commutative99.3%
associate-*l*98.5%
associate--l+98.5%
distribute-lft-in98.5%
fma-define98.5%
sub-neg98.5%
+-commutative98.5%
distribute-lft-in98.5%
metadata-eval98.5%
metadata-eval98.5%
*-commutative98.5%
associate-/r*98.5%
associate-*r/98.6%
metadata-eval98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 75.4%
metadata-eval75.4%
sqrt-prod75.7%
div-inv75.8%
pow1/275.8%
Applied egg-rr75.8%
unpow1/275.8%
Simplified75.8%
clear-num75.8%
frac-2neg75.8%
metadata-eval75.8%
distribute-frac-neg275.8%
div-inv75.8%
metadata-eval75.8%
Applied egg-rr75.8%
if 9.19999999999999942e-28 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 95.4%
Final simplification86.2%
(FPCore (x y) :precision binary64 (* (+ (/ 0.1111111111111111 x) (+ y -1.0)) (sqrt (* x 9.0))))
double code(double x, double y) {
return ((0.1111111111111111 / x) + (y + -1.0)) * sqrt((x * 9.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((0.1111111111111111d0 / x) + (y + (-1.0d0))) * sqrt((x * 9.0d0))
end function
public static double code(double x, double y) {
return ((0.1111111111111111 / x) + (y + -1.0)) * Math.sqrt((x * 9.0));
}
def code(x, y): return ((0.1111111111111111 / x) + (y + -1.0)) * math.sqrt((x * 9.0))
function code(x, y) return Float64(Float64(Float64(0.1111111111111111 / x) + Float64(y + -1.0)) * sqrt(Float64(x * 9.0))) end
function tmp = code(x, y) tmp = ((0.1111111111111111 / x) + (y + -1.0)) * sqrt((x * 9.0)); end
code[x_, y_] := N[(N[(N[(0.1111111111111111 / x), $MachinePrecision] + N[(y + -1.0), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \cdot \sqrt{x \cdot 9}
\end{array}
Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y) :precision binary64 (* (sqrt x) (+ (+ (* y 3.0) (/ 0.3333333333333333 x)) -3.0)))
double code(double x, double y) {
return sqrt(x) * (((y * 3.0) + (0.3333333333333333 / x)) + -3.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(x) * (((y * 3.0d0) + (0.3333333333333333d0 / x)) + (-3.0d0))
end function
public static double code(double x, double y) {
return Math.sqrt(x) * (((y * 3.0) + (0.3333333333333333 / x)) + -3.0);
}
def code(x, y): return math.sqrt(x) * (((y * 3.0) + (0.3333333333333333 / x)) + -3.0)
function code(x, y) return Float64(sqrt(x) * Float64(Float64(Float64(y * 3.0) + Float64(0.3333333333333333 / x)) + -3.0)) end
function tmp = code(x, y) tmp = sqrt(x) * (((y * 3.0) + (0.3333333333333333 / x)) + -3.0); end
code[x_, y_] := N[(N[Sqrt[x], $MachinePrecision] * N[(N[(N[(y * 3.0), $MachinePrecision] + N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x} \cdot \left(\left(y \cdot 3 + \frac{0.3333333333333333}{x}\right) + -3\right)
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-*l*99.0%
associate--l+99.0%
distribute-lft-in99.0%
fma-define99.1%
sub-neg99.1%
+-commutative99.1%
distribute-lft-in99.1%
metadata-eval99.1%
metadata-eval99.1%
*-commutative99.1%
associate-/r*99.1%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
fma-undefine99.1%
+-commutative99.1%
associate-+r+99.1%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (x y) :precision binary64 (if (<= x 65000000000.0) (sqrt (/ 0.1111111111111111 x)) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if (x <= 65000000000.0) {
tmp = sqrt((0.1111111111111111 / x));
} else {
tmp = sqrt(x) * -3.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 65000000000.0d0) then
tmp = sqrt((0.1111111111111111d0 / x))
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 65000000000.0) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 65000000000.0: tmp = math.sqrt((0.1111111111111111 / x)) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 65000000000.0) tmp = sqrt(Float64(0.1111111111111111 / x)); else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 65000000000.0) tmp = sqrt((0.1111111111111111 / x)); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 65000000000.0], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 65000000000:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 6.5e10Initial program 99.3%
*-commutative99.3%
associate-*l*98.5%
associate--l+98.5%
distribute-lft-in98.5%
fma-define98.6%
sub-neg98.6%
+-commutative98.6%
distribute-lft-in98.6%
metadata-eval98.6%
metadata-eval98.6%
*-commutative98.6%
associate-/r*98.6%
associate-*r/98.7%
metadata-eval98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in x around 0 67.9%
metadata-eval67.9%
sqrt-prod68.1%
div-inv68.2%
pow1/268.2%
Applied egg-rr68.2%
unpow1/268.2%
Simplified68.2%
if 6.5e10 < x Initial program 99.5%
*-commutative99.5%
associate-*l*99.6%
associate--l+99.6%
distribute-lft-in99.6%
fma-define99.6%
sub-neg99.6%
+-commutative99.6%
distribute-lft-in99.6%
metadata-eval99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 52.2%
sub-neg52.2%
metadata-eval52.2%
associate-*r/52.2%
metadata-eval52.2%
+-commutative52.2%
metadata-eval52.2%
distribute-neg-frac52.2%
unsub-neg52.2%
Simplified52.2%
Taylor expanded in x around inf 52.0%
*-commutative52.0%
Simplified52.0%
(FPCore (x y) :precision binary64 (sqrt (/ 0.1111111111111111 x)))
double code(double x, double y) {
return sqrt((0.1111111111111111 / x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((0.1111111111111111d0 / x))
end function
public static double code(double x, double y) {
return Math.sqrt((0.1111111111111111 / x));
}
def code(x, y): return math.sqrt((0.1111111111111111 / x))
function code(x, y) return sqrt(Float64(0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = sqrt((0.1111111111111111 / x)); end
code[x_, y_] := N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\frac{0.1111111111111111}{x}}
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-*l*99.0%
associate--l+99.0%
distribute-lft-in99.0%
fma-define99.1%
sub-neg99.1%
+-commutative99.1%
distribute-lft-in99.1%
metadata-eval99.1%
metadata-eval99.1%
*-commutative99.1%
associate-/r*99.1%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 37.2%
metadata-eval37.2%
sqrt-prod37.4%
div-inv37.4%
pow1/237.4%
Applied egg-rr37.4%
unpow1/237.4%
Simplified37.4%
(FPCore (x y) :precision binary64 (* 3.0 (+ (* y (sqrt x)) (* (- (/ 1.0 (* x 9.0)) 1.0) (sqrt x)))))
double code(double x, double y) {
return 3.0 * ((y * sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 3.0d0 * ((y * sqrt(x)) + (((1.0d0 / (x * 9.0d0)) - 1.0d0) * sqrt(x)))
end function
public static double code(double x, double y) {
return 3.0 * ((y * Math.sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * Math.sqrt(x)));
}
def code(x, y): return 3.0 * ((y * math.sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * math.sqrt(x)))
function code(x, y) return Float64(3.0 * Float64(Float64(y * sqrt(x)) + Float64(Float64(Float64(1.0 / Float64(x * 9.0)) - 1.0) * sqrt(x)))) end
function tmp = code(x, y) tmp = 3.0 * ((y * sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * sqrt(x))); end
code[x_, y_] := N[(3.0 * N[(N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
3 \cdot \left(y \cdot \sqrt{x} + \left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right)
\end{array}
herbie shell --seed 2024137
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(! :herbie-platform default (* 3 (+ (* y (sqrt x)) (* (- (/ 1 (* x 9)) 1) (sqrt x)))))
(* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))