
(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 15 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 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
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 + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t): return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Initial program 94.6%
associate-*l*94.6%
*-commutative94.6%
Simplified94.6%
*-commutative94.6%
associate-*l*94.6%
associate-+l-94.6%
*-commutative94.6%
associate-/r*96.8%
sub-div98.4%
Applied egg-rr98.4%
Final simplification98.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -6.2e-129)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 3e-169)
(/ (/ t z) (* y 3.0))
(if (<= y 2.1e-82)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 6.3e-57)
(/ (* t (/ 0.3333333333333333 y)) z)
(+ x (/ y (* z -3.0))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.2e-129) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 3e-169) {
tmp = (t / z) / (y * 3.0);
} else if (y <= 2.1e-82) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 6.3e-57) {
tmp = (t * (0.3333333333333333 / y)) / z;
} 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 <= (-6.2d-129)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 3d-169) then
tmp = (t / z) / (y * 3.0d0)
else if (y <= 2.1d-82) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 6.3d-57) then
tmp = (t * (0.3333333333333333d0 / y)) / z
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 <= -6.2e-129) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 3e-169) {
tmp = (t / z) / (y * 3.0);
} else if (y <= 2.1e-82) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 6.3e-57) {
tmp = (t * (0.3333333333333333 / y)) / z;
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6.2e-129: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 3e-169: tmp = (t / z) / (y * 3.0) elif y <= 2.1e-82: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 6.3e-57: tmp = (t * (0.3333333333333333 / y)) / z else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6.2e-129) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 3e-169) tmp = Float64(Float64(t / z) / Float64(y * 3.0)); elseif (y <= 2.1e-82) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 6.3e-57) tmp = Float64(Float64(t * Float64(0.3333333333333333 / y)) / z); 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 <= -6.2e-129) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 3e-169) tmp = (t / z) / (y * 3.0); elseif (y <= 2.1e-82) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 6.3e-57) tmp = (t * (0.3333333333333333 / y)) / z; else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6.2e-129], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e-169], N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-82], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.3e-57], N[(N[(t * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-129}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-169}:\\
\;\;\;\;\frac{\frac{t}{z}}{y \cdot 3}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-82}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 6.3 \cdot 10^{-57}:\\
\;\;\;\;\frac{t \cdot \frac{0.3333333333333333}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -6.2000000000000001e-129Initial program 96.2%
Simplified98.6%
Taylor expanded in t around 0 81.2%
metadata-eval81.2%
cancel-sign-sub-inv81.2%
associate-*r/81.3%
Simplified81.3%
if -6.2000000000000001e-129 < y < 2.9999999999999999e-169Initial program 87.6%
associate-*l*87.7%
*-commutative87.7%
Simplified87.7%
*-commutative87.7%
associate-*l*87.6%
associate-+l-87.6%
*-commutative87.6%
associate-/r*95.8%
sub-div95.8%
Applied egg-rr95.8%
Taylor expanded in y around 0 67.5%
associate-*r/67.5%
frac-times77.2%
*-commutative77.2%
clear-num77.2%
un-div-inv77.2%
div-inv77.3%
metadata-eval77.3%
Applied egg-rr77.3%
if 2.9999999999999999e-169 < y < 2.1e-82Initial program 99.9%
Simplified99.8%
Taylor expanded in t around 0 62.8%
*-commutative62.8%
associate-*l/62.8%
associate-*r/62.8%
Simplified62.8%
if 2.1e-82 < y < 6.30000000000000041e-57Initial program 99.3%
associate-*l*99.2%
*-commutative99.2%
Simplified99.2%
*-commutative99.2%
associate-*l*99.3%
associate-+l-99.3%
*-commutative99.3%
associate-/r*99.6%
sub-div99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 83.5%
associate-*r/83.6%
frac-times83.5%
*-commutative83.5%
associate-*l/83.6%
Applied egg-rr83.6%
if 6.30000000000000041e-57 < y Initial program 97.1%
Simplified99.8%
Taylor expanded in t around 0 89.8%
*-commutative89.8%
associate-*l/89.9%
associate-*r/89.9%
Simplified89.9%
clear-num89.9%
un-div-inv89.9%
div-inv89.9%
metadata-eval89.9%
Applied egg-rr89.9%
Final simplification81.5%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.8e+151) (not (<= x 1.62e+96))) (+ x (* y (/ -0.3333333333333333 z))) (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.8e+151) || !(x <= 1.62e+96)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
}
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 ((x <= (-2.8d+151)) .or. (.not. (x <= 1.62d+96))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.8e+151) || !(x <= 1.62e+96)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.8e+151) or not (x <= 1.62e+96): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = -0.3333333333333333 * ((y - (t / y)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.8e+151) || !(x <= 1.62e+96)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.8e+151) || ~((x <= 1.62e+96))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = -0.3333333333333333 * ((y - (t / y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.8e+151], N[Not[LessEqual[x, 1.62e+96]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+151} \lor \neg \left(x \leq 1.62 \cdot 10^{+96}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if x < -2.79999999999999987e151 or 1.61999999999999999e96 < x Initial program 96.7%
Simplified96.8%
Taylor expanded in t around 0 86.2%
*-commutative86.2%
associate-*l/86.3%
associate-*r/86.3%
Simplified86.3%
if -2.79999999999999987e151 < x < 1.61999999999999999e96Initial program 93.4%
associate-*l*93.5%
*-commutative93.5%
Simplified93.5%
*-commutative93.5%
associate-*l*93.4%
associate-+l-93.4%
*-commutative93.4%
associate-/r*96.8%
sub-div99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 86.4%
Final simplification86.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -8.2e+80) (not (<= z 2.4e-45))) (+ x (* 0.3333333333333333 (/ t (* y z)))) (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.2e+80) || !(z <= 2.4e-45)) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
}
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 <= (-8.2d+80)) .or. (.not. (z <= 2.4d-45))) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.2e+80) || !(z <= 2.4e-45)) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -8.2e+80) or not (z <= 2.4e-45): tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = -0.3333333333333333 * ((y - (t / y)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -8.2e+80) || !(z <= 2.4e-45)) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); else tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -8.2e+80) || ~((z <= 2.4e-45))) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = -0.3333333333333333 * ((y - (t / y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.2e+80], N[Not[LessEqual[z, 2.4e-45]], $MachinePrecision]], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+80} \lor \neg \left(z \leq 2.4 \cdot 10^{-45}\right):\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if z < -8.20000000000000003e80 or 2.3999999999999999e-45 < z Initial program 99.8%
Simplified96.7%
Taylor expanded in t around inf 86.0%
if -8.20000000000000003e80 < z < 2.3999999999999999e-45Initial program 89.7%
associate-*l*89.7%
*-commutative89.7%
Simplified89.7%
*-commutative89.7%
associate-*l*89.7%
associate-+l-89.7%
*-commutative89.7%
associate-/r*96.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 90.7%
Final simplification88.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.6e-43)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 1.26e-54)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.6e-43) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.26e-54) {
tmp = x + ((t / z) * (0.3333333333333333 / 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 <= (-5.6d-43)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 1.26d-54) then
tmp = x + ((t / z) * (0.3333333333333333d0 / 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 <= -5.6e-43) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.26e-54) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.6e-43: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 1.26e-54: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.6e-43) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 1.26e-54) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / 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 <= -5.6e-43) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 1.26e-54) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.6e-43], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.26e-54], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / 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 -5.6 \cdot 10^{-43}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{-54}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -5.5999999999999996e-43Initial program 96.9%
Simplified99.8%
Taylor expanded in t around 0 87.4%
metadata-eval87.4%
cancel-sign-sub-inv87.4%
associate-*r/87.5%
Simplified87.5%
if -5.5999999999999996e-43 < y < 1.2599999999999999e-54Initial program 91.5%
Simplified96.4%
Taylor expanded in y around 0 90.6%
+-commutative90.6%
associate-*r/90.6%
associate-/r*95.6%
Simplified95.6%
associate-/l/90.6%
*-commutative90.6%
times-frac96.4%
Applied egg-rr96.4%
if 1.2599999999999999e-54 < y Initial program 97.1%
Simplified99.8%
Taylor expanded in t around 0 89.8%
*-commutative89.8%
associate-*l/89.9%
associate-*r/89.9%
Simplified89.9%
clear-num89.9%
un-div-inv89.9%
div-inv89.9%
metadata-eval89.9%
Applied egg-rr89.9%
Final simplification92.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ -0.3333333333333333 z))))
(if (<= y -5.6e-43)
t_1
(if (<= y 4.3e-55)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 2.4e+156) x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -5.6e-43) {
tmp = t_1;
} else if (y <= 4.3e-55) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 2.4e+156) {
tmp = x;
} else {
tmp = t_1;
}
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 * ((-0.3333333333333333d0) / z)
if (y <= (-5.6d-43)) then
tmp = t_1
else if (y <= 4.3d-55) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 2.4d+156) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -5.6e-43) {
tmp = t_1;
} else if (y <= 4.3e-55) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 2.4e+156) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (-0.3333333333333333 / z) tmp = 0 if y <= -5.6e-43: tmp = t_1 elif y <= 4.3e-55: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 2.4e+156: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-0.3333333333333333 / z)) tmp = 0.0 if (y <= -5.6e-43) tmp = t_1; elseif (y <= 4.3e-55) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 2.4e+156) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (-0.3333333333333333 / z); tmp = 0.0; if (y <= -5.6e-43) tmp = t_1; elseif (y <= 4.3e-55) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 2.4e+156) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.6e-43], t$95$1, If[LessEqual[y, 4.3e-55], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+156], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -5.6 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-55}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+156}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.5999999999999996e-43 or 2.4000000000000001e156 < y Initial program 97.8%
associate-*l*97.8%
*-commutative97.8%
Simplified97.8%
*-commutative97.8%
associate-*l*97.8%
associate-+l-97.8%
*-commutative97.8%
associate-/r*97.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 67.4%
associate-*r/67.4%
*-commutative67.4%
associate-*r/67.5%
Simplified67.5%
if -5.5999999999999996e-43 < y < 4.3000000000000001e-55Initial program 91.5%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
*-commutative91.5%
associate-*l*91.5%
associate-+l-91.5%
*-commutative91.5%
associate-/r*96.5%
sub-div96.5%
Applied egg-rr96.5%
Taylor expanded in y around 0 62.1%
if 4.3000000000000001e-55 < y < 2.4000000000000001e156Initial program 95.1%
Simplified99.7%
Taylor expanded in x around inf 53.3%
Final simplification62.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.5e-141) (not (<= y 3.5e-55))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.5e-141) || !(y <= 3.5e-55)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
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 <= (-3.5d-141)) .or. (.not. (y <= 3.5d-55))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * (t / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.5e-141) || !(y <= 3.5e-55)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.5e-141) or not (y <= 3.5e-55): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.5e-141) || !(y <= 3.5e-55)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.5e-141) || ~((y <= 3.5e-55))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.5e-141], N[Not[LessEqual[y, 3.5e-55]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{-141} \lor \neg \left(y \leq 3.5 \cdot 10^{-55}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -3.5000000000000003e-141 or 3.50000000000000025e-55 < y Initial program 96.1%
Simplified98.6%
Taylor expanded in t around 0 84.8%
*-commutative84.8%
associate-*l/84.9%
associate-*r/84.9%
Simplified84.9%
if -3.5000000000000003e-141 < y < 3.50000000000000025e-55Initial program 92.1%
associate-*l*92.1%
*-commutative92.1%
Simplified92.1%
*-commutative92.1%
associate-*l*92.1%
associate-+l-92.1%
*-commutative92.1%
associate-/r*97.9%
sub-div97.9%
Applied egg-rr97.9%
Taylor expanded in y around 0 65.7%
Final simplification77.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.7e-140)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 7.2e-57)
(* 0.3333333333333333 (/ t (* y z)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.7e-140) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 7.2e-57) {
tmp = 0.3333333333333333 * (t / (y * z));
} 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 <= (-3.7d-140)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 7.2d-57) then
tmp = 0.3333333333333333d0 * (t / (y * z))
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 <= -3.7e-140) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 7.2e-57) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.7e-140: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 7.2e-57: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.7e-140) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 7.2e-57) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); 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 <= -3.7e-140) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 7.2e-57) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.7e-140], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-57], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{-140}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-57}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -3.69999999999999977e-140Initial program 95.2%
Simplified97.6%
Taylor expanded in t around 0 80.6%
*-commutative80.6%
associate-*l/80.6%
associate-*r/80.6%
Simplified80.6%
if -3.69999999999999977e-140 < y < 7.2000000000000005e-57Initial program 92.1%
associate-*l*92.1%
*-commutative92.1%
Simplified92.1%
*-commutative92.1%
associate-*l*92.1%
associate-+l-92.1%
*-commutative92.1%
associate-/r*97.9%
sub-div97.9%
Applied egg-rr97.9%
Taylor expanded in y around 0 65.7%
if 7.2000000000000005e-57 < y Initial program 97.1%
Simplified99.8%
Taylor expanded in t around 0 89.8%
*-commutative89.8%
associate-*l/89.9%
associate-*r/89.9%
Simplified89.9%
clear-num89.9%
un-div-inv89.9%
div-inv89.9%
metadata-eval89.9%
Applied egg-rr89.9%
Final simplification77.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.28e-142)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 2.35e-55)
(* 0.3333333333333333 (/ t (* y z)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.28e-142) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 2.35e-55) {
tmp = 0.3333333333333333 * (t / (y * z));
} 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.28d-142)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 2.35d-55) then
tmp = 0.3333333333333333d0 * (t / (y * z))
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.28e-142) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 2.35e-55) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.28e-142: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 2.35e-55: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.28e-142) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 2.35e-55) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); 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.28e-142) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 2.35e-55) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.28e-142], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.35e-55], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.28 \cdot 10^{-142}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{-55}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.2799999999999999e-142Initial program 95.2%
Simplified97.6%
Taylor expanded in t around 0 80.6%
metadata-eval80.6%
cancel-sign-sub-inv80.6%
associate-*r/80.6%
Simplified80.6%
if -1.2799999999999999e-142 < y < 2.35e-55Initial program 92.1%
associate-*l*92.1%
*-commutative92.1%
Simplified92.1%
*-commutative92.1%
associate-*l*92.1%
associate-+l-92.1%
*-commutative92.1%
associate-/r*97.9%
sub-div97.9%
Applied egg-rr97.9%
Taylor expanded in y around 0 65.7%
if 2.35e-55 < y Initial program 97.1%
Simplified99.8%
Taylor expanded in t around 0 89.8%
*-commutative89.8%
associate-*l/89.9%
associate-*r/89.9%
Simplified89.9%
clear-num89.9%
un-div-inv89.9%
div-inv89.9%
metadata-eval89.9%
Applied egg-rr89.9%
Final simplification77.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -8.5e-129)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 1.75e-55)
(/ (* t (/ 0.3333333333333333 y)) z)
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.5e-129) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.75e-55) {
tmp = (t * (0.3333333333333333 / y)) / z;
} 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 <= (-8.5d-129)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 1.75d-55) then
tmp = (t * (0.3333333333333333d0 / y)) / z
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 <= -8.5e-129) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.75e-55) {
tmp = (t * (0.3333333333333333 / y)) / z;
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.5e-129: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 1.75e-55: tmp = (t * (0.3333333333333333 / y)) / z else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.5e-129) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 1.75e-55) tmp = Float64(Float64(t * Float64(0.3333333333333333 / y)) / z); 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 <= -8.5e-129) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 1.75e-55) tmp = (t * (0.3333333333333333 / y)) / z; else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.5e-129], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-55], N[(N[(t * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-129}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-55}:\\
\;\;\;\;\frac{t \cdot \frac{0.3333333333333333}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -8.49999999999999937e-129Initial program 96.2%
Simplified98.6%
Taylor expanded in t around 0 81.2%
metadata-eval81.2%
cancel-sign-sub-inv81.2%
associate-*r/81.3%
Simplified81.3%
if -8.49999999999999937e-129 < y < 1.75000000000000013e-55Initial program 91.3%
associate-*l*91.3%
*-commutative91.3%
Simplified91.3%
*-commutative91.3%
associate-*l*91.3%
associate-+l-91.3%
*-commutative91.3%
associate-/r*97.0%
sub-div97.0%
Applied egg-rr97.0%
Taylor expanded in y around 0 64.5%
associate-*r/64.6%
frac-times70.4%
*-commutative70.4%
associate-*l/71.0%
Applied egg-rr71.0%
if 1.75000000000000013e-55 < y Initial program 97.1%
Simplified99.8%
Taylor expanded in t around 0 89.8%
*-commutative89.8%
associate-*l/89.9%
associate-*r/89.9%
Simplified89.9%
clear-num89.9%
un-div-inv89.9%
div-inv89.9%
metadata-eval89.9%
Applied egg-rr89.9%
Final simplification79.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.1e-130)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 1.9e-56)
(/ (/ t y) (/ z 0.3333333333333333))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.1e-130) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.9e-56) {
tmp = (t / y) / (z / 0.3333333333333333);
} 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 <= (-3.1d-130)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 1.9d-56) then
tmp = (t / y) / (z / 0.3333333333333333d0)
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 <= -3.1e-130) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 1.9e-56) {
tmp = (t / y) / (z / 0.3333333333333333);
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.1e-130: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 1.9e-56: tmp = (t / y) / (z / 0.3333333333333333) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.1e-130) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 1.9e-56) tmp = Float64(Float64(t / y) / Float64(z / 0.3333333333333333)); 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 <= -3.1e-130) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 1.9e-56) tmp = (t / y) / (z / 0.3333333333333333); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.1e-130], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-56], N[(N[(t / y), $MachinePrecision] / N[(z / 0.3333333333333333), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-130}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-56}:\\
\;\;\;\;\frac{\frac{t}{y}}{\frac{z}{0.3333333333333333}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -3.10000000000000011e-130Initial program 96.2%
Simplified98.6%
Taylor expanded in t around 0 81.2%
metadata-eval81.2%
cancel-sign-sub-inv81.2%
associate-*r/81.3%
Simplified81.3%
if -3.10000000000000011e-130 < y < 1.9000000000000001e-56Initial program 91.3%
associate-*l*91.3%
*-commutative91.3%
Simplified91.3%
*-commutative91.3%
associate-*l*91.3%
associate-+l-91.3%
*-commutative91.3%
associate-/r*97.0%
sub-div97.0%
Applied egg-rr97.0%
Taylor expanded in y around 0 64.5%
*-commutative64.5%
associate-/r*70.9%
associate-*l/70.9%
associate-/l*71.0%
Applied egg-rr71.0%
if 1.9000000000000001e-56 < y Initial program 97.1%
Simplified99.8%
Taylor expanded in t around 0 89.8%
*-commutative89.8%
associate-*l/89.9%
associate-*r/89.9%
Simplified89.9%
clear-num89.9%
un-div-inv89.9%
div-inv89.9%
metadata-eval89.9%
Applied egg-rr89.9%
Final simplification79.8%
(FPCore (x y z t) :precision binary64 (- x (* (- y (/ t y)) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x - ((y - (t / y)) * (0.3333333333333333 / z));
}
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 - (t / y)) * (0.3333333333333333d0 / z))
end function
public static double code(double x, double y, double z, double t) {
return x - ((y - (t / y)) * (0.3333333333333333 / z));
}
def code(x, y, z, t): return x - ((y - (t / y)) * (0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x - Float64(Float64(y - Float64(t / y)) * Float64(0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x - ((y - (t / y)) * (0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(y - \frac{t}{y}\right) \cdot \frac{0.3333333333333333}{z}
\end{array}
Initial program 94.6%
Simplified98.3%
Final simplification98.3%
(FPCore (x y z t) :precision binary64 (if (<= z -8.2e+80) x (if (<= z 1.16e-39) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8.2e+80) {
tmp = x;
} else if (z <= 1.16e-39) {
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 <= (-8.2d+80)) then
tmp = x
else if (z <= 1.16d-39) 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 <= -8.2e+80) {
tmp = x;
} else if (z <= 1.16e-39) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -8.2e+80: tmp = x elif z <= 1.16e-39: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -8.2e+80) tmp = x; elseif (z <= 1.16e-39) 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 <= -8.2e+80) tmp = x; elseif (z <= 1.16e-39) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -8.2e+80], x, If[LessEqual[z, 1.16e-39], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+80}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{-39}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.20000000000000003e80 or 1.16e-39 < z Initial program 99.8%
Simplified96.7%
Taylor expanded in x around inf 56.3%
if -8.20000000000000003e80 < z < 1.16e-39Initial program 89.7%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
*-commutative89.8%
associate-*l*89.7%
associate-+l-89.7%
*-commutative89.7%
associate-/r*96.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 49.1%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (if (<= z -1.35e+81) x (if (<= z 8e-42) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.35e+81) {
tmp = x;
} else if (z <= 8e-42) {
tmp = y * (-0.3333333333333333 / 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 <= (-1.35d+81)) then
tmp = x
else if (z <= 8d-42) then
tmp = y * ((-0.3333333333333333d0) / 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 <= -1.35e+81) {
tmp = x;
} else if (z <= 8e-42) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.35e+81: tmp = x elif z <= 8e-42: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.35e+81) tmp = x; elseif (z <= 8e-42) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.35e+81) tmp = x; elseif (z <= 8e-42) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.35e+81], x, If[LessEqual[z, 8e-42], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-42}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.35e81 or 8.0000000000000003e-42 < z Initial program 99.8%
Simplified96.7%
Taylor expanded in x around inf 56.3%
if -1.35e81 < z < 8.0000000000000003e-42Initial program 89.7%
associate-*l*89.8%
*-commutative89.8%
Simplified89.8%
*-commutative89.8%
associate-*l*89.7%
associate-+l-89.7%
*-commutative89.7%
associate-/r*96.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 49.1%
associate-*r/49.2%
*-commutative49.2%
associate-*r/49.2%
Simplified49.2%
Final simplification52.6%
(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 94.6%
Simplified98.3%
Taylor expanded in x around inf 32.3%
Final simplification32.3%
(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 2023334
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))