
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
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 - x) * z) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
def code(x, y, z, t): return x + (((y - x) * z) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(y - x) * z) / t)) end
function tmp = code(x, y, z, t) tmp = x + (((y - x) * z) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot z}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
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 - x) * z) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
def code(x, y, z, t): return x + (((y - x) * z) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(y - x) * z) / t)) end
function tmp = code(x, y, z, t) tmp = x + (((y - x) * z) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot z}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= x 1.45e-143) (+ x (/ z (/ t (- y x)))) (+ x (/ (- y x) (/ t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.45e-143) {
tmp = x + (z / (t / (y - x)));
} else {
tmp = x + ((y - x) / (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) :: tmp
if (x <= 1.45d-143) then
tmp = x + (z / (t / (y - x)))
else
tmp = x + ((y - x) / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 1.45e-143) {
tmp = x + (z / (t / (y - x)));
} else {
tmp = x + ((y - x) / (t / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= 1.45e-143: tmp = x + (z / (t / (y - x))) else: tmp = x + ((y - x) / (t / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= 1.45e-143) tmp = Float64(x + Float64(z / Float64(t / Float64(y - x)))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= 1.45e-143) tmp = x + (z / (t / (y - x))); else tmp = x + ((y - x) / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, 1.45e-143], N[(x + N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.45 \cdot 10^{-143}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\end{array}
\end{array}
if x < 1.45e-143Initial program 92.6%
associate-*l/95.9%
Simplified95.9%
*-commutative95.9%
clear-num95.9%
un-div-inv97.2%
Applied egg-rr97.2%
if 1.45e-143 < x Initial program 91.6%
associate-/l*99.9%
Simplified99.9%
Final simplification98.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ y t))) (t_2 (* z (/ x (- t)))))
(if (<= z -1.4e+259)
(/ z (/ t y))
(if (<= z -1.05e+211)
t_2
(if (<= z -4.3e+155)
t_1
(if (<= z -0.86)
t_2
(if (<= z -9.5e-107)
(/ (* z y) t)
(if (<= z 2.1e-57) x (if (<= z 5.4e+218) t_1 t_2)))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (y / t);
double t_2 = z * (x / -t);
double tmp;
if (z <= -1.4e+259) {
tmp = z / (t / y);
} else if (z <= -1.05e+211) {
tmp = t_2;
} else if (z <= -4.3e+155) {
tmp = t_1;
} else if (z <= -0.86) {
tmp = t_2;
} else if (z <= -9.5e-107) {
tmp = (z * y) / t;
} else if (z <= 2.1e-57) {
tmp = x;
} else if (z <= 5.4e+218) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = z * (y / t)
t_2 = z * (x / -t)
if (z <= (-1.4d+259)) then
tmp = z / (t / y)
else if (z <= (-1.05d+211)) then
tmp = t_2
else if (z <= (-4.3d+155)) then
tmp = t_1
else if (z <= (-0.86d0)) then
tmp = t_2
else if (z <= (-9.5d-107)) then
tmp = (z * y) / t
else if (z <= 2.1d-57) then
tmp = x
else if (z <= 5.4d+218) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (y / t);
double t_2 = z * (x / -t);
double tmp;
if (z <= -1.4e+259) {
tmp = z / (t / y);
} else if (z <= -1.05e+211) {
tmp = t_2;
} else if (z <= -4.3e+155) {
tmp = t_1;
} else if (z <= -0.86) {
tmp = t_2;
} else if (z <= -9.5e-107) {
tmp = (z * y) / t;
} else if (z <= 2.1e-57) {
tmp = x;
} else if (z <= 5.4e+218) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (y / t) t_2 = z * (x / -t) tmp = 0 if z <= -1.4e+259: tmp = z / (t / y) elif z <= -1.05e+211: tmp = t_2 elif z <= -4.3e+155: tmp = t_1 elif z <= -0.86: tmp = t_2 elif z <= -9.5e-107: tmp = (z * y) / t elif z <= 2.1e-57: tmp = x elif z <= 5.4e+218: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(y / t)) t_2 = Float64(z * Float64(x / Float64(-t))) tmp = 0.0 if (z <= -1.4e+259) tmp = Float64(z / Float64(t / y)); elseif (z <= -1.05e+211) tmp = t_2; elseif (z <= -4.3e+155) tmp = t_1; elseif (z <= -0.86) tmp = t_2; elseif (z <= -9.5e-107) tmp = Float64(Float64(z * y) / t); elseif (z <= 2.1e-57) tmp = x; elseif (z <= 5.4e+218) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (y / t); t_2 = z * (x / -t); tmp = 0.0; if (z <= -1.4e+259) tmp = z / (t / y); elseif (z <= -1.05e+211) tmp = t_2; elseif (z <= -4.3e+155) tmp = t_1; elseif (z <= -0.86) tmp = t_2; elseif (z <= -9.5e-107) tmp = (z * y) / t; elseif (z <= 2.1e-57) tmp = x; elseif (z <= 5.4e+218) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x / (-t)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+259], N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.05e+211], t$95$2, If[LessEqual[z, -4.3e+155], t$95$1, If[LessEqual[z, -0.86], t$95$2, If[LessEqual[z, -9.5e-107], N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 2.1e-57], x, If[LessEqual[z, 5.4e+218], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{t}\\
t_2 := z \cdot \frac{x}{-t}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+259}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+211}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{+155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.86:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-107}:\\
\;\;\;\;\frac{z \cdot y}{t}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+218}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.4e259Initial program 82.9%
Taylor expanded in t around 0 82.9%
Taylor expanded in y around inf 73.8%
*-commutative73.8%
Simplified73.8%
associate-/l*82.5%
associate-/r/82.4%
Applied egg-rr82.4%
Taylor expanded in z around 0 73.8%
*-commutative73.8%
associate-/l*82.5%
Simplified82.5%
if -1.4e259 < z < -1.05e211 or -4.3000000000000002e155 < z < -0.859999999999999987 or 5.40000000000000025e218 < z Initial program 87.9%
Taylor expanded in t around 0 79.8%
Taylor expanded in y around 0 57.5%
mul-1-neg57.5%
distribute-rgt-neg-out57.5%
Simplified57.5%
frac-2neg57.5%
div-inv57.4%
distribute-rgt-neg-out57.4%
remove-double-neg57.4%
Applied egg-rr57.4%
associate-*l*63.0%
associate-*r/63.1%
*-rgt-identity63.1%
Simplified63.1%
if -1.05e211 < z < -4.3000000000000002e155 or 2.0999999999999999e-57 < z < 5.40000000000000025e218Initial program 87.0%
Taylor expanded in t around 0 78.5%
Taylor expanded in y around inf 58.3%
*-commutative58.3%
Simplified58.3%
associate-/l*68.3%
associate-/r/64.3%
Applied egg-rr64.3%
Taylor expanded in z around 0 58.3%
associate-*l/68.4%
Simplified68.4%
if -0.859999999999999987 < z < -9.4999999999999999e-107Initial program 99.8%
Taylor expanded in t around 0 69.7%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
Simplified60.4%
if -9.4999999999999999e-107 < z < 2.0999999999999999e-57Initial program 98.1%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in t around inf 69.9%
Final simplification67.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ y t))) (t_2 (* x (/ (- z) t))))
(if (<= z -1.7e+259)
(/ z (/ t y))
(if (<= z -7.5e+226)
t_2
(if (<= z -1.85e+146)
t_1
(if (<= z -0.095)
(* z (/ x (- t)))
(if (<= z -3.4e-110)
(/ (* z y) t)
(if (<= z 1.9e-57) x (if (<= z 2.4e+218) t_1 t_2)))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (y / t);
double t_2 = x * (-z / t);
double tmp;
if (z <= -1.7e+259) {
tmp = z / (t / y);
} else if (z <= -7.5e+226) {
tmp = t_2;
} else if (z <= -1.85e+146) {
tmp = t_1;
} else if (z <= -0.095) {
tmp = z * (x / -t);
} else if (z <= -3.4e-110) {
tmp = (z * y) / t;
} else if (z <= 1.9e-57) {
tmp = x;
} else if (z <= 2.4e+218) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = z * (y / t)
t_2 = x * (-z / t)
if (z <= (-1.7d+259)) then
tmp = z / (t / y)
else if (z <= (-7.5d+226)) then
tmp = t_2
else if (z <= (-1.85d+146)) then
tmp = t_1
else if (z <= (-0.095d0)) then
tmp = z * (x / -t)
else if (z <= (-3.4d-110)) then
tmp = (z * y) / t
else if (z <= 1.9d-57) then
tmp = x
else if (z <= 2.4d+218) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (y / t);
double t_2 = x * (-z / t);
double tmp;
if (z <= -1.7e+259) {
tmp = z / (t / y);
} else if (z <= -7.5e+226) {
tmp = t_2;
} else if (z <= -1.85e+146) {
tmp = t_1;
} else if (z <= -0.095) {
tmp = z * (x / -t);
} else if (z <= -3.4e-110) {
tmp = (z * y) / t;
} else if (z <= 1.9e-57) {
tmp = x;
} else if (z <= 2.4e+218) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (y / t) t_2 = x * (-z / t) tmp = 0 if z <= -1.7e+259: tmp = z / (t / y) elif z <= -7.5e+226: tmp = t_2 elif z <= -1.85e+146: tmp = t_1 elif z <= -0.095: tmp = z * (x / -t) elif z <= -3.4e-110: tmp = (z * y) / t elif z <= 1.9e-57: tmp = x elif z <= 2.4e+218: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(y / t)) t_2 = Float64(x * Float64(Float64(-z) / t)) tmp = 0.0 if (z <= -1.7e+259) tmp = Float64(z / Float64(t / y)); elseif (z <= -7.5e+226) tmp = t_2; elseif (z <= -1.85e+146) tmp = t_1; elseif (z <= -0.095) tmp = Float64(z * Float64(x / Float64(-t))); elseif (z <= -3.4e-110) tmp = Float64(Float64(z * y) / t); elseif (z <= 1.9e-57) tmp = x; elseif (z <= 2.4e+218) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (y / t); t_2 = x * (-z / t); tmp = 0.0; if (z <= -1.7e+259) tmp = z / (t / y); elseif (z <= -7.5e+226) tmp = t_2; elseif (z <= -1.85e+146) tmp = t_1; elseif (z <= -0.095) tmp = z * (x / -t); elseif (z <= -3.4e-110) tmp = (z * y) / t; elseif (z <= 1.9e-57) tmp = x; elseif (z <= 2.4e+218) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+259], N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e+226], t$95$2, If[LessEqual[z, -1.85e+146], t$95$1, If[LessEqual[z, -0.095], N[(z * N[(x / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.4e-110], N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.9e-57], x, If[LessEqual[z, 2.4e+218], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{t}\\
t_2 := x \cdot \frac{-z}{t}\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+259}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{+226}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+146}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.095:\\
\;\;\;\;z \cdot \frac{x}{-t}\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-110}:\\
\;\;\;\;\frac{z \cdot y}{t}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+218}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.69999999999999995e259Initial program 82.9%
Taylor expanded in t around 0 82.9%
Taylor expanded in y around inf 73.8%
*-commutative73.8%
Simplified73.8%
associate-/l*82.5%
associate-/r/82.4%
Applied egg-rr82.4%
Taylor expanded in z around 0 73.8%
*-commutative73.8%
associate-/l*82.5%
Simplified82.5%
if -1.69999999999999995e259 < z < -7.49999999999999964e226 or 2.39999999999999981e218 < z Initial program 80.6%
Taylor expanded in t around 0 76.5%
Taylor expanded in y around 0 57.4%
mul-1-neg57.4%
distribute-rgt-neg-out57.4%
Simplified57.4%
*-commutative57.4%
distribute-lft-neg-out57.4%
distribute-neg-frac57.4%
associate-*r/76.7%
*-commutative76.7%
distribute-lft-neg-in76.7%
Applied egg-rr76.7%
if -7.49999999999999964e226 < z < -1.85000000000000002e146 or 1.8999999999999999e-57 < z < 2.39999999999999981e218Initial program 86.3%
Taylor expanded in t around 0 78.2%
Taylor expanded in y around inf 57.5%
*-commutative57.5%
Simplified57.5%
associate-/l*68.3%
associate-/r/64.4%
Applied egg-rr64.4%
Taylor expanded in z around 0 57.5%
associate-*l/68.3%
Simplified68.3%
if -1.85000000000000002e146 < z < -0.095000000000000001Initial program 94.3%
Taylor expanded in t around 0 82.8%
Taylor expanded in y around 0 56.7%
mul-1-neg56.7%
distribute-rgt-neg-out56.7%
Simplified56.7%
frac-2neg56.7%
div-inv56.6%
distribute-rgt-neg-out56.6%
remove-double-neg56.6%
Applied egg-rr56.6%
associate-*l*56.6%
associate-*r/56.6%
*-rgt-identity56.6%
Simplified56.6%
if -0.095000000000000001 < z < -3.4000000000000001e-110Initial program 99.8%
Taylor expanded in t around 0 69.7%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
Simplified60.4%
if -3.4000000000000001e-110 < z < 1.8999999999999999e-57Initial program 98.1%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in t around inf 69.9%
Final simplification68.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ y t))) (t_2 (* x (/ (- z) t))))
(if (<= z -2.5e+259)
(/ z (/ t y))
(if (<= z -2.3e+226)
t_2
(if (<= z -1.7e+146)
t_1
(if (<= z -1.0)
(/ (* x (- z)) t)
(if (<= z -4.8e-110)
(/ (* z y) t)
(if (<= z 1.6e-57) x (if (<= z 2.35e+213) t_1 t_2)))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (y / t);
double t_2 = x * (-z / t);
double tmp;
if (z <= -2.5e+259) {
tmp = z / (t / y);
} else if (z <= -2.3e+226) {
tmp = t_2;
} else if (z <= -1.7e+146) {
tmp = t_1;
} else if (z <= -1.0) {
tmp = (x * -z) / t;
} else if (z <= -4.8e-110) {
tmp = (z * y) / t;
} else if (z <= 1.6e-57) {
tmp = x;
} else if (z <= 2.35e+213) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = z * (y / t)
t_2 = x * (-z / t)
if (z <= (-2.5d+259)) then
tmp = z / (t / y)
else if (z <= (-2.3d+226)) then
tmp = t_2
else if (z <= (-1.7d+146)) then
tmp = t_1
else if (z <= (-1.0d0)) then
tmp = (x * -z) / t
else if (z <= (-4.8d-110)) then
tmp = (z * y) / t
else if (z <= 1.6d-57) then
tmp = x
else if (z <= 2.35d+213) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (y / t);
double t_2 = x * (-z / t);
double tmp;
if (z <= -2.5e+259) {
tmp = z / (t / y);
} else if (z <= -2.3e+226) {
tmp = t_2;
} else if (z <= -1.7e+146) {
tmp = t_1;
} else if (z <= -1.0) {
tmp = (x * -z) / t;
} else if (z <= -4.8e-110) {
tmp = (z * y) / t;
} else if (z <= 1.6e-57) {
tmp = x;
} else if (z <= 2.35e+213) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (y / t) t_2 = x * (-z / t) tmp = 0 if z <= -2.5e+259: tmp = z / (t / y) elif z <= -2.3e+226: tmp = t_2 elif z <= -1.7e+146: tmp = t_1 elif z <= -1.0: tmp = (x * -z) / t elif z <= -4.8e-110: tmp = (z * y) / t elif z <= 1.6e-57: tmp = x elif z <= 2.35e+213: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(y / t)) t_2 = Float64(x * Float64(Float64(-z) / t)) tmp = 0.0 if (z <= -2.5e+259) tmp = Float64(z / Float64(t / y)); elseif (z <= -2.3e+226) tmp = t_2; elseif (z <= -1.7e+146) tmp = t_1; elseif (z <= -1.0) tmp = Float64(Float64(x * Float64(-z)) / t); elseif (z <= -4.8e-110) tmp = Float64(Float64(z * y) / t); elseif (z <= 1.6e-57) tmp = x; elseif (z <= 2.35e+213) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (y / t); t_2 = x * (-z / t); tmp = 0.0; if (z <= -2.5e+259) tmp = z / (t / y); elseif (z <= -2.3e+226) tmp = t_2; elseif (z <= -1.7e+146) tmp = t_1; elseif (z <= -1.0) tmp = (x * -z) / t; elseif (z <= -4.8e-110) tmp = (z * y) / t; elseif (z <= 1.6e-57) tmp = x; elseif (z <= 2.35e+213) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+259], N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e+226], t$95$2, If[LessEqual[z, -1.7e+146], t$95$1, If[LessEqual[z, -1.0], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -4.8e-110], N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.6e-57], x, If[LessEqual[z, 2.35e+213], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{t}\\
t_2 := x \cdot \frac{-z}{t}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+259}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+226}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+146}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-110}:\\
\;\;\;\;\frac{z \cdot y}{t}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{+213}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.50000000000000016e259Initial program 82.9%
Taylor expanded in t around 0 82.9%
Taylor expanded in y around inf 73.8%
*-commutative73.8%
Simplified73.8%
associate-/l*82.5%
associate-/r/82.4%
Applied egg-rr82.4%
Taylor expanded in z around 0 73.8%
*-commutative73.8%
associate-/l*82.5%
Simplified82.5%
if -2.50000000000000016e259 < z < -2.29999999999999995e226 or 2.3499999999999999e213 < z Initial program 80.6%
Taylor expanded in t around 0 76.5%
Taylor expanded in y around 0 57.4%
mul-1-neg57.4%
distribute-rgt-neg-out57.4%
Simplified57.4%
*-commutative57.4%
distribute-lft-neg-out57.4%
distribute-neg-frac57.4%
associate-*r/76.7%
*-commutative76.7%
distribute-lft-neg-in76.7%
Applied egg-rr76.7%
if -2.29999999999999995e226 < z < -1.69999999999999995e146 or 1.6e-57 < z < 2.3499999999999999e213Initial program 86.3%
Taylor expanded in t around 0 78.2%
Taylor expanded in y around inf 57.5%
*-commutative57.5%
Simplified57.5%
associate-/l*68.3%
associate-/r/64.4%
Applied egg-rr64.4%
Taylor expanded in z around 0 57.5%
associate-*l/68.3%
Simplified68.3%
if -1.69999999999999995e146 < z < -1Initial program 94.3%
Taylor expanded in t around 0 82.8%
Taylor expanded in y around 0 56.7%
mul-1-neg56.7%
distribute-rgt-neg-out56.7%
Simplified56.7%
if -1 < z < -4.80000000000000013e-110Initial program 99.8%
Taylor expanded in t around 0 69.7%
Taylor expanded in y around inf 60.4%
*-commutative60.4%
Simplified60.4%
if -4.80000000000000013e-110 < z < 1.6e-57Initial program 98.1%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in t around inf 69.9%
Final simplification68.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= x -6.2e+164)
t_1
(if (<= x -4.9e+109)
(/ (- z) (/ t x))
(if (<= x 2.8e+123) t_1 (* x (/ (- z) t)))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * (z / t));
double tmp;
if (x <= -6.2e+164) {
tmp = t_1;
} else if (x <= -4.9e+109) {
tmp = -z / (t / x);
} else if (x <= 2.8e+123) {
tmp = t_1;
} else {
tmp = x * (-z / t);
}
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 (x <= (-6.2d+164)) then
tmp = t_1
else if (x <= (-4.9d+109)) then
tmp = -z / (t / x)
else if (x <= 2.8d+123) then
tmp = t_1
else
tmp = x * (-z / t)
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 (x <= -6.2e+164) {
tmp = t_1;
} else if (x <= -4.9e+109) {
tmp = -z / (t / x);
} else if (x <= 2.8e+123) {
tmp = t_1;
} else {
tmp = x * (-z / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * (z / t)) tmp = 0 if x <= -6.2e+164: tmp = t_1 elif x <= -4.9e+109: tmp = -z / (t / x) elif x <= 2.8e+123: tmp = t_1 else: tmp = x * (-z / t) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (x <= -6.2e+164) tmp = t_1; elseif (x <= -4.9e+109) tmp = Float64(Float64(-z) / Float64(t / x)); elseif (x <= 2.8e+123) tmp = t_1; else tmp = Float64(x * Float64(Float64(-z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * (z / t)); tmp = 0.0; if (x <= -6.2e+164) tmp = t_1; elseif (x <= -4.9e+109) tmp = -z / (t / x); elseif (x <= 2.8e+123) tmp = t_1; else tmp = x * (-z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.2e+164], t$95$1, If[LessEqual[x, -4.9e+109], N[((-z) / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+123], t$95$1, N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+164}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -4.9 \cdot 10^{+109}:\\
\;\;\;\;\frac{-z}{\frac{t}{x}}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+123}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\end{array}
\end{array}
if x < -6.2000000000000003e164 or -4.9000000000000003e109 < x < 2.80000000000000011e123Initial program 93.3%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in y around inf 76.3%
associate-*r/77.3%
Simplified77.3%
if -6.2000000000000003e164 < x < -4.9000000000000003e109Initial program 83.6%
Taylor expanded in t around 0 72.0%
Taylor expanded in y around 0 71.5%
mul-1-neg71.5%
distribute-rgt-neg-out71.5%
Simplified71.5%
frac-2neg71.5%
div-inv71.5%
distribute-rgt-neg-out71.5%
remove-double-neg71.5%
Applied egg-rr71.5%
associate-*l*79.2%
associate-*r/79.2%
*-rgt-identity79.2%
Simplified79.2%
frac-2neg79.2%
remove-double-neg79.2%
distribute-frac-neg79.2%
distribute-rgt-neg-in79.2%
*-commutative79.2%
clear-num79.2%
associate-/r/79.2%
clear-num79.4%
distribute-neg-frac79.4%
Applied egg-rr79.4%
if 2.80000000000000011e123 < x Initial program 88.2%
Taylor expanded in t around 0 63.9%
Taylor expanded in y around 0 63.9%
mul-1-neg63.9%
distribute-rgt-neg-out63.9%
Simplified63.9%
*-commutative63.9%
distribute-lft-neg-out63.9%
distribute-neg-frac63.9%
associate-*r/69.5%
*-commutative69.5%
distribute-lft-neg-in69.5%
Applied egg-rr69.5%
Final simplification76.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* z (/ y t)))))
(if (<= x -6.2e+164)
t_1
(if (<= x -2.35e+110)
(/ (- z) (/ t x))
(if (<= x 5e+121) t_1 (* x (/ (- z) t)))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (z * (y / t));
double tmp;
if (x <= -6.2e+164) {
tmp = t_1;
} else if (x <= -2.35e+110) {
tmp = -z / (t / x);
} else if (x <= 5e+121) {
tmp = t_1;
} else {
tmp = x * (-z / t);
}
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 + (z * (y / t))
if (x <= (-6.2d+164)) then
tmp = t_1
else if (x <= (-2.35d+110)) then
tmp = -z / (t / x)
else if (x <= 5d+121) then
tmp = t_1
else
tmp = x * (-z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (z * (y / t));
double tmp;
if (x <= -6.2e+164) {
tmp = t_1;
} else if (x <= -2.35e+110) {
tmp = -z / (t / x);
} else if (x <= 5e+121) {
tmp = t_1;
} else {
tmp = x * (-z / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (z * (y / t)) tmp = 0 if x <= -6.2e+164: tmp = t_1 elif x <= -2.35e+110: tmp = -z / (t / x) elif x <= 5e+121: tmp = t_1 else: tmp = x * (-z / t) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(z * Float64(y / t))) tmp = 0.0 if (x <= -6.2e+164) tmp = t_1; elseif (x <= -2.35e+110) tmp = Float64(Float64(-z) / Float64(t / x)); elseif (x <= 5e+121) tmp = t_1; else tmp = Float64(x * Float64(Float64(-z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (z * (y / t)); tmp = 0.0; if (x <= -6.2e+164) tmp = t_1; elseif (x <= -2.35e+110) tmp = -z / (t / x); elseif (x <= 5e+121) tmp = t_1; else tmp = x * (-z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.2e+164], t$95$1, If[LessEqual[x, -2.35e+110], N[((-z) / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+121], t$95$1, N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{t}\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+164}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.35 \cdot 10^{+110}:\\
\;\;\;\;\frac{-z}{\frac{t}{x}}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+121}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\end{array}
\end{array}
if x < -6.2000000000000003e164 or -2.3499999999999999e110 < x < 5.00000000000000007e121Initial program 93.3%
associate-*l/95.5%
Simplified95.5%
Taylor expanded in y around inf 77.7%
if -6.2000000000000003e164 < x < -2.3499999999999999e110Initial program 83.6%
Taylor expanded in t around 0 72.0%
Taylor expanded in y around 0 71.5%
mul-1-neg71.5%
distribute-rgt-neg-out71.5%
Simplified71.5%
frac-2neg71.5%
div-inv71.5%
distribute-rgt-neg-out71.5%
remove-double-neg71.5%
Applied egg-rr71.5%
associate-*l*79.2%
associate-*r/79.2%
*-rgt-identity79.2%
Simplified79.2%
frac-2neg79.2%
remove-double-neg79.2%
distribute-frac-neg79.2%
distribute-rgt-neg-in79.2%
*-commutative79.2%
clear-num79.2%
associate-/r/79.2%
clear-num79.4%
distribute-neg-frac79.4%
Applied egg-rr79.4%
if 5.00000000000000007e121 < x Initial program 88.2%
Taylor expanded in t around 0 63.9%
Taylor expanded in y around 0 63.9%
mul-1-neg63.9%
distribute-rgt-neg-out63.9%
Simplified63.9%
*-commutative63.9%
distribute-lft-neg-out63.9%
distribute-neg-frac63.9%
associate-*r/69.5%
*-commutative69.5%
distribute-lft-neg-in69.5%
Applied egg-rr69.5%
Final simplification76.8%
(FPCore (x y z t)
:precision binary64
(if (<= x -5.5e+164)
(+ x (* z (/ y t)))
(if (<= x -2.5e+110)
(/ (- z) (/ t x))
(if (<= x 6.2e+122) (+ x (/ z (/ t y))) (* x (/ (- z) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5.5e+164) {
tmp = x + (z * (y / t));
} else if (x <= -2.5e+110) {
tmp = -z / (t / x);
} else if (x <= 6.2e+122) {
tmp = x + (z / (t / y));
} else {
tmp = x * (-z / t);
}
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.5d+164)) then
tmp = x + (z * (y / t))
else if (x <= (-2.5d+110)) then
tmp = -z / (t / x)
else if (x <= 6.2d+122) then
tmp = x + (z / (t / y))
else
tmp = x * (-z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5.5e+164) {
tmp = x + (z * (y / t));
} else if (x <= -2.5e+110) {
tmp = -z / (t / x);
} else if (x <= 6.2e+122) {
tmp = x + (z / (t / y));
} else {
tmp = x * (-z / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -5.5e+164: tmp = x + (z * (y / t)) elif x <= -2.5e+110: tmp = -z / (t / x) elif x <= 6.2e+122: tmp = x + (z / (t / y)) else: tmp = x * (-z / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -5.5e+164) tmp = Float64(x + Float64(z * Float64(y / t))); elseif (x <= -2.5e+110) tmp = Float64(Float64(-z) / Float64(t / x)); elseif (x <= 6.2e+122) tmp = Float64(x + Float64(z / Float64(t / y))); else tmp = Float64(x * Float64(Float64(-z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -5.5e+164) tmp = x + (z * (y / t)); elseif (x <= -2.5e+110) tmp = -z / (t / x); elseif (x <= 6.2e+122) tmp = x + (z / (t / y)); else tmp = x * (-z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -5.5e+164], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.5e+110], N[((-z) / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.2e+122], N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+164}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{+110}:\\
\;\;\;\;\frac{-z}{\frac{t}{x}}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+122}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\end{array}
\end{array}
if x < -5.4999999999999998e164Initial program 91.5%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in y around inf 66.0%
if -5.4999999999999998e164 < x < -2.49999999999999989e110Initial program 83.6%
Taylor expanded in t around 0 72.0%
Taylor expanded in y around 0 71.5%
mul-1-neg71.5%
distribute-rgt-neg-out71.5%
Simplified71.5%
frac-2neg71.5%
div-inv71.5%
distribute-rgt-neg-out71.5%
remove-double-neg71.5%
Applied egg-rr71.5%
associate-*l*79.2%
associate-*r/79.2%
*-rgt-identity79.2%
Simplified79.2%
frac-2neg79.2%
remove-double-neg79.2%
distribute-frac-neg79.2%
distribute-rgt-neg-in79.2%
*-commutative79.2%
clear-num79.2%
associate-/r/79.2%
clear-num79.4%
distribute-neg-frac79.4%
Applied egg-rr79.4%
if -2.49999999999999989e110 < x < 6.19999999999999998e122Initial program 93.5%
associate-*l/95.5%
Simplified95.5%
*-commutative95.5%
clear-num95.4%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in y around inf 79.7%
if 6.19999999999999998e122 < x Initial program 88.2%
Taylor expanded in t around 0 63.9%
Taylor expanded in y around 0 63.9%
mul-1-neg63.9%
distribute-rgt-neg-out63.9%
Simplified63.9%
*-commutative63.9%
distribute-lft-neg-out63.9%
distribute-neg-frac63.9%
associate-*r/69.5%
*-commutative69.5%
distribute-lft-neg-in69.5%
Applied egg-rr69.5%
Final simplification77.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.5e-69)
(+ x (* z (/ y t)))
(if (<= y 4.5e-156)
(- x (* x (/ z t)))
(if (<= y 17000000.0) (/ (* z (- y x)) t) (+ x (* y (/ z t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e-69) {
tmp = x + (z * (y / t));
} else if (y <= 4.5e-156) {
tmp = x - (x * (z / t));
} else if (y <= 17000000.0) {
tmp = (z * (y - x)) / t;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.5d-69)) then
tmp = x + (z * (y / t))
else if (y <= 4.5d-156) then
tmp = x - (x * (z / t))
else if (y <= 17000000.0d0) then
tmp = (z * (y - x)) / t
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.5e-69) {
tmp = x + (z * (y / t));
} else if (y <= 4.5e-156) {
tmp = x - (x * (z / t));
} else if (y <= 17000000.0) {
tmp = (z * (y - x)) / t;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.5e-69: tmp = x + (z * (y / t)) elif y <= 4.5e-156: tmp = x - (x * (z / t)) elif y <= 17000000.0: tmp = (z * (y - x)) / t else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.5e-69) tmp = Float64(x + Float64(z * Float64(y / t))); elseif (y <= 4.5e-156) tmp = Float64(x - Float64(x * Float64(z / t))); elseif (y <= 17000000.0) tmp = Float64(Float64(z * Float64(y - x)) / t); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.5e-69) tmp = x + (z * (y / t)); elseif (y <= 4.5e-156) tmp = x - (x * (z / t)); elseif (y <= 17000000.0) tmp = (z * (y - x)) / t; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.5e-69], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-156], N[(x - N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 17000000.0], N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-69}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-156}:\\
\;\;\;\;x - x \cdot \frac{z}{t}\\
\mathbf{elif}\;y \leq 17000000:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if y < -5.50000000000000006e-69Initial program 91.6%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in y around inf 86.9%
if -5.50000000000000006e-69 < y < 4.49999999999999986e-156Initial program 95.3%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in y around 0 85.8%
associate-*r/85.8%
mul-1-neg85.8%
distribute-rgt-neg-out85.8%
associate-*l/88.1%
Simplified88.1%
distribute-rgt-neg-out88.1%
unsub-neg88.1%
*-commutative88.1%
Applied egg-rr88.1%
if 4.49999999999999986e-156 < y < 1.7e7Initial program 97.6%
Taylor expanded in t around 0 80.4%
if 1.7e7 < y Initial program 85.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 79.4%
associate-*r/90.5%
Simplified90.5%
Final simplification87.1%
(FPCore (x y z t) :precision binary64 (if (<= y -4.2e-70) (+ x (* z (/ y t))) (if (<= y 7.2e-96) (- x (* x (/ z t))) (+ x (* y (/ z t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e-70) {
tmp = x + (z * (y / t));
} else if (y <= 7.2e-96) {
tmp = x - (x * (z / t));
} else {
tmp = x + (y * (z / t));
}
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 <= (-4.2d-70)) then
tmp = x + (z * (y / t))
else if (y <= 7.2d-96) then
tmp = x - (x * (z / t))
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e-70) {
tmp = x + (z * (y / t));
} else if (y <= 7.2e-96) {
tmp = x - (x * (z / t));
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.2e-70: tmp = x + (z * (y / t)) elif y <= 7.2e-96: tmp = x - (x * (z / t)) else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.2e-70) tmp = Float64(x + Float64(z * Float64(y / t))); elseif (y <= 7.2e-96) tmp = Float64(x - Float64(x * Float64(z / t))); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.2e-70) tmp = x + (z * (y / t)); elseif (y <= 7.2e-96) tmp = x - (x * (z / t)); else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e-70], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-96], N[(x - N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-70}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-96}:\\
\;\;\;\;x - x \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if y < -4.2000000000000002e-70Initial program 91.6%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in y around inf 86.9%
if -4.2000000000000002e-70 < y < 7.20000000000000016e-96Initial program 96.1%
associate-/l*95.1%
Simplified95.1%
Taylor expanded in y around 0 82.1%
associate-*r/82.1%
mul-1-neg82.1%
distribute-rgt-neg-out82.1%
associate-*l/84.9%
Simplified84.9%
distribute-rgt-neg-out84.9%
unsub-neg84.9%
*-commutative84.9%
Applied egg-rr84.9%
if 7.20000000000000016e-96 < y Initial program 88.2%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in y around inf 77.7%
associate-*r/83.7%
Simplified83.7%
Final simplification85.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.8e-106) (not (<= z 1.6e-57))) (* z (/ y t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.8e-106) || !(z <= 1.6e-57)) {
tmp = z * (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.8d-106)) .or. (.not. (z <= 1.6d-57))) then
tmp = z * (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.8e-106) || !(z <= 1.6e-57)) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.8e-106) or not (z <= 1.6e-57): tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.8e-106) || !(z <= 1.6e-57)) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.8e-106) || ~((z <= 1.6e-57))) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.8e-106], N[Not[LessEqual[z, 1.6e-57]], $MachinePrecision]], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-106} \lor \neg \left(z \leq 1.6 \cdot 10^{-57}\right):\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.80000000000000006e-106 or 1.6e-57 < z Initial program 88.4%
Taylor expanded in t around 0 78.4%
Taylor expanded in y around inf 46.6%
*-commutative46.6%
Simplified46.6%
associate-/l*51.9%
associate-/r/50.3%
Applied egg-rr50.3%
Taylor expanded in z around 0 46.6%
associate-*l/51.5%
Simplified51.5%
if -1.80000000000000006e-106 < z < 1.6e-57Initial program 98.1%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in t around inf 69.9%
Final simplification58.7%
(FPCore (x y z t) :precision binary64 (if (<= z -1.3e-106) (* y (/ z t)) (if (<= z 1.75e-57) x (* z (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.3e-106) {
tmp = y * (z / t);
} else if (z <= 1.75e-57) {
tmp = x;
} else {
tmp = z * (y / t);
}
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-106)) then
tmp = y * (z / t)
else if (z <= 1.75d-57) then
tmp = x
else
tmp = z * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.3e-106) {
tmp = y * (z / t);
} else if (z <= 1.75e-57) {
tmp = x;
} else {
tmp = z * (y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.3e-106: tmp = y * (z / t) elif z <= 1.75e-57: tmp = x else: tmp = z * (y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.3e-106) tmp = Float64(y * Float64(z / t)); elseif (z <= 1.75e-57) tmp = x; else tmp = Float64(z * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.3e-106) tmp = y * (z / t); elseif (z <= 1.75e-57) tmp = x; else tmp = z * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.3e-106], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e-57], x, N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-106}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-57}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if z < -1.3e-106Initial program 86.6%
Taylor expanded in t around 0 75.0%
Taylor expanded in y around inf 42.5%
*-commutative42.5%
Simplified42.5%
associate-/l*49.5%
associate-/r/49.6%
Applied egg-rr49.6%
if -1.3e-106 < z < 1.74999999999999996e-57Initial program 98.1%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in t around inf 69.9%
if 1.74999999999999996e-57 < z Initial program 91.0%
Taylor expanded in t around 0 83.5%
Taylor expanded in y around inf 52.6%
*-commutative52.6%
Simplified52.6%
associate-/l*55.5%
associate-/r/51.3%
Applied egg-rr51.3%
Taylor expanded in z around 0 52.6%
associate-*l/55.6%
Simplified55.6%
Final simplification59.1%
(FPCore (x y z t) :precision binary64 (+ x (* z (/ (- y x) t))))
double code(double x, double y, double z, double t) {
return x + (z * ((y - x) / t));
}
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 + (z * ((y - x) / t))
end function
public static double code(double x, double y, double z, double t) {
return x + (z * ((y - x) / t));
}
def code(x, y, z, t): return x + (z * ((y - x) / t))
function code(x, y, z, t) return Float64(x + Float64(z * Float64(Float64(y - x) / t))) end
function tmp = code(x, y, z, t) tmp = x + (z * ((y - x) / t)); end
code[x_, y_, z_, t_] := N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + z \cdot \frac{y - x}{t}
\end{array}
Initial program 92.2%
associate-*l/95.5%
Simplified95.5%
Final simplification95.5%
(FPCore (x y z t) :precision binary64 (+ x (/ z (/ t (- y x)))))
double code(double x, double y, double z, double t) {
return x + (z / (t / (y - 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 + (z / (t / (y - x)))
end function
public static double code(double x, double y, double z, double t) {
return x + (z / (t / (y - x)));
}
def code(x, y, z, t): return x + (z / (t / (y - x)))
function code(x, y, z, t) return Float64(x + Float64(z / Float64(t / Float64(y - x)))) end
function tmp = code(x, y, z, t) tmp = x + (z / (t / (y - x))); end
code[x_, y_, z_, t_] := N[(x + N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{z}{\frac{t}{y - x}}
\end{array}
Initial program 92.2%
associate-*l/95.5%
Simplified95.5%
*-commutative95.5%
clear-num95.4%
un-div-inv96.3%
Applied egg-rr96.3%
Final simplification96.3%
(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 92.2%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in t around inf 36.5%
Final simplification36.5%
(FPCore (x y z t)
:precision binary64
(if (< x -9.025511195533005e-135)
(- x (* (/ z t) (- x y)))
(if (< x 4.275032163700715e-250)
(+ x (* (/ (- y x) t) z))
(+ x (/ (- y x) (/ t z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x < -9.025511195533005e-135) {
tmp = x - ((z / t) * (x - y));
} else if (x < 4.275032163700715e-250) {
tmp = x + (((y - x) / t) * z);
} else {
tmp = x + ((y - x) / (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) :: tmp
if (x < (-9.025511195533005d-135)) then
tmp = x - ((z / t) * (x - y))
else if (x < 4.275032163700715d-250) then
tmp = x + (((y - x) / t) * z)
else
tmp = x + ((y - x) / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x < -9.025511195533005e-135) {
tmp = x - ((z / t) * (x - y));
} else if (x < 4.275032163700715e-250) {
tmp = x + (((y - x) / t) * z);
} else {
tmp = x + ((y - x) / (t / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x < -9.025511195533005e-135: tmp = x - ((z / t) * (x - y)) elif x < 4.275032163700715e-250: tmp = x + (((y - x) / t) * z) else: tmp = x + ((y - x) / (t / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x < -9.025511195533005e-135) tmp = Float64(x - Float64(Float64(z / t) * Float64(x - y))); elseif (x < 4.275032163700715e-250) tmp = Float64(x + Float64(Float64(Float64(y - x) / t) * z)); else tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x < -9.025511195533005e-135) tmp = x - ((z / t) * (x - y)); elseif (x < 4.275032163700715e-250) tmp = x + (((y - x) / t) * z); else tmp = x + ((y - x) / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Less[x, -9.025511195533005e-135], N[(x - N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[x, 4.275032163700715e-250], N[(x + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\
\;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\
\mathbf{elif}\;x < 4.275032163700715 \cdot 10^{-250}:\\
\;\;\;\;x + \frac{y - x}{t} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\end{array}
\end{array}
herbie shell --seed 2023279
(FPCore (x y z t)
:name "Numeric.Histogram:binBounds from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< x -9.025511195533005e-135) (- x (* (/ z t) (- x y))) (if (< x 4.275032163700715e-250) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z)))))
(+ x (/ (* (- y x) z) t)))