
(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 12 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 (* (sqrt (* x 9.0)) (+ (/ 0.1111111111111111 x) (+ y -1.0))))
double code(double x, double y) {
return sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((x * 9.0d0)) * ((0.1111111111111111d0 / x) + (y + (-1.0d0)))
end function
public static double code(double x, double y) {
return Math.sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0));
}
def code(x, y): return math.sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0))
function code(x, y) return Float64(sqrt(Float64(x * 9.0)) * Float64(Float64(0.1111111111111111 / x) + Float64(y + -1.0))) end
function tmp = code(x, y) tmp = sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0)); end
code[x_, y_] := N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(N[(0.1111111111111111 / x), $MachinePrecision] + N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x \cdot 9} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)
\end{array}
Initial program 99.5%
+-commutative99.5%
associate--l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (sqrt (* x 9.0))) (t_1 (pow (* x 9.0) -0.5)))
(if (<= y -2.9e+57)
(* t_0 y)
(if (<= y 5.4e-221)
t_1
(if (<= y 1.26e-142)
(- t_0)
(if (<= y 1.14e+117) t_1 (* 3.0 (* y (sqrt x)))))))))
double code(double x, double y) {
double t_0 = sqrt((x * 9.0));
double t_1 = pow((x * 9.0), -0.5);
double tmp;
if (y <= -2.9e+57) {
tmp = t_0 * y;
} else if (y <= 5.4e-221) {
tmp = t_1;
} else if (y <= 1.26e-142) {
tmp = -t_0;
} else if (y <= 1.14e+117) {
tmp = t_1;
} else {
tmp = 3.0 * (y * sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt((x * 9.0d0))
t_1 = (x * 9.0d0) ** (-0.5d0)
if (y <= (-2.9d+57)) then
tmp = t_0 * y
else if (y <= 5.4d-221) then
tmp = t_1
else if (y <= 1.26d-142) then
tmp = -t_0
else if (y <= 1.14d+117) then
tmp = t_1
else
tmp = 3.0d0 * (y * sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt((x * 9.0));
double t_1 = Math.pow((x * 9.0), -0.5);
double tmp;
if (y <= -2.9e+57) {
tmp = t_0 * y;
} else if (y <= 5.4e-221) {
tmp = t_1;
} else if (y <= 1.26e-142) {
tmp = -t_0;
} else if (y <= 1.14e+117) {
tmp = t_1;
} else {
tmp = 3.0 * (y * Math.sqrt(x));
}
return tmp;
}
def code(x, y): t_0 = math.sqrt((x * 9.0)) t_1 = math.pow((x * 9.0), -0.5) tmp = 0 if y <= -2.9e+57: tmp = t_0 * y elif y <= 5.4e-221: tmp = t_1 elif y <= 1.26e-142: tmp = -t_0 elif y <= 1.14e+117: tmp = t_1 else: tmp = 3.0 * (y * math.sqrt(x)) return tmp
function code(x, y) t_0 = sqrt(Float64(x * 9.0)) t_1 = Float64(x * 9.0) ^ -0.5 tmp = 0.0 if (y <= -2.9e+57) tmp = Float64(t_0 * y); elseif (y <= 5.4e-221) tmp = t_1; elseif (y <= 1.26e-142) tmp = Float64(-t_0); elseif (y <= 1.14e+117) tmp = t_1; else tmp = Float64(3.0 * Float64(y * sqrt(x))); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt((x * 9.0)); t_1 = (x * 9.0) ^ -0.5; tmp = 0.0; if (y <= -2.9e+57) tmp = t_0 * y; elseif (y <= 5.4e-221) tmp = t_1; elseif (y <= 1.26e-142) tmp = -t_0; elseif (y <= 1.14e+117) tmp = t_1; else tmp = 3.0 * (y * sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[y, -2.9e+57], N[(t$95$0 * y), $MachinePrecision], If[LessEqual[y, 5.4e-221], t$95$1, If[LessEqual[y, 1.26e-142], (-t$95$0), If[LessEqual[y, 1.14e+117], t$95$1, N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x \cdot 9}\\
t_1 := {\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+57}:\\
\;\;\;\;t\_0 \cdot y\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{-142}:\\
\;\;\;\;-t\_0\\
\mathbf{elif}\;y \leq 1.14 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\
\end{array}
\end{array}
if y < -2.9000000000000002e57Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 86.0%
if -2.9000000000000002e57 < y < 5.4e-221 or 1.26000000000000007e-142 < y < 1.13999999999999997e117Initial 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 x around 0 59.7%
metadata-eval59.7%
sqrt-prod59.9%
div-inv59.9%
pow1/259.9%
Applied egg-rr59.9%
unpow1/259.9%
Simplified59.9%
sqrt-div59.7%
clear-num59.7%
sqrt-div59.8%
pow1/259.8%
pow-flip59.9%
div-inv60.0%
metadata-eval60.0%
metadata-eval60.0%
Applied egg-rr60.0%
if 5.4e-221 < y < 1.26000000000000007e-142Initial program 99.5%
+-commutative99.5%
associate--l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
sub-neg99.9%
associate-*r/99.9%
metadata-eval99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 76.8%
if 1.13999999999999997e117 < y Initial program 99.6%
*-commutative99.6%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
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.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 97.1%
Final simplification72.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (pow (* x 9.0) -0.5)))
(if (<= y -2.5e+57)
(* (sqrt x) (* y 3.0))
(if (<= y 8.6e-221)
t_0
(if (<= y 4.5e-143)
(- (sqrt (* x 9.0)))
(if (<= y 1.65e+109) t_0 (* 3.0 (* y (sqrt x)))))))))
double code(double x, double y) {
double t_0 = pow((x * 9.0), -0.5);
double tmp;
if (y <= -2.5e+57) {
tmp = sqrt(x) * (y * 3.0);
} else if (y <= 8.6e-221) {
tmp = t_0;
} else if (y <= 4.5e-143) {
tmp = -sqrt((x * 9.0));
} else if (y <= 1.65e+109) {
tmp = t_0;
} else {
tmp = 3.0 * (y * sqrt(x));
}
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 = (x * 9.0d0) ** (-0.5d0)
if (y <= (-2.5d+57)) then
tmp = sqrt(x) * (y * 3.0d0)
else if (y <= 8.6d-221) then
tmp = t_0
else if (y <= 4.5d-143) then
tmp = -sqrt((x * 9.0d0))
else if (y <= 1.65d+109) then
tmp = t_0
else
tmp = 3.0d0 * (y * sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.pow((x * 9.0), -0.5);
double tmp;
if (y <= -2.5e+57) {
tmp = Math.sqrt(x) * (y * 3.0);
} else if (y <= 8.6e-221) {
tmp = t_0;
} else if (y <= 4.5e-143) {
tmp = -Math.sqrt((x * 9.0));
} else if (y <= 1.65e+109) {
tmp = t_0;
} else {
tmp = 3.0 * (y * Math.sqrt(x));
}
return tmp;
}
def code(x, y): t_0 = math.pow((x * 9.0), -0.5) tmp = 0 if y <= -2.5e+57: tmp = math.sqrt(x) * (y * 3.0) elif y <= 8.6e-221: tmp = t_0 elif y <= 4.5e-143: tmp = -math.sqrt((x * 9.0)) elif y <= 1.65e+109: tmp = t_0 else: tmp = 3.0 * (y * math.sqrt(x)) return tmp
function code(x, y) t_0 = Float64(x * 9.0) ^ -0.5 tmp = 0.0 if (y <= -2.5e+57) tmp = Float64(sqrt(x) * Float64(y * 3.0)); elseif (y <= 8.6e-221) tmp = t_0; elseif (y <= 4.5e-143) tmp = Float64(-sqrt(Float64(x * 9.0))); elseif (y <= 1.65e+109) tmp = t_0; else tmp = Float64(3.0 * Float64(y * sqrt(x))); end return tmp end
function tmp_2 = code(x, y) t_0 = (x * 9.0) ^ -0.5; tmp = 0.0; if (y <= -2.5e+57) tmp = sqrt(x) * (y * 3.0); elseif (y <= 8.6e-221) tmp = t_0; elseif (y <= 4.5e-143) tmp = -sqrt((x * 9.0)); elseif (y <= 1.65e+109) tmp = t_0; else tmp = 3.0 * (y * sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[y, -2.5e+57], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e-221], t$95$0, If[LessEqual[y, 4.5e-143], (-N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), If[LessEqual[y, 1.65e+109], t$95$0, N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+57}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{-221}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-143}:\\
\;\;\;\;-\sqrt{x \cdot 9}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+109}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\
\end{array}
\end{array}
if y < -2.49999999999999986e57Initial program 99.6%
*-commutative99.6%
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.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 85.9%
*-commutative85.9%
associate-*l*85.9%
*-commutative85.9%
Simplified85.9%
if -2.49999999999999986e57 < y < 8.5999999999999996e-221 or 4.5e-143 < y < 1.6499999999999999e109Initial 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 x around 0 59.7%
metadata-eval59.7%
sqrt-prod59.9%
div-inv59.9%
pow1/259.9%
Applied egg-rr59.9%
unpow1/259.9%
Simplified59.9%
sqrt-div59.7%
clear-num59.7%
sqrt-div59.8%
pow1/259.8%
pow-flip59.9%
div-inv60.0%
metadata-eval60.0%
metadata-eval60.0%
Applied egg-rr60.0%
if 8.5999999999999996e-221 < y < 4.5e-143Initial program 99.5%
+-commutative99.5%
associate--l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
sub-neg99.9%
associate-*r/99.9%
metadata-eval99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 76.8%
if 1.6499999999999999e109 < y Initial program 99.6%
*-commutative99.6%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
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.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 97.1%
Final simplification72.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (pow (* x 9.0) -0.5)))
(if (<= y -8.5e+57)
(* (sqrt x) (* y 3.0))
(if (<= y 2.7e-221)
t_0
(if (<= y 2.6e-142)
(* (sqrt x) -3.0)
(if (<= y 1.65e+109) t_0 (* 3.0 (* y (sqrt x)))))))))
double code(double x, double y) {
double t_0 = pow((x * 9.0), -0.5);
double tmp;
if (y <= -8.5e+57) {
tmp = sqrt(x) * (y * 3.0);
} else if (y <= 2.7e-221) {
tmp = t_0;
} else if (y <= 2.6e-142) {
tmp = sqrt(x) * -3.0;
} else if (y <= 1.65e+109) {
tmp = t_0;
} else {
tmp = 3.0 * (y * sqrt(x));
}
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 = (x * 9.0d0) ** (-0.5d0)
if (y <= (-8.5d+57)) then
tmp = sqrt(x) * (y * 3.0d0)
else if (y <= 2.7d-221) then
tmp = t_0
else if (y <= 2.6d-142) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 1.65d+109) then
tmp = t_0
else
tmp = 3.0d0 * (y * sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.pow((x * 9.0), -0.5);
double tmp;
if (y <= -8.5e+57) {
tmp = Math.sqrt(x) * (y * 3.0);
} else if (y <= 2.7e-221) {
tmp = t_0;
} else if (y <= 2.6e-142) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 1.65e+109) {
tmp = t_0;
} else {
tmp = 3.0 * (y * Math.sqrt(x));
}
return tmp;
}
def code(x, y): t_0 = math.pow((x * 9.0), -0.5) tmp = 0 if y <= -8.5e+57: tmp = math.sqrt(x) * (y * 3.0) elif y <= 2.7e-221: tmp = t_0 elif y <= 2.6e-142: tmp = math.sqrt(x) * -3.0 elif y <= 1.65e+109: tmp = t_0 else: tmp = 3.0 * (y * math.sqrt(x)) return tmp
function code(x, y) t_0 = Float64(x * 9.0) ^ -0.5 tmp = 0.0 if (y <= -8.5e+57) tmp = Float64(sqrt(x) * Float64(y * 3.0)); elseif (y <= 2.7e-221) tmp = t_0; elseif (y <= 2.6e-142) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 1.65e+109) tmp = t_0; else tmp = Float64(3.0 * Float64(y * sqrt(x))); end return tmp end
function tmp_2 = code(x, y) t_0 = (x * 9.0) ^ -0.5; tmp = 0.0; if (y <= -8.5e+57) tmp = sqrt(x) * (y * 3.0); elseif (y <= 2.7e-221) tmp = t_0; elseif (y <= 2.6e-142) tmp = sqrt(x) * -3.0; elseif (y <= 1.65e+109) tmp = t_0; else tmp = 3.0 * (y * sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[y, -8.5e+57], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-221], t$95$0, If[LessEqual[y, 2.6e-142], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 1.65e+109], t$95$0, N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+57}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-221}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-142}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+109}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\
\end{array}
\end{array}
if y < -8.5000000000000001e57Initial program 99.6%
*-commutative99.6%
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.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 85.9%
*-commutative85.9%
associate-*l*85.9%
*-commutative85.9%
Simplified85.9%
if -8.5000000000000001e57 < y < 2.7e-221 or 2.6e-142 < y < 1.6499999999999999e109Initial 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 x around 0 59.7%
metadata-eval59.7%
sqrt-prod59.9%
div-inv59.9%
pow1/259.9%
Applied egg-rr59.9%
unpow1/259.9%
Simplified59.9%
sqrt-div59.7%
clear-num59.7%
sqrt-div59.8%
pow1/259.8%
pow-flip59.9%
div-inv60.0%
metadata-eval60.0%
metadata-eval60.0%
Applied egg-rr60.0%
if 2.7e-221 < y < 2.6e-142Initial program 99.5%
+-commutative99.5%
associate--l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
sub-neg99.9%
associate-*r/99.9%
metadata-eval99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 76.6%
*-commutative76.6%
Simplified76.6%
if 1.6499999999999999e109 < y Initial program 99.6%
*-commutative99.6%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
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.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 97.1%
Final simplification72.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 3.0 (* y (sqrt x)))) (t_1 (pow (* x 9.0) -0.5)))
(if (<= y -3.5e+57)
t_0
(if (<= y 1.32e-220)
t_1
(if (<= y 3.8e-143) (* (sqrt x) -3.0) (if (<= y 6.8e+119) t_1 t_0))))))
double code(double x, double y) {
double t_0 = 3.0 * (y * sqrt(x));
double t_1 = pow((x * 9.0), -0.5);
double tmp;
if (y <= -3.5e+57) {
tmp = t_0;
} else if (y <= 1.32e-220) {
tmp = t_1;
} else if (y <= 3.8e-143) {
tmp = sqrt(x) * -3.0;
} else if (y <= 6.8e+119) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = 3.0d0 * (y * sqrt(x))
t_1 = (x * 9.0d0) ** (-0.5d0)
if (y <= (-3.5d+57)) then
tmp = t_0
else if (y <= 1.32d-220) then
tmp = t_1
else if (y <= 3.8d-143) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 6.8d+119) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 3.0 * (y * Math.sqrt(x));
double t_1 = Math.pow((x * 9.0), -0.5);
double tmp;
if (y <= -3.5e+57) {
tmp = t_0;
} else if (y <= 1.32e-220) {
tmp = t_1;
} else if (y <= 3.8e-143) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 6.8e+119) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 3.0 * (y * math.sqrt(x)) t_1 = math.pow((x * 9.0), -0.5) tmp = 0 if y <= -3.5e+57: tmp = t_0 elif y <= 1.32e-220: tmp = t_1 elif y <= 3.8e-143: tmp = math.sqrt(x) * -3.0 elif y <= 6.8e+119: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(3.0 * Float64(y * sqrt(x))) t_1 = Float64(x * 9.0) ^ -0.5 tmp = 0.0 if (y <= -3.5e+57) tmp = t_0; elseif (y <= 1.32e-220) tmp = t_1; elseif (y <= 3.8e-143) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 6.8e+119) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 3.0 * (y * sqrt(x)); t_1 = (x * 9.0) ^ -0.5; tmp = 0.0; if (y <= -3.5e+57) tmp = t_0; elseif (y <= 1.32e-220) tmp = t_1; elseif (y <= 3.8e-143) tmp = sqrt(x) * -3.0; elseif (y <= 6.8e+119) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[y, -3.5e+57], t$95$0, If[LessEqual[y, 1.32e-220], t$95$1, If[LessEqual[y, 3.8e-143], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 6.8e+119], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(y \cdot \sqrt{x}\right)\\
t_1 := {\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{+57}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{-220}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-143}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -3.4999999999999997e57 or 6.80000000000000027e119 < y Initial program 99.6%
*-commutative99.6%
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 90.0%
if -3.4999999999999997e57 < y < 1.31999999999999996e-220 or 3.79999999999999981e-143 < y < 6.80000000000000027e119Initial 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 x around 0 59.7%
metadata-eval59.7%
sqrt-prod59.9%
div-inv59.9%
pow1/259.9%
Applied egg-rr59.9%
unpow1/259.9%
Simplified59.9%
sqrt-div59.7%
clear-num59.7%
sqrt-div59.8%
pow1/259.8%
pow-flip59.9%
div-inv60.0%
metadata-eval60.0%
metadata-eval60.0%
Applied egg-rr60.0%
if 1.31999999999999996e-220 < y < 3.79999999999999981e-143Initial program 99.5%
+-commutative99.5%
associate--l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
sub-neg99.9%
associate-*r/99.9%
metadata-eval99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 76.6%
*-commutative76.6%
Simplified76.6%
Final simplification72.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (sqrt (* x 9.0))))
(if (<= y -5e+57)
(* t_0 y)
(if (<= y 1.65e+109)
(* t_0 (+ (/ 0.1111111111111111 x) -1.0))
(* 3.0 (* y (sqrt x)))))))
double code(double x, double y) {
double t_0 = sqrt((x * 9.0));
double tmp;
if (y <= -5e+57) {
tmp = t_0 * y;
} else if (y <= 1.65e+109) {
tmp = t_0 * ((0.1111111111111111 / x) + -1.0);
} else {
tmp = 3.0 * (y * sqrt(x));
}
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 * 9.0d0))
if (y <= (-5d+57)) then
tmp = t_0 * y
else if (y <= 1.65d+109) then
tmp = t_0 * ((0.1111111111111111d0 / x) + (-1.0d0))
else
tmp = 3.0d0 * (y * sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt((x * 9.0));
double tmp;
if (y <= -5e+57) {
tmp = t_0 * y;
} else if (y <= 1.65e+109) {
tmp = t_0 * ((0.1111111111111111 / x) + -1.0);
} else {
tmp = 3.0 * (y * Math.sqrt(x));
}
return tmp;
}
def code(x, y): t_0 = math.sqrt((x * 9.0)) tmp = 0 if y <= -5e+57: tmp = t_0 * y elif y <= 1.65e+109: tmp = t_0 * ((0.1111111111111111 / x) + -1.0) else: tmp = 3.0 * (y * math.sqrt(x)) return tmp
function code(x, y) t_0 = sqrt(Float64(x * 9.0)) tmp = 0.0 if (y <= -5e+57) tmp = Float64(t_0 * y); elseif (y <= 1.65e+109) tmp = Float64(t_0 * Float64(Float64(0.1111111111111111 / x) + -1.0)); else tmp = Float64(3.0 * Float64(y * sqrt(x))); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt((x * 9.0)); tmp = 0.0; if (y <= -5e+57) tmp = t_0 * y; elseif (y <= 1.65e+109) tmp = t_0 * ((0.1111111111111111 / x) + -1.0); else tmp = 3.0 * (y * sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -5e+57], N[(t$95$0 * y), $MachinePrecision], If[LessEqual[y, 1.65e+109], N[(t$95$0 * N[(N[(0.1111111111111111 / x), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x \cdot 9}\\
\mathbf{if}\;y \leq -5 \cdot 10^{+57}:\\
\;\;\;\;t\_0 \cdot y\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+109}:\\
\;\;\;\;t\_0 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\
\end{array}
\end{array}
if y < -4.99999999999999972e57Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 86.0%
if -4.99999999999999972e57 < y < 1.6499999999999999e109Initial program 99.4%
+-commutative99.4%
associate--l+99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around 0 92.3%
sub-neg92.3%
associate-*r/92.4%
metadata-eval92.4%
metadata-eval92.4%
+-commutative92.4%
Simplified92.4%
if 1.6499999999999999e109 < y Initial program 99.6%
*-commutative99.6%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
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.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 97.1%
Final simplification91.6%
(FPCore (x y)
:precision binary64
(if (<= y -2.9e+57)
(* (sqrt (* x 9.0)) y)
(if (<= y 4.8e+119)
(* (sqrt x) (- -3.0 (/ -0.3333333333333333 x)))
(* 3.0 (* y (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -2.9e+57) {
tmp = sqrt((x * 9.0)) * y;
} else if (y <= 4.8e+119) {
tmp = sqrt(x) * (-3.0 - (-0.3333333333333333 / x));
} else {
tmp = 3.0 * (y * sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-2.9d+57)) then
tmp = sqrt((x * 9.0d0)) * y
else if (y <= 4.8d+119) then
tmp = sqrt(x) * ((-3.0d0) - ((-0.3333333333333333d0) / x))
else
tmp = 3.0d0 * (y * sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.9e+57) {
tmp = Math.sqrt((x * 9.0)) * y;
} else if (y <= 4.8e+119) {
tmp = Math.sqrt(x) * (-3.0 - (-0.3333333333333333 / x));
} else {
tmp = 3.0 * (y * Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.9e+57: tmp = math.sqrt((x * 9.0)) * y elif y <= 4.8e+119: tmp = math.sqrt(x) * (-3.0 - (-0.3333333333333333 / x)) else: tmp = 3.0 * (y * math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.9e+57) tmp = Float64(sqrt(Float64(x * 9.0)) * y); elseif (y <= 4.8e+119) tmp = Float64(sqrt(x) * Float64(-3.0 - Float64(-0.3333333333333333 / x))); else tmp = Float64(3.0 * Float64(y * sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.9e+57) tmp = sqrt((x * 9.0)) * y; elseif (y <= 4.8e+119) tmp = sqrt(x) * (-3.0 - (-0.3333333333333333 / x)); else tmp = 3.0 * (y * sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.9e+57], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 4.8e+119], N[(N[Sqrt[x], $MachinePrecision] * N[(-3.0 - N[(-0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+57}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot y\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+119}:\\
\;\;\;\;\sqrt{x} \cdot \left(-3 - \frac{-0.3333333333333333}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\
\end{array}
\end{array}
if y < -2.9000000000000002e57Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 86.0%
if -2.9000000000000002e57 < y < 4.8e119Initial 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.5%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 92.2%
sub-neg92.2%
metadata-eval92.2%
associate-*r/92.3%
metadata-eval92.3%
+-commutative92.3%
metadata-eval92.3%
distribute-neg-frac92.3%
unsub-neg92.3%
Simplified92.3%
if 4.8e119 < y Initial program 99.6%
*-commutative99.6%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
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.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 97.1%
Final simplification91.5%
(FPCore (x y) :precision binary64 (if (<= x 0.112) (/ (* (sqrt x) (+ (/ 0.1111111111111111 x) y)) 0.3333333333333333) (* (sqrt (* x 9.0)) (+ y -1.0))))
double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = (sqrt(x) * ((0.1111111111111111 / x) + y)) / 0.3333333333333333;
} 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 <= 0.112d0) then
tmp = (sqrt(x) * ((0.1111111111111111d0 / x) + y)) / 0.3333333333333333d0
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 <= 0.112) {
tmp = (Math.sqrt(x) * ((0.1111111111111111 / x) + y)) / 0.3333333333333333;
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.112: tmp = (math.sqrt(x) * ((0.1111111111111111 / x) + y)) / 0.3333333333333333 else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.112) tmp = Float64(Float64(sqrt(x) * Float64(Float64(0.1111111111111111 / x) + y)) / 0.3333333333333333); 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 <= 0.112) tmp = (sqrt(x) * ((0.1111111111111111 / x) + y)) / 0.3333333333333333; else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.112], N[(N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.1111111111111111 / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] / 0.3333333333333333), $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 0.112:\\
\;\;\;\;\frac{\sqrt{x} \cdot \left(\frac{0.1111111111111111}{x} + y\right)}{0.3333333333333333}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if x < 0.112000000000000002Initial program 99.4%
+-commutative99.4%
associate--l+99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
*-commutative99.4%
metadata-eval99.4%
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%
*-commutative99.4%
sqrt-div99.4%
associate-*r/99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in y around inf 99.0%
if 0.112000000000000002 < x Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in x around inf 99.9%
Final simplification99.4%
(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.5%
*-commutative99.5%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.5%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
fma-undefine99.5%
+-commutative99.5%
associate-+r+99.5%
Applied egg-rr99.5%
Final simplification99.5%
(FPCore (x y) :precision binary64 (if (<= x 0.112) (pow (* x 9.0) -0.5) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = pow((x * 9.0), -0.5);
} 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 <= 0.112d0) then
tmp = (x * 9.0d0) ** (-0.5d0)
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = Math.pow((x * 9.0), -0.5);
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.112: tmp = math.pow((x * 9.0), -0.5) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.112) tmp = Float64(x * 9.0) ^ -0.5; else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.112) tmp = (x * 9.0) ^ -0.5; else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.112], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.112:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 0.112000000000000002Initial program 99.4%
*-commutative99.4%
associate-*l*99.3%
associate--l+99.3%
distribute-lft-in99.3%
fma-define99.3%
sub-neg99.3%
+-commutative99.3%
distribute-lft-in99.3%
metadata-eval99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 70.9%
metadata-eval70.9%
sqrt-prod71.1%
div-inv71.1%
pow1/271.1%
Applied egg-rr71.1%
unpow1/271.1%
Simplified71.1%
sqrt-div70.9%
clear-num70.9%
sqrt-div71.0%
pow1/271.0%
pow-flip71.1%
div-inv71.1%
metadata-eval71.1%
metadata-eval71.1%
Applied egg-rr71.1%
if 0.112000000000000002 < x Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in y around 0 51.2%
sub-neg51.2%
associate-*r/51.2%
metadata-eval51.2%
metadata-eval51.2%
+-commutative51.2%
Simplified51.2%
Taylor expanded in x around inf 51.0%
*-commutative51.0%
Simplified51.0%
(FPCore (x y) :precision binary64 (if (<= x 0.112) (sqrt (/ 0.1111111111111111 x)) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if (x <= 0.112) {
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 <= 0.112d0) 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 <= 0.112) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.112: tmp = math.sqrt((0.1111111111111111 / x)) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.112) 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 <= 0.112) tmp = sqrt((0.1111111111111111 / x)); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.112], 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 0.112:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 0.112000000000000002Initial program 99.4%
*-commutative99.4%
associate-*l*99.3%
associate--l+99.3%
distribute-lft-in99.3%
fma-define99.3%
sub-neg99.3%
+-commutative99.3%
distribute-lft-in99.3%
metadata-eval99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 70.9%
metadata-eval70.9%
sqrt-prod71.1%
div-inv71.1%
pow1/271.1%
Applied egg-rr71.1%
unpow1/271.1%
Simplified71.1%
if 0.112000000000000002 < x Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in y around 0 51.2%
sub-neg51.2%
associate-*r/51.2%
metadata-eval51.2%
metadata-eval51.2%
+-commutative51.2%
Simplified51.2%
Taylor expanded in x around inf 51.0%
*-commutative51.0%
Simplified51.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.5%
*-commutative99.5%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.5%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 38.8%
metadata-eval38.8%
sqrt-prod38.9%
div-inv38.9%
pow1/238.9%
Applied egg-rr38.9%
unpow1/238.9%
Simplified38.9%
(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 2024185
(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)))