
(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 14 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%
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.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 3.0 (* y (sqrt x)))))
(if (<= y -21000.0)
t_0
(if (<= y -1.6e-131)
(sqrt (/ 0.1111111111111111 x))
(if (<= y 1.06e-98)
(* (sqrt x) -3.0)
(if (<= y 2.4e+69) (* 0.3333333333333333 (pow x -0.5)) t_0))))))
double code(double x, double y) {
double t_0 = 3.0 * (y * sqrt(x));
double tmp;
if (y <= -21000.0) {
tmp = t_0;
} else if (y <= -1.6e-131) {
tmp = sqrt((0.1111111111111111 / x));
} else if (y <= 1.06e-98) {
tmp = sqrt(x) * -3.0;
} else if (y <= 2.4e+69) {
tmp = 0.3333333333333333 * pow(x, -0.5);
} 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 = 3.0d0 * (y * sqrt(x))
if (y <= (-21000.0d0)) then
tmp = t_0
else if (y <= (-1.6d-131)) then
tmp = sqrt((0.1111111111111111d0 / x))
else if (y <= 1.06d-98) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 2.4d+69) then
tmp = 0.3333333333333333d0 * (x ** (-0.5d0))
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 tmp;
if (y <= -21000.0) {
tmp = t_0;
} else if (y <= -1.6e-131) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else if (y <= 1.06e-98) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 2.4e+69) {
tmp = 0.3333333333333333 * Math.pow(x, -0.5);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 3.0 * (y * math.sqrt(x)) tmp = 0 if y <= -21000.0: tmp = t_0 elif y <= -1.6e-131: tmp = math.sqrt((0.1111111111111111 / x)) elif y <= 1.06e-98: tmp = math.sqrt(x) * -3.0 elif y <= 2.4e+69: tmp = 0.3333333333333333 * math.pow(x, -0.5) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(3.0 * Float64(y * sqrt(x))) tmp = 0.0 if (y <= -21000.0) tmp = t_0; elseif (y <= -1.6e-131) tmp = sqrt(Float64(0.1111111111111111 / x)); elseif (y <= 1.06e-98) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 2.4e+69) tmp = Float64(0.3333333333333333 * (x ^ -0.5)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 3.0 * (y * sqrt(x)); tmp = 0.0; if (y <= -21000.0) tmp = t_0; elseif (y <= -1.6e-131) tmp = sqrt((0.1111111111111111 / x)); elseif (y <= 1.06e-98) tmp = sqrt(x) * -3.0; elseif (y <= 2.4e+69) tmp = 0.3333333333333333 * (x ^ -0.5); 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]}, If[LessEqual[y, -21000.0], t$95$0, If[LessEqual[y, -1.6e-131], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[y, 1.06e-98], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 2.4e+69], N[(0.3333333333333333 * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(y \cdot \sqrt{x}\right)\\
\mathbf{if}\;y \leq -21000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-131}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{-98}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+69}:\\
\;\;\;\;0.3333333333333333 \cdot {x}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -21000 or 2.4000000000000002e69 < y Initial program 99.6%
*-commutative99.6%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.4%
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.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 85.5%
if -21000 < y < -1.6e-131Initial program 99.6%
*-commutative99.6%
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.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 77.7%
metadata-eval77.7%
sqrt-prod77.8%
div-inv77.8%
pow1/277.8%
Applied egg-rr77.8%
unpow1/277.8%
Simplified77.8%
if -1.6e-131 < y < 1.0600000000000001e-98Initial program 99.4%
*-commutative99.4%
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 x around inf 58.1%
Taylor expanded in y around 0 58.1%
*-commutative58.1%
Simplified58.1%
if 1.0600000000000001e-98 < y < 2.4000000000000002e69Initial program 99.3%
*-commutative99.3%
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.3%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 57.1%
*-un-lft-identity57.1%
inv-pow57.1%
sqrt-pow157.1%
metadata-eval57.1%
Applied egg-rr57.1%
*-lft-identity57.1%
Simplified57.1%
Final simplification71.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sqrt x) (* y 3.0))))
(if (<= y -21000.0)
t_0
(if (<= y -9e-126)
(sqrt (/ 0.1111111111111111 x))
(if (<= y 1.95e-106)
(* (sqrt x) -3.0)
(if (<= y 5.3e+70) (* 0.3333333333333333 (pow x -0.5)) t_0))))))
double code(double x, double y) {
double t_0 = sqrt(x) * (y * 3.0);
double tmp;
if (y <= -21000.0) {
tmp = t_0;
} else if (y <= -9e-126) {
tmp = sqrt((0.1111111111111111 / x));
} else if (y <= 1.95e-106) {
tmp = sqrt(x) * -3.0;
} else if (y <= 5.3e+70) {
tmp = 0.3333333333333333 * pow(x, -0.5);
} 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) * (y * 3.0d0)
if (y <= (-21000.0d0)) then
tmp = t_0
else if (y <= (-9d-126)) then
tmp = sqrt((0.1111111111111111d0 / x))
else if (y <= 1.95d-106) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 5.3d+70) then
tmp = 0.3333333333333333d0 * (x ** (-0.5d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt(x) * (y * 3.0);
double tmp;
if (y <= -21000.0) {
tmp = t_0;
} else if (y <= -9e-126) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else if (y <= 1.95e-106) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 5.3e+70) {
tmp = 0.3333333333333333 * Math.pow(x, -0.5);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt(x) * (y * 3.0) tmp = 0 if y <= -21000.0: tmp = t_0 elif y <= -9e-126: tmp = math.sqrt((0.1111111111111111 / x)) elif y <= 1.95e-106: tmp = math.sqrt(x) * -3.0 elif y <= 5.3e+70: tmp = 0.3333333333333333 * math.pow(x, -0.5) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(sqrt(x) * Float64(y * 3.0)) tmp = 0.0 if (y <= -21000.0) tmp = t_0; elseif (y <= -9e-126) tmp = sqrt(Float64(0.1111111111111111 / x)); elseif (y <= 1.95e-106) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 5.3e+70) tmp = Float64(0.3333333333333333 * (x ^ -0.5)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt(x) * (y * 3.0); tmp = 0.0; if (y <= -21000.0) tmp = t_0; elseif (y <= -9e-126) tmp = sqrt((0.1111111111111111 / x)); elseif (y <= 1.95e-106) tmp = sqrt(x) * -3.0; elseif (y <= 5.3e+70) tmp = 0.3333333333333333 * (x ^ -0.5); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -21000.0], t$95$0, If[LessEqual[y, -9e-126], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], If[LessEqual[y, 1.95e-106], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 5.3e+70], N[(0.3333333333333333 * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{if}\;y \leq -21000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-126}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-106}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 5.3 \cdot 10^{+70}:\\
\;\;\;\;0.3333333333333333 \cdot {x}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -21000 or 5.3e70 < y Initial program 99.6%
*-commutative99.6%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.4%
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.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 85.5%
*-commutative85.5%
associate-*l*85.5%
*-commutative85.5%
Simplified85.5%
if -21000 < y < -9.0000000000000005e-126Initial program 99.6%
*-commutative99.6%
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.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 77.7%
metadata-eval77.7%
sqrt-prod77.8%
div-inv77.8%
pow1/277.8%
Applied egg-rr77.8%
unpow1/277.8%
Simplified77.8%
if -9.0000000000000005e-126 < y < 1.95000000000000005e-106Initial program 99.4%
*-commutative99.4%
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 x around inf 58.1%
Taylor expanded in y around 0 58.1%
*-commutative58.1%
Simplified58.1%
if 1.95000000000000005e-106 < y < 5.3e70Initial program 99.3%
*-commutative99.3%
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.3%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 57.1%
*-un-lft-identity57.1%
inv-pow57.1%
sqrt-pow157.1%
metadata-eval57.1%
Applied egg-rr57.1%
*-lft-identity57.1%
Simplified57.1%
Final simplification71.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sqrt x) (* y 3.0))))
(if (<= y -21000.0)
t_0
(if (<= y -7.5e-131)
(* (sqrt x) (/ 0.3333333333333333 x))
(if (<= y 2.7e-108)
(* (sqrt x) -3.0)
(if (<= y 4.6e+69) (* 0.3333333333333333 (pow x -0.5)) t_0))))))
double code(double x, double y) {
double t_0 = sqrt(x) * (y * 3.0);
double tmp;
if (y <= -21000.0) {
tmp = t_0;
} else if (y <= -7.5e-131) {
tmp = sqrt(x) * (0.3333333333333333 / x);
} else if (y <= 2.7e-108) {
tmp = sqrt(x) * -3.0;
} else if (y <= 4.6e+69) {
tmp = 0.3333333333333333 * pow(x, -0.5);
} 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) * (y * 3.0d0)
if (y <= (-21000.0d0)) then
tmp = t_0
else if (y <= (-7.5d-131)) then
tmp = sqrt(x) * (0.3333333333333333d0 / x)
else if (y <= 2.7d-108) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 4.6d+69) then
tmp = 0.3333333333333333d0 * (x ** (-0.5d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt(x) * (y * 3.0);
double tmp;
if (y <= -21000.0) {
tmp = t_0;
} else if (y <= -7.5e-131) {
tmp = Math.sqrt(x) * (0.3333333333333333 / x);
} else if (y <= 2.7e-108) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 4.6e+69) {
tmp = 0.3333333333333333 * Math.pow(x, -0.5);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt(x) * (y * 3.0) tmp = 0 if y <= -21000.0: tmp = t_0 elif y <= -7.5e-131: tmp = math.sqrt(x) * (0.3333333333333333 / x) elif y <= 2.7e-108: tmp = math.sqrt(x) * -3.0 elif y <= 4.6e+69: tmp = 0.3333333333333333 * math.pow(x, -0.5) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(sqrt(x) * Float64(y * 3.0)) tmp = 0.0 if (y <= -21000.0) tmp = t_0; elseif (y <= -7.5e-131) tmp = Float64(sqrt(x) * Float64(0.3333333333333333 / x)); elseif (y <= 2.7e-108) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 4.6e+69) tmp = Float64(0.3333333333333333 * (x ^ -0.5)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt(x) * (y * 3.0); tmp = 0.0; if (y <= -21000.0) tmp = t_0; elseif (y <= -7.5e-131) tmp = sqrt(x) * (0.3333333333333333 / x); elseif (y <= 2.7e-108) tmp = sqrt(x) * -3.0; elseif (y <= 4.6e+69) tmp = 0.3333333333333333 * (x ^ -0.5); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -21000.0], t$95$0, If[LessEqual[y, -7.5e-131], N[(N[Sqrt[x], $MachinePrecision] * N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-108], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 4.6e+69], N[(0.3333333333333333 * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{if}\;y \leq -21000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-131}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-108}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+69}:\\
\;\;\;\;0.3333333333333333 \cdot {x}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -21000 or 4.60000000000000033e69 < y Initial program 99.6%
*-commutative99.6%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.4%
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.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 85.5%
*-commutative85.5%
associate-*l*85.5%
*-commutative85.5%
Simplified85.5%
if -21000 < y < -7.49999999999999964e-131Initial program 99.6%
*-commutative99.6%
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.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 77.8%
if -7.49999999999999964e-131 < y < 2.70000000000000005e-108Initial program 99.4%
*-commutative99.4%
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 x around inf 58.1%
Taylor expanded in y around 0 58.1%
*-commutative58.1%
Simplified58.1%
if 2.70000000000000005e-108 < y < 4.60000000000000033e69Initial program 99.3%
*-commutative99.3%
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.3%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 57.1%
*-un-lft-identity57.1%
inv-pow57.1%
sqrt-pow157.1%
metadata-eval57.1%
Applied egg-rr57.1%
*-lft-identity57.1%
Simplified57.1%
Final simplification71.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* (sqrt x) 3.0))))
(if (<= y -21000.0)
t_0
(if (<= y -1.9e-128)
(* (sqrt x) (/ 0.3333333333333333 x))
(if (<= y 5e-101)
(* (sqrt x) -3.0)
(if (<= y 1.9e+69) (* 0.3333333333333333 (pow x -0.5)) t_0))))))
double code(double x, double y) {
double t_0 = y * (sqrt(x) * 3.0);
double tmp;
if (y <= -21000.0) {
tmp = t_0;
} else if (y <= -1.9e-128) {
tmp = sqrt(x) * (0.3333333333333333 / x);
} else if (y <= 5e-101) {
tmp = sqrt(x) * -3.0;
} else if (y <= 1.9e+69) {
tmp = 0.3333333333333333 * pow(x, -0.5);
} 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 = y * (sqrt(x) * 3.0d0)
if (y <= (-21000.0d0)) then
tmp = t_0
else if (y <= (-1.9d-128)) then
tmp = sqrt(x) * (0.3333333333333333d0 / x)
else if (y <= 5d-101) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 1.9d+69) then
tmp = 0.3333333333333333d0 * (x ** (-0.5d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (Math.sqrt(x) * 3.0);
double tmp;
if (y <= -21000.0) {
tmp = t_0;
} else if (y <= -1.9e-128) {
tmp = Math.sqrt(x) * (0.3333333333333333 / x);
} else if (y <= 5e-101) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 1.9e+69) {
tmp = 0.3333333333333333 * Math.pow(x, -0.5);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = y * (math.sqrt(x) * 3.0) tmp = 0 if y <= -21000.0: tmp = t_0 elif y <= -1.9e-128: tmp = math.sqrt(x) * (0.3333333333333333 / x) elif y <= 5e-101: tmp = math.sqrt(x) * -3.0 elif y <= 1.9e+69: tmp = 0.3333333333333333 * math.pow(x, -0.5) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(y * Float64(sqrt(x) * 3.0)) tmp = 0.0 if (y <= -21000.0) tmp = t_0; elseif (y <= -1.9e-128) tmp = Float64(sqrt(x) * Float64(0.3333333333333333 / x)); elseif (y <= 5e-101) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 1.9e+69) tmp = Float64(0.3333333333333333 * (x ^ -0.5)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = y * (sqrt(x) * 3.0); tmp = 0.0; if (y <= -21000.0) tmp = t_0; elseif (y <= -1.9e-128) tmp = sqrt(x) * (0.3333333333333333 / x); elseif (y <= 5e-101) tmp = sqrt(x) * -3.0; elseif (y <= 1.9e+69) tmp = 0.3333333333333333 * (x ^ -0.5); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -21000.0], t$95$0, If[LessEqual[y, -1.9e-128], N[(N[Sqrt[x], $MachinePrecision] * N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e-101], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 1.9e+69], N[(0.3333333333333333 * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{if}\;y \leq -21000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-128}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-101}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+69}:\\
\;\;\;\;0.3333333333333333 \cdot {x}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -21000 or 1.90000000000000014e69 < y 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.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 85.5%
associate-*r*85.7%
*-commutative85.7%
Simplified85.7%
if -21000 < y < -1.9000000000000001e-128Initial program 99.6%
*-commutative99.6%
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.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 77.8%
if -1.9000000000000001e-128 < y < 5.0000000000000001e-101Initial program 99.4%
*-commutative99.4%
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 x around inf 58.1%
Taylor expanded in y around 0 58.1%
*-commutative58.1%
Simplified58.1%
if 5.0000000000000001e-101 < y < 1.90000000000000014e69Initial program 99.3%
*-commutative99.3%
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.3%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 57.1%
*-un-lft-identity57.1%
inv-pow57.1%
sqrt-pow157.1%
metadata-eval57.1%
Applied egg-rr57.1%
*-lft-identity57.1%
Simplified57.1%
Final simplification72.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* (sqrt x) 3.0))))
(if (<= y -19000.0)
t_0
(if (<= y -3.8e-132)
(/ 1.0 (sqrt (* x 9.0)))
(if (<= y 1.05e-101)
(* (sqrt x) -3.0)
(if (<= y 1.05e+70) (* 0.3333333333333333 (pow x -0.5)) t_0))))))
double code(double x, double y) {
double t_0 = y * (sqrt(x) * 3.0);
double tmp;
if (y <= -19000.0) {
tmp = t_0;
} else if (y <= -3.8e-132) {
tmp = 1.0 / sqrt((x * 9.0));
} else if (y <= 1.05e-101) {
tmp = sqrt(x) * -3.0;
} else if (y <= 1.05e+70) {
tmp = 0.3333333333333333 * pow(x, -0.5);
} 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 = y * (sqrt(x) * 3.0d0)
if (y <= (-19000.0d0)) then
tmp = t_0
else if (y <= (-3.8d-132)) then
tmp = 1.0d0 / sqrt((x * 9.0d0))
else if (y <= 1.05d-101) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 1.05d+70) then
tmp = 0.3333333333333333d0 * (x ** (-0.5d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (Math.sqrt(x) * 3.0);
double tmp;
if (y <= -19000.0) {
tmp = t_0;
} else if (y <= -3.8e-132) {
tmp = 1.0 / Math.sqrt((x * 9.0));
} else if (y <= 1.05e-101) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 1.05e+70) {
tmp = 0.3333333333333333 * Math.pow(x, -0.5);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = y * (math.sqrt(x) * 3.0) tmp = 0 if y <= -19000.0: tmp = t_0 elif y <= -3.8e-132: tmp = 1.0 / math.sqrt((x * 9.0)) elif y <= 1.05e-101: tmp = math.sqrt(x) * -3.0 elif y <= 1.05e+70: tmp = 0.3333333333333333 * math.pow(x, -0.5) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(y * Float64(sqrt(x) * 3.0)) tmp = 0.0 if (y <= -19000.0) tmp = t_0; elseif (y <= -3.8e-132) tmp = Float64(1.0 / sqrt(Float64(x * 9.0))); elseif (y <= 1.05e-101) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 1.05e+70) tmp = Float64(0.3333333333333333 * (x ^ -0.5)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = y * (sqrt(x) * 3.0); tmp = 0.0; if (y <= -19000.0) tmp = t_0; elseif (y <= -3.8e-132) tmp = 1.0 / sqrt((x * 9.0)); elseif (y <= 1.05e-101) tmp = sqrt(x) * -3.0; elseif (y <= 1.05e+70) tmp = 0.3333333333333333 * (x ^ -0.5); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -19000.0], t$95$0, If[LessEqual[y, -3.8e-132], N[(1.0 / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e-101], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 1.05e+70], N[(0.3333333333333333 * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{if}\;y \leq -19000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-132}:\\
\;\;\;\;\frac{1}{\sqrt{x \cdot 9}}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-101}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+70}:\\
\;\;\;\;0.3333333333333333 \cdot {x}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -19000 or 1.05000000000000004e70 < y 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.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 85.5%
associate-*r*85.7%
*-commutative85.7%
Simplified85.7%
if -19000 < y < -3.7999999999999997e-132Initial program 99.6%
*-commutative99.6%
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.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 77.7%
metadata-eval77.7%
sqrt-prod77.8%
div-inv77.8%
pow1/277.8%
Applied egg-rr77.8%
unpow1/277.8%
Simplified77.8%
clear-num77.9%
sqrt-div78.0%
metadata-eval78.0%
div-inv78.0%
metadata-eval78.0%
Applied egg-rr78.0%
if -3.7999999999999997e-132 < y < 1.05000000000000008e-101Initial program 99.4%
*-commutative99.4%
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 x around inf 58.1%
Taylor expanded in y around 0 58.1%
*-commutative58.1%
Simplified58.1%
if 1.05000000000000008e-101 < y < 1.05000000000000004e70Initial program 99.3%
*-commutative99.3%
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.3%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 57.1%
*-un-lft-identity57.1%
inv-pow57.1%
sqrt-pow157.1%
metadata-eval57.1%
Applied egg-rr57.1%
*-lft-identity57.1%
Simplified57.1%
Final simplification72.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* (sqrt x) 3.0))))
(if (<= y -390.0)
t_0
(if (<= y -8.2e-129)
(/ 1.0 (sqrt (/ x 0.1111111111111111)))
(if (<= y 2.85e-101)
(* (sqrt x) -3.0)
(if (<= y 1.52e+69) (* 0.3333333333333333 (pow x -0.5)) t_0))))))
double code(double x, double y) {
double t_0 = y * (sqrt(x) * 3.0);
double tmp;
if (y <= -390.0) {
tmp = t_0;
} else if (y <= -8.2e-129) {
tmp = 1.0 / sqrt((x / 0.1111111111111111));
} else if (y <= 2.85e-101) {
tmp = sqrt(x) * -3.0;
} else if (y <= 1.52e+69) {
tmp = 0.3333333333333333 * pow(x, -0.5);
} 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 = y * (sqrt(x) * 3.0d0)
if (y <= (-390.0d0)) then
tmp = t_0
else if (y <= (-8.2d-129)) then
tmp = 1.0d0 / sqrt((x / 0.1111111111111111d0))
else if (y <= 2.85d-101) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 1.52d+69) then
tmp = 0.3333333333333333d0 * (x ** (-0.5d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (Math.sqrt(x) * 3.0);
double tmp;
if (y <= -390.0) {
tmp = t_0;
} else if (y <= -8.2e-129) {
tmp = 1.0 / Math.sqrt((x / 0.1111111111111111));
} else if (y <= 2.85e-101) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 1.52e+69) {
tmp = 0.3333333333333333 * Math.pow(x, -0.5);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = y * (math.sqrt(x) * 3.0) tmp = 0 if y <= -390.0: tmp = t_0 elif y <= -8.2e-129: tmp = 1.0 / math.sqrt((x / 0.1111111111111111)) elif y <= 2.85e-101: tmp = math.sqrt(x) * -3.0 elif y <= 1.52e+69: tmp = 0.3333333333333333 * math.pow(x, -0.5) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(y * Float64(sqrt(x) * 3.0)) tmp = 0.0 if (y <= -390.0) tmp = t_0; elseif (y <= -8.2e-129) tmp = Float64(1.0 / sqrt(Float64(x / 0.1111111111111111))); elseif (y <= 2.85e-101) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 1.52e+69) tmp = Float64(0.3333333333333333 * (x ^ -0.5)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = y * (sqrt(x) * 3.0); tmp = 0.0; if (y <= -390.0) tmp = t_0; elseif (y <= -8.2e-129) tmp = 1.0 / sqrt((x / 0.1111111111111111)); elseif (y <= 2.85e-101) tmp = sqrt(x) * -3.0; elseif (y <= 1.52e+69) tmp = 0.3333333333333333 * (x ^ -0.5); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -390.0], t$95$0, If[LessEqual[y, -8.2e-129], N[(1.0 / N[Sqrt[N[(x / 0.1111111111111111), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.85e-101], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 1.52e+69], N[(0.3333333333333333 * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{if}\;y \leq -390:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{-129}:\\
\;\;\;\;\frac{1}{\sqrt{\frac{x}{0.1111111111111111}}}\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{-101}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{+69}:\\
\;\;\;\;0.3333333333333333 \cdot {x}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -390 or 1.52e69 < y 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.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 85.5%
associate-*r*85.7%
*-commutative85.7%
Simplified85.7%
if -390 < y < -8.1999999999999999e-129Initial program 99.6%
*-commutative99.6%
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.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 77.7%
metadata-eval77.7%
sqrt-prod77.8%
div-inv77.8%
clear-num77.9%
sqrt-div78.0%
metadata-eval78.0%
Applied egg-rr78.0%
if -8.1999999999999999e-129 < y < 2.84999999999999992e-101Initial program 99.4%
*-commutative99.4%
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 x around inf 58.1%
Taylor expanded in y around 0 58.1%
*-commutative58.1%
Simplified58.1%
if 2.84999999999999992e-101 < y < 1.52e69Initial program 99.3%
*-commutative99.3%
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.3%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 57.1%
*-un-lft-identity57.1%
inv-pow57.1%
sqrt-pow157.1%
metadata-eval57.1%
Applied egg-rr57.1%
*-lft-identity57.1%
Simplified57.1%
Final simplification72.0%
(FPCore (x y) :precision binary64 (if (or (<= y -21000.0) (not (<= y 450000000000.0))) (* y (* (sqrt x) 3.0)) (* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))))
double code(double x, double y) {
double tmp;
if ((y <= -21000.0) || !(y <= 450000000000.0)) {
tmp = y * (sqrt(x) * 3.0);
} else {
tmp = sqrt(x) * ((0.3333333333333333 / 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 ((y <= (-21000.0d0)) .or. (.not. (y <= 450000000000.0d0))) then
tmp = y * (sqrt(x) * 3.0d0)
else
tmp = sqrt(x) * ((0.3333333333333333d0 / x) + (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -21000.0) || !(y <= 450000000000.0)) {
tmp = y * (Math.sqrt(x) * 3.0);
} else {
tmp = Math.sqrt(x) * ((0.3333333333333333 / x) + -3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -21000.0) or not (y <= 450000000000.0): tmp = y * (math.sqrt(x) * 3.0) else: tmp = math.sqrt(x) * ((0.3333333333333333 / x) + -3.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -21000.0) || !(y <= 450000000000.0)) tmp = Float64(y * Float64(sqrt(x) * 3.0)); else tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 / x) + -3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -21000.0) || ~((y <= 450000000000.0))) tmp = y * (sqrt(x) * 3.0); else tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -21000.0], N[Not[LessEqual[y, 450000000000.0]], $MachinePrecision]], N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -21000 \lor \neg \left(y \leq 450000000000\right):\\
\;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\
\end{array}
\end{array}
if y < -21000 or 4.5e11 < y 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.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 81.6%
associate-*r*81.8%
*-commutative81.8%
Simplified81.8%
if -21000 < y < 4.5e11Initial 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 0 97.5%
sub-neg97.5%
associate-*r/98.3%
metadata-eval98.3%
metadata-eval98.3%
+-commutative98.3%
Simplified98.3%
Final simplification90.2%
(FPCore (x y) :precision binary64 (if (or (<= y -5800.0) (not (<= y 4.8e-8))) (* (sqrt x) (- (* y 3.0) 3.0)) (* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))))
double code(double x, double y) {
double tmp;
if ((y <= -5800.0) || !(y <= 4.8e-8)) {
tmp = sqrt(x) * ((y * 3.0) - 3.0);
} else {
tmp = sqrt(x) * ((0.3333333333333333 / 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 ((y <= (-5800.0d0)) .or. (.not. (y <= 4.8d-8))) then
tmp = sqrt(x) * ((y * 3.0d0) - 3.0d0)
else
tmp = sqrt(x) * ((0.3333333333333333d0 / x) + (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -5800.0) || !(y <= 4.8e-8)) {
tmp = Math.sqrt(x) * ((y * 3.0) - 3.0);
} else {
tmp = Math.sqrt(x) * ((0.3333333333333333 / x) + -3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -5800.0) or not (y <= 4.8e-8): tmp = math.sqrt(x) * ((y * 3.0) - 3.0) else: tmp = math.sqrt(x) * ((0.3333333333333333 / x) + -3.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -5800.0) || !(y <= 4.8e-8)) tmp = Float64(sqrt(x) * Float64(Float64(y * 3.0) - 3.0)); else tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 / x) + -3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -5800.0) || ~((y <= 4.8e-8))) tmp = sqrt(x) * ((y * 3.0) - 3.0); else tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -5800.0], N[Not[LessEqual[y, 4.8e-8]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(y * 3.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5800 \lor \neg \left(y \leq 4.8 \cdot 10^{-8}\right):\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3 - 3\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\
\end{array}
\end{array}
if y < -5800 or 4.79999999999999997e-8 < y Initial program 99.6%
*-commutative99.6%
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.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 82.6%
if -5800 < y < 4.79999999999999997e-8Initial 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 0 98.3%
sub-neg98.3%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
+-commutative99.1%
Simplified99.1%
Final simplification90.9%
(FPCore (x y) :precision binary64 (if (or (<= y -36.0) (not (<= y 2.7e-8))) (* (sqrt (* x 9.0)) (+ y -1.0)) (* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))))
double code(double x, double y) {
double tmp;
if ((y <= -36.0) || !(y <= 2.7e-8)) {
tmp = sqrt((x * 9.0)) * (y + -1.0);
} else {
tmp = sqrt(x) * ((0.3333333333333333 / 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 ((y <= (-36.0d0)) .or. (.not. (y <= 2.7d-8))) then
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
else
tmp = sqrt(x) * ((0.3333333333333333d0 / x) + (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -36.0) || !(y <= 2.7e-8)) {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
} else {
tmp = Math.sqrt(x) * ((0.3333333333333333 / x) + -3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -36.0) or not (y <= 2.7e-8): tmp = math.sqrt((x * 9.0)) * (y + -1.0) else: tmp = math.sqrt(x) * ((0.3333333333333333 / x) + -3.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -36.0) || !(y <= 2.7e-8)) tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); else tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 / x) + -3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -36.0) || ~((y <= 2.7e-8))) tmp = sqrt((x * 9.0)) * (y + -1.0); else tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -36.0], N[Not[LessEqual[y, 2.7e-8]], $MachinePrecision]], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -36 \lor \neg \left(y \leq 2.7 \cdot 10^{-8}\right):\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\
\end{array}
\end{array}
if y < -36 or 2.70000000000000002e-8 < y Initial program 99.6%
Taylor expanded in y around inf 82.8%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
Applied egg-rr82.9%
if -36 < y < 2.70000000000000002e-8Initial 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 0 98.3%
sub-neg98.3%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
+-commutative99.1%
Simplified99.1%
Final simplification91.0%
(FPCore (x y) :precision binary64 (* (sqrt x) (+ (+ (/ 0.3333333333333333 x) -3.0) (* y 3.0))))
double code(double x, double y) {
return sqrt(x) * (((0.3333333333333333 / x) + -3.0) + (y * 3.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(x) * (((0.3333333333333333d0 / x) + (-3.0d0)) + (y * 3.0d0))
end function
public static double code(double x, double y) {
return Math.sqrt(x) * (((0.3333333333333333 / x) + -3.0) + (y * 3.0));
}
def code(x, y): return math.sqrt(x) * (((0.3333333333333333 / x) + -3.0) + (y * 3.0))
function code(x, y) return Float64(sqrt(x) * Float64(Float64(Float64(0.3333333333333333 / x) + -3.0) + Float64(y * 3.0))) end
function tmp = code(x, y) tmp = sqrt(x) * (((0.3333333333333333 / x) + -3.0) + (y * 3.0)); end
code[x_, y_] := N[(N[Sqrt[x], $MachinePrecision] * N[(N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision] + N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x} \cdot \left(\left(\frac{0.3333333333333333}{x} + -3\right) + y \cdot 3\right)
\end{array}
Initial program 99.5%
*-commutative99.5%
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%
fma-undefine99.4%
+-commutative99.4%
+-commutative99.4%
Applied egg-rr99.4%
Final simplification99.4%
(FPCore (x y) :precision binary64 (if (<= x 2.9e-5) (sqrt (/ 0.1111111111111111 x)) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if (x <= 2.9e-5) {
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 <= 2.9d-5) 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 <= 2.9e-5) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2.9e-5: tmp = math.sqrt((0.1111111111111111 / x)) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 2.9e-5) 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 <= 2.9e-5) tmp = sqrt((0.1111111111111111 / x)); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2.9e-5], 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 2.9 \cdot 10^{-5}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 2.9e-5Initial 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.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 71.7%
metadata-eval71.7%
sqrt-prod71.9%
div-inv72.7%
pow1/272.7%
Applied egg-rr72.7%
unpow1/272.7%
Simplified72.7%
if 2.9e-5 < x 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.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 97.9%
Taylor expanded in y around 0 45.4%
*-commutative45.4%
Simplified45.4%
Final simplification58.2%
(FPCore (x y) :precision binary64 (sqrt (* x 9.0)))
double code(double x, double y) {
return sqrt((x * 9.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((x * 9.0d0))
end function
public static double code(double x, double y) {
return Math.sqrt((x * 9.0));
}
def code(x, y): return math.sqrt((x * 9.0))
function code(x, y) return sqrt(Float64(x * 9.0)) end
function tmp = code(x, y) tmp = sqrt((x * 9.0)); end
code[x_, y_] := N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x \cdot 9}
\end{array}
Initial program 99.5%
*-commutative99.5%
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 x around inf 64.6%
Taylor expanded in y around 0 25.1%
*-commutative25.1%
Simplified25.1%
add-sqr-sqrt0.0%
sqrt-unprod3.3%
swap-sqr3.3%
add-sqr-sqrt3.3%
metadata-eval3.3%
Applied egg-rr3.3%
Final simplification3.3%
(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.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 x around 0 34.7%
metadata-eval34.7%
sqrt-prod34.8%
div-inv35.1%
pow1/235.1%
Applied egg-rr35.1%
unpow1/235.1%
Simplified35.1%
Final simplification35.1%
(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 2024079
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(* 3.0 (+ (* y (sqrt x)) (* (- (/ 1.0 (* x 9.0)) 1.0) (sqrt x))))
(* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))