
(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 17 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) -1e+116) (+ (+ (/ t (* z (* 3.0 y))) x) (* (/ 1.0 z) (/ y -3.0))) (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -1e+116) {
tmp = ((t / (z * (3.0 * y))) + x) + ((1.0 / z) * (y / -3.0));
} else {
tmp = x + ((0.3333333333333333 / z) * ((t / y) - 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) <= (-1d+116)) then
tmp = ((t / (z * (3.0d0 * y))) + x) + ((1.0d0 / z) * (y / (-3.0d0)))
else
tmp = x + ((0.3333333333333333d0 / z) * ((t / y) - 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) <= -1e+116) {
tmp = ((t / (z * (3.0 * y))) + x) + ((1.0 / z) * (y / -3.0));
} else {
tmp = x + ((0.3333333333333333 / z) * ((t / y) - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -1e+116: tmp = ((t / (z * (3.0 * y))) + x) + ((1.0 / z) * (y / -3.0)) else: tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -1e+116) tmp = Float64(Float64(Float64(t / Float64(z * Float64(3.0 * y))) + x) + Float64(Float64(1.0 / z) * Float64(y / -3.0))); else tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -1e+116) tmp = ((t / (z * (3.0 * y))) + x) + ((1.0 / z) * (y / -3.0)); else tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -1e+116], N[(N[(N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] + N[(N[(1.0 / z), $MachinePrecision] * N[(y / -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{+116}:\\
\;\;\;\;\left(\frac{t}{z \cdot \left(3 \cdot y\right)} + x\right) + \frac{1}{z} \cdot \frac{y}{-3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -1.00000000000000002e116Initial program 97.9%
+-commutative97.9%
associate-+r-97.9%
sub-neg97.9%
associate-*l*97.9%
*-commutative97.9%
distribute-frac-neg297.9%
distribute-rgt-neg-in97.9%
metadata-eval97.9%
Simplified97.9%
*-un-lft-identity97.9%
times-frac99.7%
Applied egg-rr99.7%
if -1.00000000000000002e116 < (*.f64 z #s(literal 3 binary64)) Initial program 95.2%
sub-neg95.2%
associate-+l+95.2%
+-commutative95.2%
remove-double-neg95.2%
distribute-frac-neg95.2%
distribute-neg-in95.2%
remove-double-neg95.2%
sub-neg95.2%
neg-mul-195.2%
times-frac97.9%
distribute-frac-neg97.9%
neg-mul-197.9%
*-commutative97.9%
associate-/l*97.9%
*-commutative97.9%
Simplified98.3%
Final simplification98.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -150.0)
(/ y (* z -3.0))
(if (<= y 1.6e-80)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 1.6e+18)
(+ x (* 0.3333333333333333 (/ y z)))
(/ (/ y z) -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -150.0) {
tmp = y / (z * -3.0);
} else if (y <= 1.6e-80) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.6e+18) {
tmp = x + (0.3333333333333333 * (y / z));
} 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 <= (-150.0d0)) then
tmp = y / (z * (-3.0d0))
else if (y <= 1.6d-80) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 1.6d+18) then
tmp = x + (0.3333333333333333d0 * (y / z))
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 <= -150.0) {
tmp = y / (z * -3.0);
} else if (y <= 1.6e-80) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.6e+18) {
tmp = x + (0.3333333333333333 * (y / z));
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -150.0: tmp = y / (z * -3.0) elif y <= 1.6e-80: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 1.6e+18: tmp = x + (0.3333333333333333 * (y / z)) else: tmp = (y / z) / -3.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -150.0) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= 1.6e-80) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 1.6e+18) tmp = Float64(x + Float64(0.3333333333333333 * Float64(y / z))); else tmp = Float64(Float64(y / z) / -3.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -150.0) tmp = y / (z * -3.0); elseif (y <= 1.6e-80) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 1.6e+18) tmp = x + (0.3333333333333333 * (y / z)); else tmp = (y / z) / -3.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -150.0], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-80], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+18], N[(x + N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -150:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-80}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+18}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\end{array}
\end{array}
if y < -150Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
distribute-frac-neg96.8%
neg-mul-196.8%
*-commutative96.8%
times-frac95.4%
fma-define95.4%
metadata-eval95.4%
associate-*l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in y around inf 87.5%
Taylor expanded in x around 0 59.7%
clear-num59.6%
div-inv59.7%
metadata-eval59.7%
div-inv59.8%
Applied egg-rr59.8%
if -150 < y < 1.5999999999999999e-80Initial program 92.5%
Taylor expanded in z around 0 64.2%
Taylor expanded in t around inf 63.8%
if 1.5999999999999999e-80 < y < 1.6e18Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac96.3%
distribute-frac-neg96.3%
neg-mul-196.3%
*-commutative96.3%
associate-/l*96.2%
*-commutative96.2%
Simplified96.3%
Taylor expanded in t around 0 68.7%
neg-mul-168.7%
Simplified68.7%
associate-*l/68.9%
clear-num68.8%
add-sqr-sqrt0.0%
sqrt-unprod51.6%
sqr-neg51.6%
sqrt-unprod51.6%
add-sqr-sqrt51.6%
Applied egg-rr51.6%
associate-/r/51.6%
associate-*l/51.6%
associate-*r/51.6%
associate-*r/51.6%
*-lft-identity51.6%
Simplified51.6%
if 1.6e18 < y Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around inf 93.2%
Taylor expanded in x around 0 71.1%
clear-num69.4%
div-inv69.5%
metadata-eval69.5%
div-inv69.5%
associate-/r*71.2%
Applied egg-rr71.2%
Final simplification63.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -32000.0)
(+ x (/ y (* z -3.0)))
(if (<= y 2.9e-10)
(+ x (/ (/ t z) (* 3.0 y)))
(* y (+ (/ x y) (/ (/ -1.0 z) 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -32000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2.9e-10) {
tmp = x + ((t / z) / (3.0 * y));
} else {
tmp = y * ((x / y) + ((-1.0 / 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 <= (-32000.0d0)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 2.9d-10) then
tmp = x + ((t / z) / (3.0d0 * y))
else
tmp = y * ((x / y) + (((-1.0d0) / 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 <= -32000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2.9e-10) {
tmp = x + ((t / z) / (3.0 * y));
} else {
tmp = y * ((x / y) + ((-1.0 / z) / 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -32000.0: tmp = x + (y / (z * -3.0)) elif y <= 2.9e-10: tmp = x + ((t / z) / (3.0 * y)) else: tmp = y * ((x / y) + ((-1.0 / z) / 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -32000.0) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 2.9e-10) tmp = Float64(x + Float64(Float64(t / z) / Float64(3.0 * y))); else tmp = Float64(y * Float64(Float64(x / y) + Float64(Float64(-1.0 / z) / 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -32000.0) tmp = x + (y / (z * -3.0)); elseif (y <= 2.9e-10) tmp = x + ((t / z) / (3.0 * y)); else tmp = y * ((x / y) + ((-1.0 / z) / 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -32000.0], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-10], N[(x + N[(N[(t / z), $MachinePrecision] / N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(x / y), $MachinePrecision] + N[(N[(-1.0 / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -32000:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{3 \cdot y}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{x}{y} + \frac{\frac{-1}{z}}{3}\right)\\
\end{array}
\end{array}
if y < -32000Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
+-commutative96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
distribute-neg-in96.8%
remove-double-neg96.8%
sub-neg96.8%
neg-mul-196.8%
times-frac98.2%
distribute-frac-neg98.2%
neg-mul-198.2%
*-commutative98.2%
associate-/l*98.0%
*-commutative98.0%
Simplified99.7%
Taylor expanded in t around 0 87.6%
neg-mul-187.6%
Simplified87.6%
clear-num87.5%
frac-2neg87.5%
metadata-eval87.5%
add-sqr-sqrt87.4%
sqrt-unprod65.2%
sqr-neg65.2%
sqrt-unprod0.0%
add-sqr-sqrt31.1%
associate-*l/31.1%
neg-mul-131.1%
add-sqr-sqrt31.1%
sqrt-unprod24.9%
sqr-neg24.9%
sqrt-unprod0.0%
add-sqr-sqrt87.7%
div-inv87.7%
metadata-eval87.7%
distribute-rgt-neg-in87.7%
metadata-eval87.7%
Applied egg-rr87.7%
if -32000 < y < 2.89999999999999981e-10Initial program 93.8%
sub-neg93.8%
associate-+l+93.8%
+-commutative93.8%
remove-double-neg93.8%
distribute-frac-neg93.8%
distribute-neg-in93.8%
remove-double-neg93.8%
sub-neg93.8%
neg-mul-193.8%
times-frac93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
associate-/l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in t around inf 89.8%
*-commutative89.8%
metadata-eval89.8%
times-frac89.8%
*-rgt-identity89.8%
*-commutative89.8%
associate-*r*89.8%
associate-/r*95.1%
Simplified95.1%
if 2.89999999999999981e-10 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around inf 91.0%
div-inv91.1%
clear-num89.6%
div-inv89.7%
metadata-eval89.7%
associate-/r*91.2%
Applied egg-rr91.2%
Final simplification92.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.6)
(/ y (* z -3.0))
(if (<= y 6.2e-85)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 1.75e-5) x (/ (/ y z) -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.6) {
tmp = y / (z * -3.0);
} else if (y <= 6.2e-85) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.75e-5) {
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 <= (-3.6d0)) then
tmp = y / (z * (-3.0d0))
else if (y <= 6.2d-85) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 1.75d-5) 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 <= -3.6) {
tmp = y / (z * -3.0);
} else if (y <= 6.2e-85) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.75e-5) {
tmp = x;
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.6: tmp = y / (z * -3.0) elif y <= 6.2e-85: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 1.75e-5: tmp = x else: tmp = (y / z) / -3.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.6) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= 6.2e-85) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 1.75e-5) tmp = x; else tmp = Float64(Float64(y / z) / -3.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.6) tmp = y / (z * -3.0); elseif (y <= 6.2e-85) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 1.75e-5) tmp = x; else tmp = (y / z) / -3.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.6], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-85], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-5], x, N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-85}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\end{array}
\end{array}
if y < -3.60000000000000009Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
distribute-frac-neg96.8%
neg-mul-196.8%
*-commutative96.8%
times-frac95.4%
fma-define95.4%
metadata-eval95.4%
associate-*l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in y around inf 87.5%
Taylor expanded in x around 0 59.7%
clear-num59.6%
div-inv59.7%
metadata-eval59.7%
div-inv59.8%
Applied egg-rr59.8%
if -3.60000000000000009 < y < 6.2000000000000005e-85Initial program 92.5%
Taylor expanded in z around 0 64.2%
Taylor expanded in t around inf 63.8%
if 6.2000000000000005e-85 < y < 1.7499999999999998e-5Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 55.4%
if 1.7499999999999998e-5 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around inf 90.6%
Taylor expanded in x around 0 68.4%
clear-num66.9%
div-inv67.0%
metadata-eval67.0%
div-inv67.0%
associate-/r*68.5%
Applied egg-rr68.5%
Final simplification63.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -460.0)
(+ x (/ y (* z -3.0)))
(if (<= y 2.9e-10)
(+ x (/ (/ t z) (* 3.0 y)))
(- x (* y (/ 0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -460.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2.9e-10) {
tmp = x + ((t / z) / (3.0 * y));
} else {
tmp = x - (y * (0.3333333333333333 / 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 <= (-460.0d0)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 2.9d-10) then
tmp = x + ((t / z) / (3.0d0 * y))
else
tmp = x - (y * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -460.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2.9e-10) {
tmp = x + ((t / z) / (3.0 * y));
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -460.0: tmp = x + (y / (z * -3.0)) elif y <= 2.9e-10: tmp = x + ((t / z) / (3.0 * y)) else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -460.0) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 2.9e-10) tmp = Float64(x + Float64(Float64(t / z) / Float64(3.0 * y))); else tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -460.0) tmp = x + (y / (z * -3.0)); elseif (y <= 2.9e-10) tmp = x + ((t / z) / (3.0 * y)); else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -460.0], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-10], N[(x + N[(N[(t / z), $MachinePrecision] / N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -460:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{3 \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -460Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
+-commutative96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
distribute-neg-in96.8%
remove-double-neg96.8%
sub-neg96.8%
neg-mul-196.8%
times-frac98.2%
distribute-frac-neg98.2%
neg-mul-198.2%
*-commutative98.2%
associate-/l*98.0%
*-commutative98.0%
Simplified99.7%
Taylor expanded in t around 0 87.6%
neg-mul-187.6%
Simplified87.6%
clear-num87.5%
frac-2neg87.5%
metadata-eval87.5%
add-sqr-sqrt87.4%
sqrt-unprod65.2%
sqr-neg65.2%
sqrt-unprod0.0%
add-sqr-sqrt31.1%
associate-*l/31.1%
neg-mul-131.1%
add-sqr-sqrt31.1%
sqrt-unprod24.9%
sqr-neg24.9%
sqrt-unprod0.0%
add-sqr-sqrt87.7%
div-inv87.7%
metadata-eval87.7%
distribute-rgt-neg-in87.7%
metadata-eval87.7%
Applied egg-rr87.7%
if -460 < y < 2.89999999999999981e-10Initial program 93.8%
sub-neg93.8%
associate-+l+93.8%
+-commutative93.8%
remove-double-neg93.8%
distribute-frac-neg93.8%
distribute-neg-in93.8%
remove-double-neg93.8%
sub-neg93.8%
neg-mul-193.8%
times-frac93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
associate-/l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in t around inf 89.8%
*-commutative89.8%
metadata-eval89.8%
times-frac89.8%
*-rgt-identity89.8%
*-commutative89.8%
associate-*r*89.8%
associate-/r*95.1%
Simplified95.1%
if 2.89999999999999981e-10 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
+-commutative98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
sub-neg98.3%
neg-mul-198.3%
times-frac98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
associate-/l*98.3%
*-commutative98.3%
Simplified99.7%
Taylor expanded in t around 0 91.1%
neg-mul-191.1%
Simplified91.1%
Final simplification92.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -115.0)
(+ x (/ y (* z -3.0)))
(if (<= y 3.7e+76)
(+ x (* (/ 0.3333333333333333 z) (/ t y)))
(- x (* y (/ 0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -115.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.7e+76) {
tmp = x + ((0.3333333333333333 / z) * (t / y));
} else {
tmp = x - (y * (0.3333333333333333 / 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 <= (-115.0d0)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 3.7d+76) then
tmp = x + ((0.3333333333333333d0 / z) * (t / y))
else
tmp = x - (y * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -115.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.7e+76) {
tmp = x + ((0.3333333333333333 / z) * (t / y));
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -115.0: tmp = x + (y / (z * -3.0)) elif y <= 3.7e+76: tmp = x + ((0.3333333333333333 / z) * (t / y)) else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -115.0) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 3.7e+76) tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(t / y))); else tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -115.0) tmp = x + (y / (z * -3.0)); elseif (y <= 3.7e+76) tmp = x + ((0.3333333333333333 / z) * (t / y)); else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -115.0], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+76], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -115:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+76}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -115Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
+-commutative96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
distribute-neg-in96.8%
remove-double-neg96.8%
sub-neg96.8%
neg-mul-196.8%
times-frac98.2%
distribute-frac-neg98.2%
neg-mul-198.2%
*-commutative98.2%
associate-/l*98.0%
*-commutative98.0%
Simplified99.7%
Taylor expanded in t around 0 87.6%
neg-mul-187.6%
Simplified87.6%
clear-num87.5%
frac-2neg87.5%
metadata-eval87.5%
add-sqr-sqrt87.4%
sqrt-unprod65.2%
sqr-neg65.2%
sqrt-unprod0.0%
add-sqr-sqrt31.1%
associate-*l/31.1%
neg-mul-131.1%
add-sqr-sqrt31.1%
sqrt-unprod24.9%
sqr-neg24.9%
sqrt-unprod0.0%
add-sqr-sqrt87.7%
div-inv87.7%
metadata-eval87.7%
distribute-rgt-neg-in87.7%
metadata-eval87.7%
Applied egg-rr87.7%
if -115 < y < 3.6999999999999999e76Initial program 94.4%
sub-neg94.4%
associate-+l+94.4%
+-commutative94.4%
remove-double-neg94.4%
distribute-frac-neg94.4%
distribute-neg-in94.4%
remove-double-neg94.4%
sub-neg94.4%
neg-mul-194.4%
times-frac94.5%
distribute-frac-neg94.5%
neg-mul-194.5%
*-commutative94.5%
associate-/l*94.5%
*-commutative94.5%
Simplified94.4%
Taylor expanded in t around inf 87.0%
if 3.6999999999999999e76 < y Initial program 97.9%
sub-neg97.9%
associate-+l+97.9%
+-commutative97.9%
remove-double-neg97.9%
distribute-frac-neg97.9%
distribute-neg-in97.9%
remove-double-neg97.9%
sub-neg97.9%
neg-mul-197.9%
times-frac97.9%
distribute-frac-neg97.9%
neg-mul-197.9%
*-commutative97.9%
associate-/l*97.9%
*-commutative97.9%
Simplified99.7%
Taylor expanded in t around 0 99.7%
neg-mul-199.7%
Simplified99.7%
Final simplification89.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -200.0)
(+ x (/ y (* z -3.0)))
(if (<= y 3.7e+76)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(- x (* y (/ 0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -200.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.7e+76) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x - (y * (0.3333333333333333 / 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 <= (-200.0d0)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 3.7d+76) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
else
tmp = x - (y * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -200.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.7e+76) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -200.0: tmp = x + (y / (z * -3.0)) elif y <= 3.7e+76: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -200.0) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 3.7e+76) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -200.0) tmp = x + (y / (z * -3.0)); elseif (y <= 3.7e+76) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -200.0], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+76], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -200:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+76}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -200Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
+-commutative96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
distribute-neg-in96.8%
remove-double-neg96.8%
sub-neg96.8%
neg-mul-196.8%
times-frac98.2%
distribute-frac-neg98.2%
neg-mul-198.2%
*-commutative98.2%
associate-/l*98.0%
*-commutative98.0%
Simplified99.7%
Taylor expanded in t around 0 87.6%
neg-mul-187.6%
Simplified87.6%
clear-num87.5%
frac-2neg87.5%
metadata-eval87.5%
add-sqr-sqrt87.4%
sqrt-unprod65.2%
sqr-neg65.2%
sqrt-unprod0.0%
add-sqr-sqrt31.1%
associate-*l/31.1%
neg-mul-131.1%
add-sqr-sqrt31.1%
sqrt-unprod24.9%
sqr-neg24.9%
sqrt-unprod0.0%
add-sqr-sqrt87.7%
div-inv87.7%
metadata-eval87.7%
distribute-rgt-neg-in87.7%
metadata-eval87.7%
Applied egg-rr87.7%
if -200 < y < 3.6999999999999999e76Initial program 94.4%
sub-neg94.4%
associate-+l+94.4%
+-commutative94.4%
remove-double-neg94.4%
distribute-frac-neg94.4%
distribute-neg-in94.4%
remove-double-neg94.4%
sub-neg94.4%
neg-mul-194.4%
times-frac94.5%
distribute-frac-neg94.5%
neg-mul-194.5%
*-commutative94.5%
associate-/l*94.5%
*-commutative94.5%
Simplified94.4%
Taylor expanded in t around inf 87.0%
if 3.6999999999999999e76 < y Initial program 97.9%
sub-neg97.9%
associate-+l+97.9%
+-commutative97.9%
remove-double-neg97.9%
distribute-frac-neg97.9%
distribute-neg-in97.9%
remove-double-neg97.9%
sub-neg97.9%
neg-mul-197.9%
times-frac97.9%
distribute-frac-neg97.9%
neg-mul-197.9%
*-commutative97.9%
associate-/l*97.9%
*-commutative97.9%
Simplified99.7%
Taylor expanded in t around 0 99.7%
neg-mul-199.7%
Simplified99.7%
Final simplification89.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.7e-74) (not (<= y 1.35e-80))) (+ x (/ y (* z -3.0))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.7e-74) || !(y <= 1.35e-80)) {
tmp = x + (y / (z * -3.0));
} 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 <= (-2.7d-74)) .or. (.not. (y <= 1.35d-80))) then
tmp = x + (y / (z * (-3.0d0)))
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 <= -2.7e-74) || !(y <= 1.35e-80)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.7e-74) or not (y <= 1.35e-80): tmp = x + (y / (z * -3.0)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.7e-74) || !(y <= 1.35e-80)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); 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 <= -2.7e-74) || ~((y <= 1.35e-80))) tmp = x + (y / (z * -3.0)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.7e-74], N[Not[LessEqual[y, 1.35e-80]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-74} \lor \neg \left(y \leq 1.35 \cdot 10^{-80}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -2.70000000000000018e-74 or 1.3500000000000001e-80 < y Initial program 98.0%
sub-neg98.0%
associate-+l+98.0%
+-commutative98.0%
remove-double-neg98.0%
distribute-frac-neg98.0%
distribute-neg-in98.0%
remove-double-neg98.0%
sub-neg98.0%
neg-mul-198.0%
times-frac98.0%
distribute-frac-neg98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*97.9%
*-commutative97.9%
Simplified99.1%
Taylor expanded in t around 0 85.1%
neg-mul-185.1%
Simplified85.1%
clear-num84.4%
frac-2neg84.4%
metadata-eval84.4%
add-sqr-sqrt38.6%
sqrt-unprod42.8%
sqr-neg42.8%
sqrt-unprod17.4%
add-sqr-sqrt34.2%
associate-*l/34.2%
neg-mul-134.2%
add-sqr-sqrt16.8%
sqrt-unprod43.7%
sqr-neg43.7%
sqrt-unprod45.8%
add-sqr-sqrt84.5%
div-inv84.6%
metadata-eval84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if -2.70000000000000018e-74 < y < 1.3500000000000001e-80Initial program 91.6%
Taylor expanded in z around 0 67.8%
Taylor expanded in t around inf 67.4%
Final simplification78.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.75e-74)
(+ x (/ y (* z -3.0)))
(if (<= y 1e-91)
(/ (/ (* t 0.3333333333333333) z) y)
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.75e-74) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1e-91) {
tmp = ((t * 0.3333333333333333) / z) / y;
} else {
tmp = x - ((y * 0.3333333333333333) / 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 <= (-1.75d-74)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 1d-91) then
tmp = ((t * 0.3333333333333333d0) / z) / y
else
tmp = x - ((y * 0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.75e-74) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1e-91) {
tmp = ((t * 0.3333333333333333) / z) / y;
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.75e-74: tmp = x + (y / (z * -3.0)) elif y <= 1e-91: tmp = ((t * 0.3333333333333333) / z) / y else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.75e-74) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 1e-91) tmp = Float64(Float64(Float64(t * 0.3333333333333333) / z) / y); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.75e-74) tmp = x + (y / (z * -3.0)); elseif (y <= 1e-91) tmp = ((t * 0.3333333333333333) / z) / y; else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.75e-74], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-91], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{-74}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 10^{-91}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.75000000000000007e-74Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
+-commutative97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
sub-neg97.3%
neg-mul-197.3%
times-frac98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.4%
*-commutative98.4%
Simplified99.7%
Taylor expanded in t around 0 84.4%
neg-mul-184.4%
Simplified84.4%
clear-num84.4%
frac-2neg84.4%
metadata-eval84.4%
add-sqr-sqrt84.3%
sqrt-unprod65.6%
sqr-neg65.6%
sqrt-unprod0.0%
add-sqr-sqrt36.8%
associate-*l/36.8%
neg-mul-136.8%
add-sqr-sqrt36.8%
sqrt-unprod31.5%
sqr-neg31.5%
sqrt-unprod0.0%
add-sqr-sqrt84.5%
div-inv84.6%
metadata-eval84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if -1.75000000000000007e-74 < y < 1.00000000000000002e-91Initial program 91.6%
Taylor expanded in z around 0 67.8%
Taylor expanded in t around inf 67.4%
associate-*r/67.4%
*-commutative67.4%
associate-/r*71.5%
Applied egg-rr71.5%
if 1.00000000000000002e-91 < y Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
+-commutative98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
distribute-neg-in98.7%
remove-double-neg98.7%
sub-neg98.7%
neg-mul-198.7%
times-frac97.6%
distribute-frac-neg97.6%
neg-mul-197.6%
*-commutative97.6%
associate-/l*97.6%
*-commutative97.6%
Simplified98.6%
Taylor expanded in t around 0 85.6%
neg-mul-185.6%
Simplified85.6%
associate-*l/85.6%
frac-2neg85.6%
add-sqr-sqrt0.0%
sqrt-unprod23.6%
sqr-neg23.6%
sqrt-unprod32.1%
add-sqr-sqrt32.1%
distribute-rgt-neg-out32.1%
add-sqr-sqrt0.0%
sqrt-unprod54.0%
sqr-neg54.0%
sqrt-unprod85.5%
add-sqr-sqrt85.6%
Applied egg-rr85.6%
Final simplification80.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.2e-74)
(+ x (/ y (* z -3.0)))
(if (<= y 1.3e-81)
(/ (/ (* t 0.3333333333333333) z) y)
(- x (* y (/ 0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.2e-74) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.3e-81) {
tmp = ((t * 0.3333333333333333) / z) / y;
} else {
tmp = x - (y * (0.3333333333333333 / 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 <= (-1.2d-74)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 1.3d-81) then
tmp = ((t * 0.3333333333333333d0) / z) / y
else
tmp = x - (y * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.2e-74) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.3e-81) {
tmp = ((t * 0.3333333333333333) / z) / y;
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.2e-74: tmp = x + (y / (z * -3.0)) elif y <= 1.3e-81: tmp = ((t * 0.3333333333333333) / z) / y else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.2e-74) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 1.3e-81) tmp = Float64(Float64(Float64(t * 0.3333333333333333) / z) / y); else tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.2e-74) tmp = x + (y / (z * -3.0)); elseif (y <= 1.3e-81) tmp = ((t * 0.3333333333333333) / z) / y; else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.2e-74], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-81], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{-74}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-81}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.1999999999999999e-74Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
+-commutative97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
sub-neg97.3%
neg-mul-197.3%
times-frac98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.4%
*-commutative98.4%
Simplified99.7%
Taylor expanded in t around 0 84.4%
neg-mul-184.4%
Simplified84.4%
clear-num84.4%
frac-2neg84.4%
metadata-eval84.4%
add-sqr-sqrt84.3%
sqrt-unprod65.6%
sqr-neg65.6%
sqrt-unprod0.0%
add-sqr-sqrt36.8%
associate-*l/36.8%
neg-mul-136.8%
add-sqr-sqrt36.8%
sqrt-unprod31.5%
sqr-neg31.5%
sqrt-unprod0.0%
add-sqr-sqrt84.5%
div-inv84.6%
metadata-eval84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if -1.1999999999999999e-74 < y < 1.2999999999999999e-81Initial program 91.6%
Taylor expanded in z around 0 67.8%
Taylor expanded in t around inf 67.4%
associate-*r/67.4%
*-commutative67.4%
associate-/r*71.5%
Applied egg-rr71.5%
if 1.2999999999999999e-81 < y Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
+-commutative98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
distribute-neg-in98.7%
remove-double-neg98.7%
sub-neg98.7%
neg-mul-198.7%
times-frac97.6%
distribute-frac-neg97.6%
neg-mul-197.6%
*-commutative97.6%
associate-/l*97.6%
*-commutative97.6%
Simplified98.6%
Taylor expanded in t around 0 85.6%
neg-mul-185.6%
Simplified85.6%
Final simplification80.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.7e-74)
(+ x (/ y (* z -3.0)))
(if (<= y 2e-92)
(/ (/ (* t 0.3333333333333333) z) y)
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e-74) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2e-92) {
tmp = ((t * 0.3333333333333333) / z) / y;
} else {
tmp = x - (0.3333333333333333 * (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 <= (-2.7d-74)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 2d-92) then
tmp = ((t * 0.3333333333333333d0) / z) / y
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e-74) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2e-92) {
tmp = ((t * 0.3333333333333333) / z) / y;
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.7e-74: tmp = x + (y / (z * -3.0)) elif y <= 2e-92: tmp = ((t * 0.3333333333333333) / z) / y else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.7e-74) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 2e-92) tmp = Float64(Float64(Float64(t * 0.3333333333333333) / z) / y); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.7e-74) tmp = x + (y / (z * -3.0)); elseif (y <= 2e-92) tmp = ((t * 0.3333333333333333) / z) / y; else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.7e-74], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e-92], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-74}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-92}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -2.70000000000000018e-74Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
+-commutative97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
sub-neg97.3%
neg-mul-197.3%
times-frac98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.4%
*-commutative98.4%
Simplified99.7%
Taylor expanded in t around 0 84.4%
neg-mul-184.4%
Simplified84.4%
clear-num84.4%
frac-2neg84.4%
metadata-eval84.4%
add-sqr-sqrt84.3%
sqrt-unprod65.6%
sqr-neg65.6%
sqrt-unprod0.0%
add-sqr-sqrt36.8%
associate-*l/36.8%
neg-mul-136.8%
add-sqr-sqrt36.8%
sqrt-unprod31.5%
sqr-neg31.5%
sqrt-unprod0.0%
add-sqr-sqrt84.5%
div-inv84.6%
metadata-eval84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if -2.70000000000000018e-74 < y < 1.99999999999999998e-92Initial program 91.6%
Taylor expanded in z around 0 67.8%
Taylor expanded in t around inf 67.4%
associate-*r/67.4%
*-commutative67.4%
associate-/r*71.5%
Applied egg-rr71.5%
if 1.99999999999999998e-92 < y Initial program 98.7%
Taylor expanded in t around 0 85.6%
Final simplification80.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.2e-74)
(+ x (/ y (* z -3.0)))
(if (<= y 3.3e-87)
(/ (* t 0.3333333333333333) (* z y))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e-74) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.3e-87) {
tmp = (t * 0.3333333333333333) / (z * y);
} else {
tmp = x - (0.3333333333333333 * (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 <= (-2.2d-74)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 3.3d-87) then
tmp = (t * 0.3333333333333333d0) / (z * y)
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e-74) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.3e-87) {
tmp = (t * 0.3333333333333333) / (z * y);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e-74: tmp = x + (y / (z * -3.0)) elif y <= 3.3e-87: tmp = (t * 0.3333333333333333) / (z * y) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e-74) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 3.3e-87) tmp = Float64(Float64(t * 0.3333333333333333) / Float64(z * y)); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.2e-74) tmp = x + (y / (z * -3.0)); elseif (y <= 3.3e-87) tmp = (t * 0.3333333333333333) / (z * y); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e-74], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e-87], N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-74}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-87}:\\
\;\;\;\;\frac{t \cdot 0.3333333333333333}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -2.2000000000000001e-74Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
+-commutative97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
sub-neg97.3%
neg-mul-197.3%
times-frac98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.4%
*-commutative98.4%
Simplified99.7%
Taylor expanded in t around 0 84.4%
neg-mul-184.4%
Simplified84.4%
clear-num84.4%
frac-2neg84.4%
metadata-eval84.4%
add-sqr-sqrt84.3%
sqrt-unprod65.6%
sqr-neg65.6%
sqrt-unprod0.0%
add-sqr-sqrt36.8%
associate-*l/36.8%
neg-mul-136.8%
add-sqr-sqrt36.8%
sqrt-unprod31.5%
sqr-neg31.5%
sqrt-unprod0.0%
add-sqr-sqrt84.5%
div-inv84.6%
metadata-eval84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if -2.2000000000000001e-74 < y < 3.3e-87Initial program 91.6%
Taylor expanded in z around 0 67.8%
Taylor expanded in t around inf 67.4%
associate-*r/67.4%
*-commutative67.4%
Applied egg-rr67.4%
if 3.3e-87 < y Initial program 98.7%
Taylor expanded in t around 0 85.6%
Final simplification78.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.6e-74)
(+ x (/ y (* z -3.0)))
(if (<= y 7.2e-95)
(* 0.3333333333333333 (/ t (* z y)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.6e-74) {
tmp = x + (y / (z * -3.0));
} else if (y <= 7.2e-95) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x - (0.3333333333333333 * (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 <= (-1.6d-74)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 7.2d-95) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.6e-74) {
tmp = x + (y / (z * -3.0));
} else if (y <= 7.2e-95) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.6e-74: tmp = x + (y / (z * -3.0)) elif y <= 7.2e-95: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.6e-74) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 7.2e-95) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.6e-74) tmp = x + (y / (z * -3.0)); elseif (y <= 7.2e-95) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.6e-74], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-95], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-74}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-95}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.5999999999999999e-74Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
+-commutative97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
sub-neg97.3%
neg-mul-197.3%
times-frac98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.4%
*-commutative98.4%
Simplified99.7%
Taylor expanded in t around 0 84.4%
neg-mul-184.4%
Simplified84.4%
clear-num84.4%
frac-2neg84.4%
metadata-eval84.4%
add-sqr-sqrt84.3%
sqrt-unprod65.6%
sqr-neg65.6%
sqrt-unprod0.0%
add-sqr-sqrt36.8%
associate-*l/36.8%
neg-mul-136.8%
add-sqr-sqrt36.8%
sqrt-unprod31.5%
sqr-neg31.5%
sqrt-unprod0.0%
add-sqr-sqrt84.5%
div-inv84.6%
metadata-eval84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if -1.5999999999999999e-74 < y < 7.2e-95Initial program 91.6%
Taylor expanded in z around 0 67.8%
Taylor expanded in t around inf 67.4%
if 7.2e-95 < y Initial program 98.7%
Taylor expanded in t around 0 85.6%
Final simplification78.8%
(FPCore (x y z t) :precision binary64 (if (<= x -2.2e+54) x (if (<= x 4.2e+25) (/ (* y -0.3333333333333333) z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.2e+54) {
tmp = x;
} else if (x <= 4.2e+25) {
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 (x <= (-2.2d+54)) then
tmp = x
else if (x <= 4.2d+25) 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 (x <= -2.2e+54) {
tmp = x;
} else if (x <= 4.2e+25) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.2e+54: tmp = x elif x <= 4.2e+25: tmp = (y * -0.3333333333333333) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.2e+54) tmp = x; elseif (x <= 4.2e+25) tmp = Float64(Float64(y * -0.3333333333333333) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.2e+54) tmp = x; elseif (x <= 4.2e+25) tmp = (y * -0.3333333333333333) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.2e+54], x, If[LessEqual[x, 4.2e+25], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+54}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.1999999999999999e54 or 4.1999999999999998e25 < x Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
distribute-frac-neg95.4%
neg-mul-195.4%
*-commutative95.4%
times-frac95.4%
fma-define95.4%
metadata-eval95.4%
associate-*l*95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in x around inf 56.8%
if -2.1999999999999999e54 < x < 4.1999999999999998e25Initial program 96.0%
sub-neg96.0%
associate-+l+96.0%
distribute-frac-neg96.0%
neg-mul-196.0%
*-commutative96.0%
times-frac95.9%
fma-define95.9%
metadata-eval95.9%
associate-*l*95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in y around inf 60.1%
Taylor expanded in x around 0 48.1%
associate-*r/48.1%
Applied egg-rr48.1%
(FPCore (x y z t) :precision binary64 (if (<= x -5.9e+53) x (if (<= x 8.4e+27) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5.9e+53) {
tmp = x;
} else if (x <= 8.4e+27) {
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 (x <= (-5.9d+53)) then
tmp = x
else if (x <= 8.4d+27) 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 (x <= -5.9e+53) {
tmp = x;
} else if (x <= 8.4e+27) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -5.9e+53: tmp = x elif x <= 8.4e+27: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -5.9e+53) tmp = x; elseif (x <= 8.4e+27) 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 (x <= -5.9e+53) tmp = x; elseif (x <= 8.4e+27) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -5.9e+53], x, If[LessEqual[x, 8.4e+27], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.9 \cdot 10^{+53}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{+27}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -5.8999999999999997e53 or 8.39999999999999978e27 < x Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
distribute-frac-neg95.4%
neg-mul-195.4%
*-commutative95.4%
times-frac95.4%
fma-define95.4%
metadata-eval95.4%
associate-*l*95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in x around inf 56.8%
if -5.8999999999999997e53 < x < 8.39999999999999978e27Initial program 96.0%
sub-neg96.0%
associate-+l+96.0%
distribute-frac-neg96.0%
neg-mul-196.0%
*-commutative96.0%
times-frac95.9%
fma-define95.9%
metadata-eval95.9%
associate-*l*95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in y around inf 60.1%
Taylor expanded in x around 0 48.1%
(FPCore (x y z t) :precision binary64 (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y))))
double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - 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 + ((0.3333333333333333d0 / z) * ((t / y) - y))
end function
public static double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - y));
}
def code(x, y, z, t): return x + ((0.3333333333333333 / z) * ((t / y) - y))
function code(x, y, z, t) return Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))) end
function tmp = code(x, y, z, t) tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)
\end{array}
Initial program 95.7%
sub-neg95.7%
associate-+l+95.7%
+-commutative95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified96.8%
(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 95.7%
sub-neg95.7%
associate-+l+95.7%
distribute-frac-neg95.7%
neg-mul-195.7%
*-commutative95.7%
times-frac95.7%
fma-define95.7%
metadata-eval95.7%
associate-*l*95.7%
*-commutative95.7%
Simplified95.7%
Taylor expanded in x around inf 31.8%
(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 2024140
(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))))