
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - 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 - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - 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 - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
(FPCore (x y z t) :precision binary64 (* x (/ (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x * ((y - z) / (t - 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 - z) / (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y - z) / (t - z));
}
def code(x, y, z, t): return x * ((y - z) / (t - z))
function code(x, y, z, t) return Float64(x * Float64(Float64(y - z) / Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x * ((y - z) / (t - z)); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{y - z}{t - z}
\end{array}
Initial program 82.5%
associate-/l*96.9%
Simplified96.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.26e+110)
x
(if (<= z -2.2e+75)
(* x (/ y (- z)))
(if (<= z -6.8e+69)
x
(if (<= z -2.2e-40)
(/ (* x (- z)) t)
(if (<= z 6.2e-173)
(/ x (/ t y))
(if (<= z 8.5e-89)
(/ (* x (- y)) z)
(if (<= z 4.6e-40) (* x (/ y t)) x))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.26e+110) {
tmp = x;
} else if (z <= -2.2e+75) {
tmp = x * (y / -z);
} else if (z <= -6.8e+69) {
tmp = x;
} else if (z <= -2.2e-40) {
tmp = (x * -z) / t;
} else if (z <= 6.2e-173) {
tmp = x / (t / y);
} else if (z <= 8.5e-89) {
tmp = (x * -y) / z;
} else if (z <= 4.6e-40) {
tmp = x * (y / t);
} 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.26d+110)) then
tmp = x
else if (z <= (-2.2d+75)) then
tmp = x * (y / -z)
else if (z <= (-6.8d+69)) then
tmp = x
else if (z <= (-2.2d-40)) then
tmp = (x * -z) / t
else if (z <= 6.2d-173) then
tmp = x / (t / y)
else if (z <= 8.5d-89) then
tmp = (x * -y) / z
else if (z <= 4.6d-40) then
tmp = x * (y / t)
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.26e+110) {
tmp = x;
} else if (z <= -2.2e+75) {
tmp = x * (y / -z);
} else if (z <= -6.8e+69) {
tmp = x;
} else if (z <= -2.2e-40) {
tmp = (x * -z) / t;
} else if (z <= 6.2e-173) {
tmp = x / (t / y);
} else if (z <= 8.5e-89) {
tmp = (x * -y) / z;
} else if (z <= 4.6e-40) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.26e+110: tmp = x elif z <= -2.2e+75: tmp = x * (y / -z) elif z <= -6.8e+69: tmp = x elif z <= -2.2e-40: tmp = (x * -z) / t elif z <= 6.2e-173: tmp = x / (t / y) elif z <= 8.5e-89: tmp = (x * -y) / z elif z <= 4.6e-40: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.26e+110) tmp = x; elseif (z <= -2.2e+75) tmp = Float64(x * Float64(y / Float64(-z))); elseif (z <= -6.8e+69) tmp = x; elseif (z <= -2.2e-40) tmp = Float64(Float64(x * Float64(-z)) / t); elseif (z <= 6.2e-173) tmp = Float64(x / Float64(t / y)); elseif (z <= 8.5e-89) tmp = Float64(Float64(x * Float64(-y)) / z); elseif (z <= 4.6e-40) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.26e+110) tmp = x; elseif (z <= -2.2e+75) tmp = x * (y / -z); elseif (z <= -6.8e+69) tmp = x; elseif (z <= -2.2e-40) tmp = (x * -z) / t; elseif (z <= 6.2e-173) tmp = x / (t / y); elseif (z <= 8.5e-89) tmp = (x * -y) / z; elseif (z <= 4.6e-40) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.26e+110], x, If[LessEqual[z, -2.2e+75], N[(x * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e+69], x, If[LessEqual[z, -2.2e-40], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 6.2e-173], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-89], N[(N[(x * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 4.6e-40], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.26 \cdot 10^{+110}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{+75}:\\
\;\;\;\;x \cdot \frac{y}{-z}\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{+69}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-40}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-173}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-89}:\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{z}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-40}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.25999999999999992e110 or -2.20000000000000012e75 < z < -6.79999999999999973e69 or 4.6e-40 < z Initial program 70.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 60.5%
if -1.25999999999999992e110 < z < -2.20000000000000012e75Initial program 91.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 66.2%
associate-/l*66.5%
Simplified66.5%
Taylor expanded in t around 0 57.2%
mul-1-neg57.2%
associate-/l*57.4%
distribute-rgt-neg-in57.4%
mul-1-neg57.4%
associate-*r/57.4%
neg-mul-157.4%
Simplified57.4%
if -6.79999999999999973e69 < z < -2.20000000000000009e-40Initial program 99.8%
associate-/l*96.0%
Simplified96.0%
clear-num95.9%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in y around 0 66.1%
associate-*r/66.1%
neg-mul-166.1%
Simplified66.1%
Taylor expanded in t around inf 50.8%
associate-*r/50.8%
mul-1-neg50.8%
*-commutative50.8%
Simplified50.8%
if -2.20000000000000009e-40 < z < 6.20000000000000011e-173Initial program 87.7%
associate-/l*93.9%
Simplified93.9%
clear-num92.6%
un-div-inv93.6%
Applied egg-rr93.6%
Taylor expanded in z around 0 75.5%
if 6.20000000000000011e-173 < z < 8.49999999999999937e-89Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 98.0%
associate-/l*97.9%
Simplified97.9%
Taylor expanded in t around 0 82.5%
associate-*r/82.5%
neg-mul-182.5%
distribute-rgt-neg-in82.5%
Simplified82.5%
if 8.49999999999999937e-89 < z < 4.6e-40Initial program 99.8%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in z around 0 64.0%
associate-/l*64.5%
Simplified64.5%
Final simplification66.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- z)))))
(if (<= z -2.85e+110)
x
(if (<= z -3.2e+78)
t_1
(if (<= z -3e+69)
x
(if (<= z -1.62e-40)
(/ (* x (- z)) t)
(if (<= z 1.7e-154)
(/ x (/ t y))
(if (<= z 8.2e-89) t_1 (if (<= z 2.2e-38) (* x (/ y t)) x)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / -z);
double tmp;
if (z <= -2.85e+110) {
tmp = x;
} else if (z <= -3.2e+78) {
tmp = t_1;
} else if (z <= -3e+69) {
tmp = x;
} else if (z <= -1.62e-40) {
tmp = (x * -z) / t;
} else if (z <= 1.7e-154) {
tmp = x / (t / y);
} else if (z <= 8.2e-89) {
tmp = t_1;
} else if (z <= 2.2e-38) {
tmp = x * (y / t);
} 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) :: t_1
real(8) :: tmp
t_1 = x * (y / -z)
if (z <= (-2.85d+110)) then
tmp = x
else if (z <= (-3.2d+78)) then
tmp = t_1
else if (z <= (-3d+69)) then
tmp = x
else if (z <= (-1.62d-40)) then
tmp = (x * -z) / t
else if (z <= 1.7d-154) then
tmp = x / (t / y)
else if (z <= 8.2d-89) then
tmp = t_1
else if (z <= 2.2d-38) then
tmp = x * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (y / -z);
double tmp;
if (z <= -2.85e+110) {
tmp = x;
} else if (z <= -3.2e+78) {
tmp = t_1;
} else if (z <= -3e+69) {
tmp = x;
} else if (z <= -1.62e-40) {
tmp = (x * -z) / t;
} else if (z <= 1.7e-154) {
tmp = x / (t / y);
} else if (z <= 8.2e-89) {
tmp = t_1;
} else if (z <= 2.2e-38) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / -z) tmp = 0 if z <= -2.85e+110: tmp = x elif z <= -3.2e+78: tmp = t_1 elif z <= -3e+69: tmp = x elif z <= -1.62e-40: tmp = (x * -z) / t elif z <= 1.7e-154: tmp = x / (t / y) elif z <= 8.2e-89: tmp = t_1 elif z <= 2.2e-38: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(-z))) tmp = 0.0 if (z <= -2.85e+110) tmp = x; elseif (z <= -3.2e+78) tmp = t_1; elseif (z <= -3e+69) tmp = x; elseif (z <= -1.62e-40) tmp = Float64(Float64(x * Float64(-z)) / t); elseif (z <= 1.7e-154) tmp = Float64(x / Float64(t / y)); elseif (z <= 8.2e-89) tmp = t_1; elseif (z <= 2.2e-38) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / -z); tmp = 0.0; if (z <= -2.85e+110) tmp = x; elseif (z <= -3.2e+78) tmp = t_1; elseif (z <= -3e+69) tmp = x; elseif (z <= -1.62e-40) tmp = (x * -z) / t; elseif (z <= 1.7e-154) tmp = x / (t / y); elseif (z <= 8.2e-89) tmp = t_1; elseif (z <= 2.2e-38) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.85e+110], x, If[LessEqual[z, -3.2e+78], t$95$1, If[LessEqual[z, -3e+69], x, If[LessEqual[z, -1.62e-40], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.7e-154], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-89], t$95$1, If[LessEqual[z, 2.2e-38], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{-z}\\
\mathbf{if}\;z \leq -2.85 \cdot 10^{+110}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+69}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.62 \cdot 10^{-40}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-154}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-38}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.8500000000000001e110 or -3.19999999999999994e78 < z < -2.99999999999999983e69 or 2.20000000000000007e-38 < z Initial program 70.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 60.5%
if -2.8500000000000001e110 < z < -3.19999999999999994e78 or 1.6999999999999999e-154 < z < 8.1999999999999997e-89Initial program 95.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 81.3%
associate-/l*81.3%
Simplified81.3%
Taylor expanded in t around 0 68.4%
mul-1-neg68.4%
associate-/l*68.4%
distribute-rgt-neg-in68.4%
mul-1-neg68.4%
associate-*r/68.4%
neg-mul-168.4%
Simplified68.4%
if -2.99999999999999983e69 < z < -1.62e-40Initial program 99.8%
associate-/l*96.0%
Simplified96.0%
clear-num95.9%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in y around 0 66.1%
associate-*r/66.1%
neg-mul-166.1%
Simplified66.1%
Taylor expanded in t around inf 50.8%
associate-*r/50.8%
mul-1-neg50.8%
*-commutative50.8%
Simplified50.8%
if -1.62e-40 < z < 1.6999999999999999e-154Initial program 87.8%
associate-/l*94.0%
Simplified94.0%
clear-num92.6%
un-div-inv93.7%
Applied egg-rr93.7%
Taylor expanded in z around 0 75.8%
if 8.1999999999999997e-89 < z < 2.20000000000000007e-38Initial program 99.8%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in z around 0 64.0%
associate-/l*64.5%
Simplified64.5%
Final simplification66.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -1.8e+69)
t_1
(if (<= z -3e+36)
(/ (* x (- z)) t)
(if (or (<= z -6.6e-24) (not (<= z 5.8e-38)))
t_1
(* x (/ y (- t z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.8e+69) {
tmp = t_1;
} else if (z <= -3e+36) {
tmp = (x * -z) / t;
} else if ((z <= -6.6e-24) || !(z <= 5.8e-38)) {
tmp = t_1;
} else {
tmp = x * (y / (t - 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) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / z))
if (z <= (-1.8d+69)) then
tmp = t_1
else if (z <= (-3d+36)) then
tmp = (x * -z) / t
else if ((z <= (-6.6d-24)) .or. (.not. (z <= 5.8d-38))) then
tmp = t_1
else
tmp = x * (y / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.8e+69) {
tmp = t_1;
} else if (z <= -3e+36) {
tmp = (x * -z) / t;
} else if ((z <= -6.6e-24) || !(z <= 5.8e-38)) {
tmp = t_1;
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -1.8e+69: tmp = t_1 elif z <= -3e+36: tmp = (x * -z) / t elif (z <= -6.6e-24) or not (z <= 5.8e-38): tmp = t_1 else: tmp = x * (y / (t - z)) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.8e+69) tmp = t_1; elseif (z <= -3e+36) tmp = Float64(Float64(x * Float64(-z)) / t); elseif ((z <= -6.6e-24) || !(z <= 5.8e-38)) tmp = t_1; else tmp = Float64(x * Float64(y / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.8e+69) tmp = t_1; elseif (z <= -3e+36) tmp = (x * -z) / t; elseif ((z <= -6.6e-24) || ~((z <= 5.8e-38))) tmp = t_1; else tmp = x * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+69], t$95$1, If[LessEqual[z, -3e+36], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[z, -6.6e-24], N[Not[LessEqual[z, 5.8e-38]], $MachinePrecision]], t$95$1, N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+36}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-24} \lor \neg \left(z \leq 5.8 \cdot 10^{-38}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -1.8000000000000001e69 or -3e36 < z < -6.59999999999999968e-24 or 5.79999999999999988e-38 < z Initial program 74.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 59.2%
mul-1-neg59.2%
associate-/l*75.9%
distribute-rgt-neg-in75.9%
distribute-frac-neg75.9%
neg-sub075.9%
associate--r-75.9%
neg-sub075.9%
+-commutative75.9%
sub-neg75.9%
div-sub75.9%
*-inverses75.9%
Simplified75.9%
if -1.8000000000000001e69 < z < -3e36Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 79.2%
associate-*r/79.2%
neg-mul-179.2%
Simplified79.2%
Taylor expanded in t around inf 78.5%
associate-*r/78.5%
mul-1-neg78.5%
*-commutative78.5%
Simplified78.5%
if -6.59999999999999968e-24 < z < 5.79999999999999988e-38Initial program 90.0%
associate-/l*93.4%
Simplified93.4%
Taylor expanded in y around inf 77.7%
associate-/l*83.0%
Simplified83.0%
Final simplification79.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y z)))))
(if (<= z -1.8e+69)
t_1
(if (<= z -3.9e+33)
(/ (* x (- z)) t)
(if (or (<= z -5.2e-24) (not (<= z 1.7e-154))) t_1 (/ x (/ t y)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.8e+69) {
tmp = t_1;
} else if (z <= -3.9e+33) {
tmp = (x * -z) / t;
} else if ((z <= -5.2e-24) || !(z <= 1.7e-154)) {
tmp = t_1;
} else {
tmp = x / (t / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / z))
if (z <= (-1.8d+69)) then
tmp = t_1
else if (z <= (-3.9d+33)) then
tmp = (x * -z) / t
else if ((z <= (-5.2d-24)) .or. (.not. (z <= 1.7d-154))) then
tmp = t_1
else
tmp = x / (t / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / z));
double tmp;
if (z <= -1.8e+69) {
tmp = t_1;
} else if (z <= -3.9e+33) {
tmp = (x * -z) / t;
} else if ((z <= -5.2e-24) || !(z <= 1.7e-154)) {
tmp = t_1;
} else {
tmp = x / (t / y);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / z)) tmp = 0 if z <= -1.8e+69: tmp = t_1 elif z <= -3.9e+33: tmp = (x * -z) / t elif (z <= -5.2e-24) or not (z <= 1.7e-154): tmp = t_1 else: tmp = x / (t / y) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.8e+69) tmp = t_1; elseif (z <= -3.9e+33) tmp = Float64(Float64(x * Float64(-z)) / t); elseif ((z <= -5.2e-24) || !(z <= 1.7e-154)) tmp = t_1; else tmp = Float64(x / Float64(t / y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.8e+69) tmp = t_1; elseif (z <= -3.9e+33) tmp = (x * -z) / t; elseif ((z <= -5.2e-24) || ~((z <= 1.7e-154))) tmp = t_1; else tmp = x / (t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+69], t$95$1, If[LessEqual[z, -3.9e+33], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[z, -5.2e-24], N[Not[LessEqual[z, 1.7e-154]], $MachinePrecision]], t$95$1, N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{+33}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-24} \lor \neg \left(z \leq 1.7 \cdot 10^{-154}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\end{array}
\end{array}
if z < -1.8000000000000001e69 or -3.9000000000000002e33 < z < -5.2e-24 or 1.6999999999999999e-154 < z Initial program 77.7%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in t around 0 58.3%
mul-1-neg58.3%
associate-/l*73.0%
distribute-rgt-neg-in73.0%
distribute-frac-neg73.0%
neg-sub073.0%
associate--r-73.0%
neg-sub073.0%
+-commutative73.0%
sub-neg73.0%
div-sub73.0%
*-inverses73.0%
Simplified73.0%
if -1.8000000000000001e69 < z < -3.9000000000000002e33Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 79.2%
associate-*r/79.2%
neg-mul-179.2%
Simplified79.2%
Taylor expanded in t around inf 78.5%
associate-*r/78.5%
mul-1-neg78.5%
*-commutative78.5%
Simplified78.5%
if -5.2e-24 < z < 1.6999999999999999e-154Initial program 88.2%
associate-/l*93.2%
Simplified93.2%
clear-num91.9%
un-div-inv92.9%
Applied egg-rr92.9%
Taylor expanded in z around 0 74.5%
Final simplification73.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.3e+110)
x
(if (<= z -1.55e+78)
(* x (/ y (- z)))
(if (<= z -1.7e+47)
(/ x (/ t (- z)))
(if (<= z 6e-39) (/ x (/ t y)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.3e+110) {
tmp = x;
} else if (z <= -1.55e+78) {
tmp = x * (y / -z);
} else if (z <= -1.7e+47) {
tmp = x / (t / -z);
} else if (z <= 6e-39) {
tmp = x / (t / y);
} 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.3d+110)) then
tmp = x
else if (z <= (-1.55d+78)) then
tmp = x * (y / -z)
else if (z <= (-1.7d+47)) then
tmp = x / (t / -z)
else if (z <= 6d-39) then
tmp = x / (t / y)
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.3e+110) {
tmp = x;
} else if (z <= -1.55e+78) {
tmp = x * (y / -z);
} else if (z <= -1.7e+47) {
tmp = x / (t / -z);
} else if (z <= 6e-39) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.3e+110: tmp = x elif z <= -1.55e+78: tmp = x * (y / -z) elif z <= -1.7e+47: tmp = x / (t / -z) elif z <= 6e-39: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.3e+110) tmp = x; elseif (z <= -1.55e+78) tmp = Float64(x * Float64(y / Float64(-z))); elseif (z <= -1.7e+47) tmp = Float64(x / Float64(t / Float64(-z))); elseif (z <= 6e-39) tmp = Float64(x / Float64(t / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.3e+110) tmp = x; elseif (z <= -1.55e+78) tmp = x * (y / -z); elseif (z <= -1.7e+47) tmp = x / (t / -z); elseif (z <= 6e-39) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.3e+110], x, If[LessEqual[z, -1.55e+78], N[(x * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.7e+47], N[(x / N[(t / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-39], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+110}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{+78}:\\
\;\;\;\;x \cdot \frac{y}{-z}\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+47}:\\
\;\;\;\;\frac{x}{\frac{t}{-z}}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.3e110 or 6.00000000000000055e-39 < z Initial program 69.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 60.1%
if -1.3e110 < z < -1.55e78Initial program 91.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 66.2%
associate-/l*66.5%
Simplified66.5%
Taylor expanded in t around 0 57.2%
mul-1-neg57.2%
associate-/l*57.4%
distribute-rgt-neg-in57.4%
mul-1-neg57.4%
associate-*r/57.4%
neg-mul-157.4%
Simplified57.4%
if -1.55e78 < z < -1.6999999999999999e47Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 88.1%
associate-*r/88.1%
neg-mul-188.1%
Simplified88.1%
Taylor expanded in t around inf 63.9%
associate-*r/63.9%
neg-mul-163.9%
Simplified63.9%
if -1.6999999999999999e47 < z < 6.00000000000000055e-39Initial program 91.1%
associate-/l*94.1%
Simplified94.1%
clear-num93.1%
un-div-inv93.9%
Applied egg-rr93.9%
Taylor expanded in z around 0 65.4%
Final simplification62.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.42e+110)
x
(if (<= z -3.6e+76)
(* x (/ y (- z)))
(if (<= z -3.8e+45)
(* x (/ (- z) t))
(if (<= z 7.2e-38) (/ x (/ t y)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.42e+110) {
tmp = x;
} else if (z <= -3.6e+76) {
tmp = x * (y / -z);
} else if (z <= -3.8e+45) {
tmp = x * (-z / t);
} else if (z <= 7.2e-38) {
tmp = x / (t / y);
} 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.42d+110)) then
tmp = x
else if (z <= (-3.6d+76)) then
tmp = x * (y / -z)
else if (z <= (-3.8d+45)) then
tmp = x * (-z / t)
else if (z <= 7.2d-38) then
tmp = x / (t / y)
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.42e+110) {
tmp = x;
} else if (z <= -3.6e+76) {
tmp = x * (y / -z);
} else if (z <= -3.8e+45) {
tmp = x * (-z / t);
} else if (z <= 7.2e-38) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.42e+110: tmp = x elif z <= -3.6e+76: tmp = x * (y / -z) elif z <= -3.8e+45: tmp = x * (-z / t) elif z <= 7.2e-38: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.42e+110) tmp = x; elseif (z <= -3.6e+76) tmp = Float64(x * Float64(y / Float64(-z))); elseif (z <= -3.8e+45) tmp = Float64(x * Float64(Float64(-z) / t)); elseif (z <= 7.2e-38) tmp = Float64(x / Float64(t / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.42e+110) tmp = x; elseif (z <= -3.6e+76) tmp = x * (y / -z); elseif (z <= -3.8e+45) tmp = x * (-z / t); elseif (z <= 7.2e-38) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.42e+110], x, If[LessEqual[z, -3.6e+76], N[(x * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.8e+45], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e-38], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+110}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{+76}:\\
\;\;\;\;x \cdot \frac{y}{-z}\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+45}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.4200000000000001e110 or 7.2000000000000001e-38 < z Initial program 69.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 60.1%
if -1.4200000000000001e110 < z < -3.6000000000000003e76Initial program 91.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 66.2%
associate-/l*66.5%
Simplified66.5%
Taylor expanded in t around 0 57.2%
mul-1-neg57.2%
associate-/l*57.4%
distribute-rgt-neg-in57.4%
mul-1-neg57.4%
associate-*r/57.4%
neg-mul-157.4%
Simplified57.4%
if -3.6000000000000003e76 < z < -3.8000000000000002e45Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 88.1%
associate-*r/88.1%
neg-mul-188.1%
Simplified88.1%
Taylor expanded in t around inf 75.6%
associate-*r/75.6%
mul-1-neg75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in z around 0 75.6%
mul-1-neg75.6%
associate-*r/63.9%
distribute-rgt-neg-in63.9%
Simplified63.9%
if -3.8000000000000002e45 < z < 7.2000000000000001e-38Initial program 91.1%
associate-/l*94.1%
Simplified94.1%
clear-num93.1%
un-div-inv93.9%
Applied egg-rr93.9%
Taylor expanded in z around 0 65.4%
Final simplification62.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ (- y z) t))))
(if (<= t -6600000.0)
t_1
(if (<= t 6.4e-121)
(- x (* x (/ y z)))
(if (<= t 1.1e+26) (* x (/ y (- t z))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y - z) / t);
double tmp;
if (t <= -6600000.0) {
tmp = t_1;
} else if (t <= 6.4e-121) {
tmp = x - (x * (y / z));
} else if (t <= 1.1e+26) {
tmp = x * (y / (t - z));
} 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 = x * ((y - z) / t)
if (t <= (-6600000.0d0)) then
tmp = t_1
else if (t <= 6.4d-121) then
tmp = x - (x * (y / z))
else if (t <= 1.1d+26) then
tmp = x * (y / (t - z))
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 = x * ((y - z) / t);
double tmp;
if (t <= -6600000.0) {
tmp = t_1;
} else if (t <= 6.4e-121) {
tmp = x - (x * (y / z));
} else if (t <= 1.1e+26) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y - z) / t) tmp = 0 if t <= -6600000.0: tmp = t_1 elif t <= 6.4e-121: tmp = x - (x * (y / z)) elif t <= 1.1e+26: tmp = x * (y / (t - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y - z) / t)) tmp = 0.0 if (t <= -6600000.0) tmp = t_1; elseif (t <= 6.4e-121) tmp = Float64(x - Float64(x * Float64(y / z))); elseif (t <= 1.1e+26) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y - z) / t); tmp = 0.0; if (t <= -6600000.0) tmp = t_1; elseif (t <= 6.4e-121) tmp = x - (x * (y / z)); elseif (t <= 1.1e+26) tmp = x * (y / (t - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6600000.0], t$95$1, If[LessEqual[t, 6.4e-121], N[(x - N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+26], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y - z}{t}\\
\mathbf{if}\;t \leq -6600000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-121}:\\
\;\;\;\;x - x \cdot \frac{y}{z}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.6e6 or 1.10000000000000004e26 < t Initial program 78.5%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in t around inf 64.6%
associate-/l*75.5%
Simplified75.5%
if -6.6e6 < t < 6.40000000000000038e-121Initial program 85.4%
remove-double-neg85.4%
distribute-lft-neg-out85.4%
distribute-neg-frac85.4%
distribute-neg-frac285.4%
distribute-lft-neg-out85.4%
distribute-rgt-neg-in85.4%
sub-neg85.4%
distribute-neg-in85.4%
remove-double-neg85.4%
+-commutative85.4%
sub-neg85.4%
sub-neg85.4%
distribute-neg-in85.4%
remove-double-neg85.4%
+-commutative85.4%
sub-neg85.4%
Simplified85.4%
Taylor expanded in t around 0 77.1%
Taylor expanded in z around inf 82.7%
mul-1-neg82.7%
unsub-neg82.7%
associate-/l*89.2%
Simplified89.2%
if 6.40000000000000038e-121 < t < 1.10000000000000004e26Initial program 90.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around inf 64.0%
associate-/l*72.9%
Simplified72.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ (- y z) t))))
(if (<= t -4100000.0)
t_1
(if (<= t 3.5e-120)
(* x (- 1.0 (/ y z)))
(if (<= t 9.5e+27) (* x (/ y (- t z))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y - z) / t);
double tmp;
if (t <= -4100000.0) {
tmp = t_1;
} else if (t <= 3.5e-120) {
tmp = x * (1.0 - (y / z));
} else if (t <= 9.5e+27) {
tmp = x * (y / (t - z));
} 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 = x * ((y - z) / t)
if (t <= (-4100000.0d0)) then
tmp = t_1
else if (t <= 3.5d-120) then
tmp = x * (1.0d0 - (y / z))
else if (t <= 9.5d+27) then
tmp = x * (y / (t - z))
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 = x * ((y - z) / t);
double tmp;
if (t <= -4100000.0) {
tmp = t_1;
} else if (t <= 3.5e-120) {
tmp = x * (1.0 - (y / z));
} else if (t <= 9.5e+27) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y - z) / t) tmp = 0 if t <= -4100000.0: tmp = t_1 elif t <= 3.5e-120: tmp = x * (1.0 - (y / z)) elif t <= 9.5e+27: tmp = x * (y / (t - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y - z) / t)) tmp = 0.0 if (t <= -4100000.0) tmp = t_1; elseif (t <= 3.5e-120) tmp = Float64(x * Float64(1.0 - Float64(y / z))); elseif (t <= 9.5e+27) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y - z) / t); tmp = 0.0; if (t <= -4100000.0) tmp = t_1; elseif (t <= 3.5e-120) tmp = x * (1.0 - (y / z)); elseif (t <= 9.5e+27) tmp = x * (y / (t - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4100000.0], t$95$1, If[LessEqual[t, 3.5e-120], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+27], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y - z}{t}\\
\mathbf{if}\;t \leq -4100000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-120}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+27}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.1e6 or 9.4999999999999997e27 < t Initial program 78.5%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in t around inf 64.6%
associate-/l*75.5%
Simplified75.5%
if -4.1e6 < t < 3.5e-120Initial program 85.4%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in t around 0 77.1%
mul-1-neg77.1%
associate-/l*89.2%
distribute-rgt-neg-in89.2%
distribute-frac-neg89.2%
neg-sub089.2%
associate--r-89.2%
neg-sub089.2%
+-commutative89.2%
sub-neg89.2%
div-sub89.1%
*-inverses89.1%
Simplified89.1%
if 3.5e-120 < t < 9.4999999999999997e27Initial program 90.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around inf 64.0%
associate-/l*72.9%
Simplified72.9%
(FPCore (x y z t) :precision binary64 (if (<= z -6.1e-24) (* x (/ z (- z t))) (if (<= z 8e-38) (* x (/ y (- t z))) (* x (- 1.0 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.1e-24) {
tmp = x * (z / (z - t));
} else if (z <= 8e-38) {
tmp = x * (y / (t - z));
} else {
tmp = x * (1.0 - (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 <= (-6.1d-24)) then
tmp = x * (z / (z - t))
else if (z <= 8d-38) then
tmp = x * (y / (t - z))
else
tmp = x * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.1e-24) {
tmp = x * (z / (z - t));
} else if (z <= 8e-38) {
tmp = x * (y / (t - z));
} else {
tmp = x * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.1e-24: tmp = x * (z / (z - t)) elif z <= 8e-38: tmp = x * (y / (t - z)) else: tmp = x * (1.0 - (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.1e-24) tmp = Float64(x * Float64(z / Float64(z - t))); elseif (z <= 8e-38) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = Float64(x * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.1e-24) tmp = x * (z / (z - t)); elseif (z <= 8e-38) tmp = x * (y / (t - z)); else tmp = x * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.1e-24], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-38], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.1 \cdot 10^{-24}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-38}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -6.10000000000000036e-24Initial program 82.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 57.7%
mul-1-neg57.7%
distribute-neg-frac257.7%
neg-sub057.7%
associate--r-57.7%
neg-sub057.7%
+-commutative57.7%
sub-neg57.7%
associate-/l*72.9%
Simplified72.9%
if -6.10000000000000036e-24 < z < 7.9999999999999997e-38Initial program 90.0%
associate-/l*93.4%
Simplified93.4%
Taylor expanded in y around inf 77.7%
associate-/l*83.0%
Simplified83.0%
if 7.9999999999999997e-38 < z Initial program 68.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 55.0%
mul-1-neg55.0%
associate-/l*77.5%
distribute-rgt-neg-in77.5%
distribute-frac-neg77.5%
neg-sub077.5%
associate--r-77.5%
neg-sub077.5%
+-commutative77.5%
sub-neg77.5%
div-sub77.5%
*-inverses77.5%
Simplified77.5%
(FPCore (x y z t) :precision binary64 (if (<= z -7e+99) x (if (<= z 2.2e-38) (/ x (/ t y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7e+99) {
tmp = x;
} else if (z <= 2.2e-38) {
tmp = x / (t / y);
} 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 <= (-7d+99)) then
tmp = x
else if (z <= 2.2d-38) then
tmp = x / (t / y)
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 <= -7e+99) {
tmp = x;
} else if (z <= 2.2e-38) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7e+99: tmp = x elif z <= 2.2e-38: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7e+99) tmp = x; elseif (z <= 2.2e-38) tmp = Float64(x / Float64(t / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7e+99) tmp = x; elseif (z <= 2.2e-38) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7e+99], x, If[LessEqual[z, 2.2e-38], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+99}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.9999999999999995e99 or 2.20000000000000007e-38 < z Initial program 69.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.9%
if -6.9999999999999995e99 < z < 2.20000000000000007e-38Initial program 92.0%
associate-/l*94.7%
Simplified94.7%
clear-num93.8%
un-div-inv94.5%
Applied egg-rr94.5%
Taylor expanded in z around 0 62.4%
(FPCore (x y z t) :precision binary64 (if (<= z -1e+100) x (if (<= z 6e-38) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1e+100) {
tmp = x;
} else if (z <= 6e-38) {
tmp = x * (y / t);
} 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 <= (-1d+100)) then
tmp = x
else if (z <= 6d-38) then
tmp = x * (y / t)
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 <= -1e+100) {
tmp = x;
} else if (z <= 6e-38) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1e+100: tmp = x elif z <= 6e-38: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1e+100) tmp = x; elseif (z <= 6e-38) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1e+100) tmp = x; elseif (z <= 6e-38) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1e+100], x, If[LessEqual[z, 6e-38], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+100}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-38}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.00000000000000002e100 or 5.99999999999999977e-38 < z Initial program 69.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.9%
if -1.00000000000000002e100 < z < 5.99999999999999977e-38Initial program 92.0%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in z around 0 57.4%
associate-/l*62.1%
Simplified62.1%
(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 82.5%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in z around inf 31.6%
(FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - 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 / ((t - z) / (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
def code(x, y, z, t): return x / ((t - z) / (y - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(t - z) / Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x / ((t - z) / (y - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}
herbie shell --seed 2024085
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:alt
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))