
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 4e-217) (+ (+ (/ 1.0 (* y (/ (* z 3.0) t))) x) (/ y (* z -3.0))) (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 4e-217) {
tmp = ((1.0 / (y * ((z * 3.0) / t))) + x) + (y / (z * -3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= 4d-217) then
tmp = ((1.0d0 / (y * ((z * 3.0d0) / t))) + x) + (y / (z * (-3.0d0)))
else
tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 4e-217) {
tmp = ((1.0 / (y * ((z * 3.0) / t))) + x) + (y / (z * -3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 4e-217: tmp = ((1.0 / (y * ((z * 3.0) / t))) + x) + (y / (z * -3.0)) else: tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 4e-217) tmp = Float64(Float64(Float64(1.0 / Float64(y * Float64(Float64(z * 3.0) / t))) + x) + Float64(y / Float64(z * -3.0))); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 4e-217) tmp = ((1.0 / (y * ((z * 3.0) / t))) + x) + (y / (z * -3.0)); else tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 4e-217], N[(N[(N[(1.0 / N[(y * N[(N[(z * 3.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 4 \cdot 10^{-217}:\\
\;\;\;\;\left(\frac{1}{y \cdot \frac{z \cdot 3}{t}} + x\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < 4.00000000000000033e-217Initial program 93.7%
+-commutative93.7%
associate-+r-93.7%
sub-neg93.7%
associate-*l*93.7%
*-commutative93.7%
distribute-frac-neg293.7%
distribute-rgt-neg-in93.7%
metadata-eval93.7%
Simplified93.7%
clear-num93.7%
inv-pow93.7%
*-commutative93.7%
associate-*l*93.7%
*-commutative93.7%
Applied egg-rr93.7%
unpow-193.7%
associate-/l*98.1%
Simplified98.1%
if 4.00000000000000033e-217 < (*.f64 z #s(literal 3 binary64)) Initial program 99.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))) (if (<= t_1 5e+236) t_1 (+ x (* (/ -0.3333333333333333 z) (- y (/ t y)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
double tmp;
if (t_1 <= 5e+236) {
tmp = t_1;
} else {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
if (t_1 <= 5d+236) then
tmp = t_1
else
tmp = x + (((-0.3333333333333333d0) / z) * (y - (t / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
double tmp;
if (t_1 <= 5e+236) {
tmp = t_1;
} else {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) tmp = 0 if t_1 <= 5e+236: tmp = t_1 else: tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) tmp = 0.0 if (t_1 <= 5e+236) tmp = t_1; else tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y - Float64(t / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); tmp = 0.0; if (t_1 <= 5e+236) tmp = t_1; else tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+236], t$95$1, N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+236}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < 4.9999999999999997e236Initial program 97.8%
if 4.9999999999999997e236 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) Initial program 87.0%
sub-neg87.0%
associate-+l+87.0%
remove-double-neg87.0%
distribute-frac-neg87.0%
sub-neg87.0%
distribute-frac-neg87.0%
neg-mul-187.0%
*-commutative87.0%
associate-/l*87.0%
*-commutative87.0%
neg-mul-187.0%
times-frac97.2%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.5e+47)
(* y (/ -0.3333333333333333 z))
(if (<= y -1.1e-46)
x
(if (<= y 3.8e-58)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 1.1e+68) x (/ y (* z -3.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e+47) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -1.1e-46) {
tmp = x;
} else if (y <= 3.8e-58) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.1e+68) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.5d+47)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= (-1.1d-46)) then
tmp = x
else if (y <= 3.8d-58) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 1.1d+68) then
tmp = x
else
tmp = y / (z * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e+47) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -1.1e-46) {
tmp = x;
} else if (y <= 3.8e-58) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.1e+68) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.5e+47: tmp = y * (-0.3333333333333333 / z) elif y <= -1.1e-46: tmp = x elif y <= 3.8e-58: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 1.1e+68: tmp = x else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.5e+47) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= -1.1e-46) tmp = x; elseif (y <= 3.8e-58) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 1.1e+68) tmp = x; else tmp = Float64(y / Float64(z * -3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.5e+47) tmp = y * (-0.3333333333333333 / z); elseif (y <= -1.1e-46) tmp = x; elseif (y <= 3.8e-58) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 1.1e+68) tmp = x; else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.5e+47], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.1e-46], x, If[LessEqual[y, 3.8e-58], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+68], x, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-46}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-58}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+68}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.5000000000000001e47Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 96.7%
*-commutative96.7%
metadata-eval96.7%
times-frac96.8%
*-rgt-identity96.8%
Simplified96.8%
Taylor expanded in x around 0 69.0%
associate-*r/69.0%
*-commutative69.0%
associate-*r/69.1%
Simplified69.1%
if -1.5000000000000001e47 < y < -1.1e-46 or 3.7999999999999997e-58 < y < 1.09999999999999994e68Initial program 96.8%
sub-neg96.8%
associate-+l+96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
times-frac96.8%
fma-define96.8%
metadata-eval96.8%
associate-*l*96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in x around inf 61.9%
if -1.1e-46 < y < 3.7999999999999997e-58Initial program 93.6%
sub-neg93.6%
associate-+l+93.6%
remove-double-neg93.6%
distribute-frac-neg93.6%
sub-neg93.6%
distribute-frac-neg93.6%
neg-mul-193.6%
*-commutative93.6%
associate-/l*93.6%
*-commutative93.6%
neg-mul-193.6%
times-frac85.5%
distribute-lft-out--85.5%
*-commutative85.5%
associate-/r*85.4%
metadata-eval85.4%
Simplified85.4%
Taylor expanded in y around 0 87.9%
associate-*r/87.9%
add-sqr-sqrt39.6%
sqrt-unprod25.1%
sqr-neg25.1%
sqrt-unprod6.1%
add-sqr-sqrt19.9%
distribute-lft-neg-in19.9%
*-commutative19.9%
distribute-lft-neg-in19.9%
add-sqr-sqrt13.8%
sqrt-unprod38.9%
sqr-neg38.9%
sqrt-unprod48.2%
add-sqr-sqrt87.9%
frac-times77.7%
metadata-eval77.7%
frac-2neg77.7%
clear-num77.6%
frac-times87.8%
*-un-lft-identity87.8%
Applied egg-rr87.9%
Taylor expanded in x around 0 67.2%
if 1.09999999999999994e68 < y Initial program 96.5%
sub-neg96.5%
associate-+l+96.5%
distribute-frac-neg96.5%
neg-mul-196.5%
*-commutative96.5%
times-frac96.4%
fma-define96.4%
metadata-eval96.4%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in t around 0 94.8%
metadata-eval94.8%
cancel-sign-sub-inv94.8%
associate-*r/94.6%
*-commutative94.6%
Simplified94.6%
clear-num94.6%
inv-pow94.6%
*-un-lft-identity94.6%
*-commutative94.6%
times-frac94.7%
metadata-eval94.7%
Applied egg-rr94.7%
unpow-194.7%
Simplified94.7%
Taylor expanded in x around 0 65.2%
metadata-eval65.2%
distribute-lft-neg-in65.2%
distribute-rgt-neg-in65.2%
metadata-eval65.2%
distribute-neg-frac65.2%
times-frac65.3%
*-commutative65.3%
neg-mul-165.3%
remove-double-neg65.3%
Simplified65.3%
Final simplification66.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -2e-75)
(+ x (* (/ -0.3333333333333333 z) t_1))
(if (<= y 1.8e-121)
(+ x (/ (/ (* t 0.3333333333333333) z) y))
(+ x (* t_1 (/ 1.0 (/ z -0.3333333333333333))))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -2e-75) {
tmp = x + ((-0.3333333333333333 / z) * t_1);
} else if (y <= 1.8e-121) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (t_1 * (1.0 / (z / -0.3333333333333333)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-2d-75)) then
tmp = x + (((-0.3333333333333333d0) / z) * t_1)
else if (y <= 1.8d-121) then
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
else
tmp = x + (t_1 * (1.0d0 / (z / (-0.3333333333333333d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -2e-75) {
tmp = x + ((-0.3333333333333333 / z) * t_1);
} else if (y <= 1.8e-121) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (t_1 * (1.0 / (z / -0.3333333333333333)));
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -2e-75: tmp = x + ((-0.3333333333333333 / z) * t_1) elif y <= 1.8e-121: tmp = x + (((t * 0.3333333333333333) / z) / y) else: tmp = x + (t_1 * (1.0 / (z / -0.3333333333333333))) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -2e-75) tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * t_1)); elseif (y <= 1.8e-121) tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); else tmp = Float64(x + Float64(t_1 * Float64(1.0 / Float64(z / -0.3333333333333333)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -2e-75) tmp = x + ((-0.3333333333333333 / z) * t_1); elseif (y <= 1.8e-121) tmp = x + (((t * 0.3333333333333333) / z) / y); else tmp = x + (t_1 * (1.0 / (z / -0.3333333333333333))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e-75], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-121], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 * N[(1.0 / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -2 \cdot 10^{-75}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot t\_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-121}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1 \cdot \frac{1}{\frac{z}{-0.3333333333333333}}\\
\end{array}
\end{array}
if y < -1.9999999999999999e-75Initial program 97.1%
sub-neg97.1%
associate-+l+97.1%
remove-double-neg97.1%
distribute-frac-neg97.1%
sub-neg97.1%
distribute-frac-neg97.1%
neg-mul-197.1%
*-commutative97.1%
associate-/l*97.1%
*-commutative97.1%
neg-mul-197.1%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
if -1.9999999999999999e-75 < y < 1.79999999999999992e-121Initial program 94.7%
sub-neg94.7%
associate-+l+94.7%
remove-double-neg94.7%
distribute-frac-neg94.7%
sub-neg94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.7%
*-commutative94.7%
neg-mul-194.7%
times-frac84.7%
distribute-lft-out--84.7%
*-commutative84.7%
associate-/r*84.6%
metadata-eval84.6%
Simplified84.6%
Taylor expanded in y around 0 94.7%
associate-*r/94.7%
add-sqr-sqrt40.2%
sqrt-unprod20.8%
sqr-neg20.8%
sqrt-unprod6.1%
add-sqr-sqrt20.3%
distribute-lft-neg-in20.3%
*-commutative20.3%
distribute-lft-neg-in20.3%
add-sqr-sqrt14.1%
sqrt-unprod39.9%
sqr-neg39.9%
sqrt-unprod54.4%
add-sqr-sqrt94.7%
frac-times84.6%
metadata-eval84.6%
frac-2neg84.6%
associate-*r/97.9%
frac-2neg97.9%
remove-double-neg97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 97.9%
associate-*r/97.9%
Simplified97.9%
if 1.79999999999999992e-121 < y Initial program 96.7%
sub-neg96.7%
associate-+l+96.7%
remove-double-neg96.7%
distribute-frac-neg96.7%
sub-neg96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
associate-/l*96.6%
*-commutative96.6%
neg-mul-196.6%
times-frac96.5%
distribute-lft-out--97.6%
*-commutative97.6%
associate-/r*97.6%
metadata-eval97.6%
Simplified97.6%
clear-num97.6%
inv-pow97.6%
Applied egg-rr97.6%
unpow-197.6%
Simplified97.6%
Final simplification98.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.6e-77) (not (<= y 9.5e-122))) (+ x (* (/ -0.3333333333333333 z) (- y (/ t y)))) (+ x (/ (/ (* t 0.3333333333333333) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.6e-77) || !(y <= 9.5e-122)) {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-5.6d-77)) .or. (.not. (y <= 9.5d-122))) then
tmp = x + (((-0.3333333333333333d0) / z) * (y - (t / y)))
else
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.6e-77) || !(y <= 9.5e-122)) {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
} else {
tmp = x + (((t * 0.3333333333333333) / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.6e-77) or not (y <= 9.5e-122): tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))) else: tmp = x + (((t * 0.3333333333333333) / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.6e-77) || !(y <= 9.5e-122)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y - Float64(t / y)))); else tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.6e-77) || ~((y <= 9.5e-122))) tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))); else tmp = x + (((t * 0.3333333333333333) / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.6e-77], N[Not[LessEqual[y, 9.5e-122]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{-77} \lor \neg \left(y \leq 9.5 \cdot 10^{-122}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -5.5999999999999999e-77 or 9.5000000000000002e-122 < y Initial program 96.9%
sub-neg96.9%
associate-+l+96.9%
remove-double-neg96.9%
distribute-frac-neg96.9%
sub-neg96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.9%
*-commutative96.9%
neg-mul-196.9%
times-frac98.1%
distribute-lft-out--98.7%
*-commutative98.7%
associate-/r*98.7%
metadata-eval98.7%
Simplified98.7%
if -5.5999999999999999e-77 < y < 9.5000000000000002e-122Initial program 94.7%
sub-neg94.7%
associate-+l+94.7%
remove-double-neg94.7%
distribute-frac-neg94.7%
sub-neg94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.7%
*-commutative94.7%
neg-mul-194.7%
times-frac84.7%
distribute-lft-out--84.7%
*-commutative84.7%
associate-/r*84.6%
metadata-eval84.6%
Simplified84.6%
Taylor expanded in y around 0 94.7%
associate-*r/94.7%
add-sqr-sqrt40.2%
sqrt-unprod20.8%
sqr-neg20.8%
sqrt-unprod6.1%
add-sqr-sqrt20.3%
distribute-lft-neg-in20.3%
*-commutative20.3%
distribute-lft-neg-in20.3%
add-sqr-sqrt14.1%
sqrt-unprod39.9%
sqr-neg39.9%
sqrt-unprod54.4%
add-sqr-sqrt94.7%
frac-times84.6%
metadata-eval84.6%
frac-2neg84.6%
associate-*r/97.9%
frac-2neg97.9%
remove-double-neg97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 97.9%
associate-*r/97.9%
Simplified97.9%
Final simplification98.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.2e+67)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 2000000000000.0)
(+ x (/ (/ (* t 0.3333333333333333) z) y))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.2e+67) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2000000000000.0) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.2d+67)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 2000000000000.0d0) then
tmp = x + (((t * 0.3333333333333333d0) / z) / y)
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.2e+67) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2000000000000.0) {
tmp = x + (((t * 0.3333333333333333) / z) / y);
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.2e+67: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 2000000000000.0: tmp = x + (((t * 0.3333333333333333) / z) / y) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.2e+67) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 2000000000000.0) tmp = Float64(x + Float64(Float64(Float64(t * 0.3333333333333333) / z) / y)); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.2e+67) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 2000000000000.0) tmp = x + (((t * 0.3333333333333333) / z) / y); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.2e+67], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2000000000000.0], N[(x + N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+67}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2000000000000:\\
\;\;\;\;x + \frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.20000000000000001e67Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 98.5%
if -1.20000000000000001e67 < y < 2e12Initial program 94.5%
sub-neg94.5%
associate-+l+94.5%
remove-double-neg94.5%
distribute-frac-neg94.5%
sub-neg94.5%
distribute-frac-neg94.5%
neg-mul-194.5%
*-commutative94.5%
associate-/l*94.5%
*-commutative94.5%
neg-mul-194.5%
times-frac90.0%
distribute-lft-out--90.0%
*-commutative90.0%
associate-/r*90.0%
metadata-eval90.0%
Simplified90.0%
Taylor expanded in y around 0 87.2%
associate-*r/87.2%
add-sqr-sqrt35.9%
sqrt-unprod39.7%
sqr-neg39.7%
sqrt-unprod17.9%
add-sqr-sqrt32.6%
distribute-lft-neg-in32.6%
*-commutative32.6%
distribute-lft-neg-in32.6%
add-sqr-sqrt14.7%
sqrt-unprod50.1%
sqr-neg50.1%
sqrt-unprod51.2%
add-sqr-sqrt87.2%
frac-times80.6%
metadata-eval80.6%
frac-2neg80.6%
associate-*r/89.9%
frac-2neg89.9%
remove-double-neg89.9%
Applied egg-rr89.9%
Taylor expanded in z around 0 90.0%
associate-*r/89.9%
Simplified89.9%
if 2e12 < y Initial program 96.9%
sub-neg96.9%
associate-+l+97.0%
remove-double-neg97.0%
distribute-frac-neg97.0%
sub-neg97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
associate-/l*96.9%
*-commutative96.9%
neg-mul-196.9%
times-frac98.3%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.5%
*-commutative94.5%
metadata-eval94.5%
times-frac94.6%
*-rgt-identity94.6%
Simplified94.6%
Final simplification92.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -230000000.0)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 68000000000000.0)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -230000000.0) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 68000000000000.0) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-230000000.0d0)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 68000000000000.0d0) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -230000000.0) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 68000000000000.0) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -230000000.0: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 68000000000000.0: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -230000000.0) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 68000000000000.0) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -230000000.0) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 68000000000000.0) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -230000000.0], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 68000000000000.0], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -230000000:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 68000000000000:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -2.3e8Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
sub-neg99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
associate-/l*99.1%
*-commutative99.1%
neg-mul-199.1%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 93.3%
if -2.3e8 < y < 6.8e13Initial program 94.2%
sub-neg94.2%
associate-+l+94.2%
remove-double-neg94.2%
distribute-frac-neg94.2%
sub-neg94.2%
distribute-frac-neg94.2%
neg-mul-194.2%
*-commutative94.2%
associate-/l*94.2%
*-commutative94.2%
neg-mul-194.2%
times-frac88.7%
distribute-lft-out--88.7%
*-commutative88.7%
associate-/r*88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in y around 0 89.0%
if 6.8e13 < y Initial program 96.9%
sub-neg96.9%
associate-+l+97.0%
remove-double-neg97.0%
distribute-frac-neg97.0%
sub-neg97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
associate-/l*96.9%
*-commutative96.9%
neg-mul-196.9%
times-frac98.3%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.5%
*-commutative94.5%
metadata-eval94.5%
times-frac94.6%
*-rgt-identity94.6%
Simplified94.6%
Final simplification91.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -8e-47) (not (<= y 1.02e-103))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8e-47) || !(y <= 1.02e-103)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-8d-47)) .or. (.not. (y <= 1.02d-103))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * (t / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8e-47) || !(y <= 1.02e-103)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8e-47) or not (y <= 1.02e-103): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8e-47) || !(y <= 1.02e-103)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -8e-47) || ~((y <= 1.02e-103))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -8e-47], N[Not[LessEqual[y, 1.02e-103]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-47} \lor \neg \left(y \leq 1.02 \cdot 10^{-103}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -7.9999999999999998e-47 or 1.01999999999999998e-103 < y Initial program 97.8%
sub-neg97.8%
associate-+l+97.9%
remove-double-neg97.9%
distribute-frac-neg97.9%
sub-neg97.9%
distribute-frac-neg97.9%
neg-mul-197.9%
*-commutative97.9%
associate-/l*97.8%
*-commutative97.8%
neg-mul-197.8%
times-frac98.1%
distribute-lft-out--98.6%
*-commutative98.6%
associate-/r*98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in y around inf 88.7%
if -7.9999999999999998e-47 < y < 1.01999999999999998e-103Initial program 92.9%
sub-neg92.9%
associate-+l+92.9%
remove-double-neg92.9%
distribute-frac-neg92.9%
sub-neg92.9%
distribute-frac-neg92.9%
neg-mul-192.9%
*-commutative92.9%
associate-/l*92.9%
*-commutative92.9%
neg-mul-192.9%
times-frac86.3%
distribute-lft-out--86.3%
*-commutative86.3%
associate-/r*86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in y around 0 91.8%
associate-*r/91.8%
add-sqr-sqrt38.3%
sqrt-unprod22.3%
sqr-neg22.3%
sqrt-unprod6.8%
add-sqr-sqrt19.4%
distribute-lft-neg-in19.4%
*-commutative19.4%
distribute-lft-neg-in19.4%
add-sqr-sqrt12.6%
sqrt-unprod40.4%
sqr-neg40.4%
sqrt-unprod53.4%
add-sqr-sqrt91.8%
frac-times82.8%
metadata-eval82.8%
frac-2neg82.8%
clear-num82.8%
frac-times91.7%
*-un-lft-identity91.7%
Applied egg-rr91.8%
Taylor expanded in x around 0 71.2%
Final simplification83.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.3e-47)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 1.25e-104)
(* 0.3333333333333333 (/ t (* z y)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.3e-47) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.25e-104) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.3d-47)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 1.25d-104) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.3e-47) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.25e-104) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.3e-47: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 1.25e-104: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.3e-47) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 1.25e-104) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.3e-47) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 1.25e-104) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.3e-47], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-104], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.3 \cdot 10^{-47}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-104}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -7.30000000000000042e-47Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
sub-neg98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.1%
*-commutative98.1%
neg-mul-198.1%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 90.9%
if -7.30000000000000042e-47 < y < 1.24999999999999995e-104Initial program 92.9%
sub-neg92.9%
associate-+l+92.9%
remove-double-neg92.9%
distribute-frac-neg92.9%
sub-neg92.9%
distribute-frac-neg92.9%
neg-mul-192.9%
*-commutative92.9%
associate-/l*92.9%
*-commutative92.9%
neg-mul-192.9%
times-frac86.3%
distribute-lft-out--86.3%
*-commutative86.3%
associate-/r*86.2%
metadata-eval86.2%
Simplified86.2%
Taylor expanded in y around 0 91.8%
associate-*r/91.8%
add-sqr-sqrt38.3%
sqrt-unprod22.3%
sqr-neg22.3%
sqrt-unprod6.8%
add-sqr-sqrt19.4%
distribute-lft-neg-in19.4%
*-commutative19.4%
distribute-lft-neg-in19.4%
add-sqr-sqrt12.6%
sqrt-unprod40.4%
sqr-neg40.4%
sqrt-unprod53.4%
add-sqr-sqrt91.8%
frac-times82.8%
metadata-eval82.8%
frac-2neg82.8%
clear-num82.8%
frac-times91.7%
*-un-lft-identity91.7%
Applied egg-rr91.8%
Taylor expanded in x around 0 71.2%
if 1.24999999999999995e-104 < y Initial program 97.6%
sub-neg97.6%
associate-+l+97.6%
remove-double-neg97.6%
distribute-frac-neg97.6%
sub-neg97.6%
distribute-frac-neg97.6%
neg-mul-197.6%
*-commutative97.6%
associate-/l*97.6%
*-commutative97.6%
neg-mul-197.6%
times-frac96.4%
distribute-lft-out--97.5%
*-commutative97.5%
associate-/r*97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in y around inf 86.7%
*-commutative86.7%
metadata-eval86.7%
times-frac86.8%
*-rgt-identity86.8%
Simplified86.8%
Final simplification83.0%
(FPCore (x y z t) :precision binary64 (if (<= z -2.85e+51) x (if (<= z 2.5e-35) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.85e+51) {
tmp = x;
} else if (z <= 2.5e-35) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-2.85d+51)) then
tmp = x
else if (z <= 2.5d-35) then
tmp = y / (z * (-3.0d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.85e+51) {
tmp = x;
} else if (z <= 2.5e-35) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.85e+51: tmp = x elif z <= 2.5e-35: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.85e+51) tmp = x; elseif (z <= 2.5e-35) tmp = Float64(y / Float64(z * -3.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.85e+51) tmp = x; elseif (z <= 2.5e-35) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.85e+51], x, If[LessEqual[z, 2.5e-35], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{+51}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-35}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.8500000000000001e51 or 2.49999999999999982e-35 < z Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
times-frac98.7%
fma-define98.7%
metadata-eval98.7%
associate-*l*98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in x around inf 55.4%
if -2.8500000000000001e51 < z < 2.49999999999999982e-35Initial program 93.7%
sub-neg93.7%
associate-+l+93.7%
distribute-frac-neg93.7%
neg-mul-193.7%
*-commutative93.7%
times-frac93.6%
fma-define93.6%
metadata-eval93.6%
associate-*l*93.6%
*-commutative93.6%
Simplified93.6%
Taylor expanded in t around 0 66.1%
metadata-eval66.1%
cancel-sign-sub-inv66.1%
associate-*r/66.1%
*-commutative66.1%
Simplified66.1%
clear-num66.1%
inv-pow66.1%
*-un-lft-identity66.1%
*-commutative66.1%
times-frac66.1%
metadata-eval66.1%
Applied egg-rr66.1%
unpow-166.1%
Simplified66.1%
Taylor expanded in x around 0 57.5%
metadata-eval57.5%
distribute-lft-neg-in57.5%
distribute-rgt-neg-in57.5%
metadata-eval57.5%
distribute-neg-frac57.5%
times-frac57.6%
*-commutative57.6%
neg-mul-157.6%
remove-double-neg57.6%
Simplified57.6%
(FPCore (x y z t) :precision binary64 (if (<= z -4.8e+53) x (if (<= z 2.5e-35) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.8e+53) {
tmp = x;
} else if (z <= 2.5e-35) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-4.8d+53)) then
tmp = x
else if (z <= 2.5d-35) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.8e+53) {
tmp = x;
} else if (z <= 2.5e-35) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.8e+53: tmp = x elif z <= 2.5e-35: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.8e+53) tmp = x; elseif (z <= 2.5e-35) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4.8e+53) tmp = x; elseif (z <= 2.5e-35) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.8e+53], x, If[LessEqual[z, 2.5e-35], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+53}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-35}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.8e53 or 2.49999999999999982e-35 < z Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
times-frac98.7%
fma-define98.7%
metadata-eval98.7%
associate-*l*98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in x around inf 55.4%
if -4.8e53 < z < 2.49999999999999982e-35Initial program 93.7%
sub-neg93.7%
associate-+l+93.7%
remove-double-neg93.7%
distribute-frac-neg93.7%
sub-neg93.7%
distribute-frac-neg93.7%
neg-mul-193.7%
*-commutative93.7%
associate-/l*93.6%
*-commutative93.6%
neg-mul-193.6%
times-frac98.9%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 66.1%
*-commutative66.1%
metadata-eval66.1%
times-frac66.1%
*-rgt-identity66.1%
Simplified66.1%
Taylor expanded in x around 0 57.5%
(FPCore (x y z t) :precision binary64 (+ (/ y (* z -3.0)) (+ x (/ t (* z (* 3.0 y))))))
double code(double x, double y, double z, double t) {
return (y / (z * -3.0)) + (x + (t / (z * (3.0 * y))));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (y / (z * (-3.0d0))) + (x + (t / (z * (3.0d0 * y))))
end function
public static double code(double x, double y, double z, double t) {
return (y / (z * -3.0)) + (x + (t / (z * (3.0 * y))));
}
def code(x, y, z, t): return (y / (z * -3.0)) + (x + (t / (z * (3.0 * y))))
function code(x, y, z, t) return Float64(Float64(y / Float64(z * -3.0)) + Float64(x + Float64(t / Float64(z * Float64(3.0 * y))))) end
function tmp = code(x, y, z, t) tmp = (y / (z * -3.0)) + (x + (t / (z * (3.0 * y)))); end
code[x_, y_, z_, t_] := N[(N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{z \cdot -3} + \left(x + \frac{t}{z \cdot \left(3 \cdot y\right)}\right)
\end{array}
Initial program 96.2%
+-commutative96.2%
associate-+r-96.2%
sub-neg96.2%
associate-*l*96.2%
*-commutative96.2%
distribute-frac-neg296.2%
distribute-rgt-neg-in96.2%
metadata-eval96.2%
Simplified96.2%
Final simplification96.2%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.2%
sub-neg96.2%
associate-+l+96.2%
distribute-frac-neg96.2%
neg-mul-196.2%
*-commutative96.2%
times-frac96.2%
fma-define96.2%
metadata-eval96.2%
associate-*l*96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in x around inf 33.5%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2024170
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))