
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * 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) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * 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) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * 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) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Initial program 97.0%
(FPCore (x y z t)
:precision binary64
(if (or (<= y -9e+84)
(not (or (<= y 1.95e-91) (and (not (<= y 5.5e-71)) (<= y 9.5e-28)))))
(* t (/ (- y x) y))
(* (- x y) (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e+84) || !((y <= 1.95e-91) || (!(y <= 5.5e-71) && (y <= 9.5e-28)))) {
tmp = t * ((y - x) / y);
} 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) :: tmp
if ((y <= (-9d+84)) .or. (.not. (y <= 1.95d-91) .or. (.not. (y <= 5.5d-71)) .and. (y <= 9.5d-28))) then
tmp = t * ((y - x) / y)
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 tmp;
if ((y <= -9e+84) || !((y <= 1.95e-91) || (!(y <= 5.5e-71) && (y <= 9.5e-28)))) {
tmp = t * ((y - x) / y);
} else {
tmp = (x - y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9e+84) or not ((y <= 1.95e-91) or (not (y <= 5.5e-71) and (y <= 9.5e-28))): tmp = t * ((y - x) / y) else: tmp = (x - y) * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9e+84) || !((y <= 1.95e-91) || (!(y <= 5.5e-71) && (y <= 9.5e-28)))) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = Float64(Float64(x - y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9e+84) || ~(((y <= 1.95e-91) || (~((y <= 5.5e-71)) && (y <= 9.5e-28))))) tmp = t * ((y - x) / y); else tmp = (x - y) * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9e+84], N[Not[Or[LessEqual[y, 1.95e-91], And[N[Not[LessEqual[y, 5.5e-71]], $MachinePrecision], LessEqual[y, 9.5e-28]]]], $MachinePrecision]], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+84} \lor \neg \left(y \leq 1.95 \cdot 10^{-91} \lor \neg \left(y \leq 5.5 \cdot 10^{-71}\right) \land y \leq 9.5 \cdot 10^{-28}\right):\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -8.9999999999999994e84 or 1.94999999999999997e-91 < y < 5.4999999999999997e-71 or 9.50000000000000001e-28 < y Initial program 99.8%
associate-*l/74.9%
associate-/l*70.0%
Simplified70.0%
associate-*r/74.9%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 82.7%
neg-mul-182.7%
distribute-neg-frac282.7%
sub-neg82.7%
distribute-neg-in82.7%
remove-double-neg82.7%
Simplified82.7%
Taylor expanded in t around 0 60.8%
associate-/l*82.7%
Simplified82.7%
if -8.9999999999999994e84 < y < 1.94999999999999997e-91 or 5.4999999999999997e-71 < y < 9.50000000000000001e-28Initial program 94.4%
associate-*l/90.2%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in z around inf 70.1%
*-commutative70.1%
associate-/l*73.8%
Simplified73.8%
Final simplification78.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -1.7e+21)
t_1
(if (<= y -2.2e-43)
(* (- x y) (/ t z))
(if (or (<= y -5.8e-55) (not (<= y 2.1e+43)))
t_1
(/ t (/ (- z y) x)))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -1.7e+21) {
tmp = t_1;
} else if (y <= -2.2e-43) {
tmp = (x - y) * (t / z);
} else if ((y <= -5.8e-55) || !(y <= 2.1e+43)) {
tmp = t_1;
} else {
tmp = t / ((z - y) / 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 = t / (1.0d0 - (z / y))
if (y <= (-1.7d+21)) then
tmp = t_1
else if (y <= (-2.2d-43)) then
tmp = (x - y) * (t / z)
else if ((y <= (-5.8d-55)) .or. (.not. (y <= 2.1d+43))) then
tmp = t_1
else
tmp = t / ((z - y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -1.7e+21) {
tmp = t_1;
} else if (y <= -2.2e-43) {
tmp = (x - y) * (t / z);
} else if ((y <= -5.8e-55) || !(y <= 2.1e+43)) {
tmp = t_1;
} else {
tmp = t / ((z - y) / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -1.7e+21: tmp = t_1 elif y <= -2.2e-43: tmp = (x - y) * (t / z) elif (y <= -5.8e-55) or not (y <= 2.1e+43): tmp = t_1 else: tmp = t / ((z - y) / x) return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -1.7e+21) tmp = t_1; elseif (y <= -2.2e-43) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif ((y <= -5.8e-55) || !(y <= 2.1e+43)) tmp = t_1; else tmp = Float64(t / Float64(Float64(z - y) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -1.7e+21) tmp = t_1; elseif (y <= -2.2e-43) tmp = (x - y) * (t / z); elseif ((y <= -5.8e-55) || ~((y <= 2.1e+43))) tmp = t_1; else tmp = t / ((z - y) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+21], t$95$1, If[LessEqual[y, -2.2e-43], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5.8e-55], N[Not[LessEqual[y, 2.1e+43]], $MachinePrecision]], t$95$1, N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-43}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{-55} \lor \neg \left(y \leq 2.1 \cdot 10^{+43}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\end{array}
\end{array}
if y < -1.7e21 or -2.19999999999999997e-43 < y < -5.8e-55 or 2.10000000000000002e43 < y Initial program 99.1%
associate-*l/76.6%
associate-/l*68.5%
Simplified68.5%
associate-*r/76.6%
associate-*l/99.1%
*-commutative99.1%
clear-num99.0%
un-div-inv99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 85.8%
mul-1-neg85.8%
div-sub85.8%
sub-neg85.8%
*-inverses85.8%
metadata-eval85.8%
Simplified85.8%
Taylor expanded in t around 0 85.8%
if -1.7e21 < y < -2.19999999999999997e-43Initial program 99.8%
associate-*l/93.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.0%
*-commutative72.0%
associate-/l*78.1%
Simplified78.1%
if -5.8e-55 < y < 2.10000000000000002e43Initial program 94.7%
associate-*l/87.7%
associate-/l*91.9%
Simplified91.9%
associate-*r/87.7%
associate-*l/94.7%
*-commutative94.7%
clear-num94.2%
un-div-inv94.3%
Applied egg-rr94.3%
Taylor expanded in x around inf 81.2%
Final simplification83.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -1.65e+21)
t_1
(if (<= y -4.5e-45)
(* (- x y) (/ t z))
(if (or (<= y -4.6e-55) (not (<= y 6.7e+49)))
t_1
(* t (/ x (- z y))))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -1.65e+21) {
tmp = t_1;
} else if (y <= -4.5e-45) {
tmp = (x - y) * (t / z);
} else if ((y <= -4.6e-55) || !(y <= 6.7e+49)) {
tmp = t_1;
} else {
tmp = t * (x / (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) :: t_1
real(8) :: tmp
t_1 = t / (1.0d0 - (z / y))
if (y <= (-1.65d+21)) then
tmp = t_1
else if (y <= (-4.5d-45)) then
tmp = (x - y) * (t / z)
else if ((y <= (-4.6d-55)) .or. (.not. (y <= 6.7d+49))) then
tmp = t_1
else
tmp = t * (x / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -1.65e+21) {
tmp = t_1;
} else if (y <= -4.5e-45) {
tmp = (x - y) * (t / z);
} else if ((y <= -4.6e-55) || !(y <= 6.7e+49)) {
tmp = t_1;
} else {
tmp = t * (x / (z - y));
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -1.65e+21: tmp = t_1 elif y <= -4.5e-45: tmp = (x - y) * (t / z) elif (y <= -4.6e-55) or not (y <= 6.7e+49): tmp = t_1 else: tmp = t * (x / (z - y)) return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -1.65e+21) tmp = t_1; elseif (y <= -4.5e-45) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif ((y <= -4.6e-55) || !(y <= 6.7e+49)) tmp = t_1; else tmp = Float64(t * Float64(x / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -1.65e+21) tmp = t_1; elseif (y <= -4.5e-45) tmp = (x - y) * (t / z); elseif ((y <= -4.6e-55) || ~((y <= 6.7e+49))) tmp = t_1; else tmp = t * (x / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+21], t$95$1, If[LessEqual[y, -4.5e-45], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4.6e-55], N[Not[LessEqual[y, 6.7e+49]], $MachinePrecision]], t$95$1, N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-45}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-55} \lor \neg \left(y \leq 6.7 \cdot 10^{+49}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -1.65e21 or -4.4999999999999999e-45 < y < -4.60000000000000023e-55 or 6.6999999999999999e49 < y Initial program 99.1%
associate-*l/76.6%
associate-/l*68.5%
Simplified68.5%
associate-*r/76.6%
associate-*l/99.1%
*-commutative99.1%
clear-num99.0%
un-div-inv99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 85.8%
mul-1-neg85.8%
div-sub85.8%
sub-neg85.8%
*-inverses85.8%
metadata-eval85.8%
Simplified85.8%
Taylor expanded in t around 0 85.8%
if -1.65e21 < y < -4.4999999999999999e-45Initial program 99.8%
associate-*l/93.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.0%
*-commutative72.0%
associate-/l*78.1%
Simplified78.1%
if -4.60000000000000023e-55 < y < 6.6999999999999999e49Initial program 94.7%
Taylor expanded in x around inf 81.2%
Final simplification83.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- y x) y))))
(if (<= y -9e+84)
t_1
(if (<= y -1.25e+33)
(* (/ y z) (- t))
(if (or (<= y -1.4e-55) (not (<= y 1.6e-91))) t_1 (* t (/ x z)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((y - x) / y);
double tmp;
if (y <= -9e+84) {
tmp = t_1;
} else if (y <= -1.25e+33) {
tmp = (y / z) * -t;
} else if ((y <= -1.4e-55) || !(y <= 1.6e-91)) {
tmp = t_1;
} else {
tmp = t * (x / 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 = t * ((y - x) / y)
if (y <= (-9d+84)) then
tmp = t_1
else if (y <= (-1.25d+33)) then
tmp = (y / z) * -t
else if ((y <= (-1.4d-55)) .or. (.not. (y <= 1.6d-91))) then
tmp = t_1
else
tmp = t * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * ((y - x) / y);
double tmp;
if (y <= -9e+84) {
tmp = t_1;
} else if (y <= -1.25e+33) {
tmp = (y / z) * -t;
} else if ((y <= -1.4e-55) || !(y <= 1.6e-91)) {
tmp = t_1;
} else {
tmp = t * (x / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((y - x) / y) tmp = 0 if y <= -9e+84: tmp = t_1 elif y <= -1.25e+33: tmp = (y / z) * -t elif (y <= -1.4e-55) or not (y <= 1.6e-91): tmp = t_1 else: tmp = t * (x / z) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(y - x) / y)) tmp = 0.0 if (y <= -9e+84) tmp = t_1; elseif (y <= -1.25e+33) tmp = Float64(Float64(y / z) * Float64(-t)); elseif ((y <= -1.4e-55) || !(y <= 1.6e-91)) tmp = t_1; else tmp = Float64(t * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((y - x) / y); tmp = 0.0; if (y <= -9e+84) tmp = t_1; elseif (y <= -1.25e+33) tmp = (y / z) * -t; elseif ((y <= -1.4e-55) || ~((y <= 1.6e-91))) tmp = t_1; else tmp = t * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+84], t$95$1, If[LessEqual[y, -1.25e+33], N[(N[(y / z), $MachinePrecision] * (-t)), $MachinePrecision], If[Or[LessEqual[y, -1.4e-55], N[Not[LessEqual[y, 1.6e-91]], $MachinePrecision]], t$95$1, N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - x}{y}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{+33}:\\
\;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-55} \lor \neg \left(y \leq 1.6 \cdot 10^{-91}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < -8.9999999999999994e84 or -1.24999999999999993e33 < y < -1.39999999999999992e-55 or 1.59999999999999998e-91 < y Initial program 99.2%
associate-*l/79.1%
associate-/l*75.1%
Simplified75.1%
associate-*r/79.1%
associate-*l/99.2%
*-commutative99.2%
clear-num99.2%
un-div-inv99.2%
Applied egg-rr99.2%
Taylor expanded in z around 0 75.3%
neg-mul-175.3%
distribute-neg-frac275.3%
sub-neg75.3%
distribute-neg-in75.3%
remove-double-neg75.3%
Simplified75.3%
Taylor expanded in t around 0 57.5%
associate-/l*75.3%
Simplified75.3%
if -8.9999999999999994e84 < y < -1.24999999999999993e33Initial program 99.7%
associate-*l/99.8%
associate-/l*89.3%
Simplified89.3%
Taylor expanded in z around inf 78.5%
*-commutative78.5%
associate-/l*78.5%
Simplified78.5%
Taylor expanded in x around 0 68.1%
mul-1-neg68.1%
associate-/l*68.1%
distribute-rgt-neg-in68.1%
distribute-neg-frac268.1%
Simplified68.1%
if -1.39999999999999992e-55 < y < 1.59999999999999998e-91Initial program 93.2%
Taylor expanded in y around 0 71.3%
Final simplification73.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -4.5e+22)
t_1
(if (<= y -4.3e-45)
(* (- x y) (/ t z))
(if (<= y -3.4e-81)
(* y (/ t (- y z)))
(if (<= y 4.3e+39) (/ t (/ (- z y) x)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -4.5e+22) {
tmp = t_1;
} else if (y <= -4.3e-45) {
tmp = (x - y) * (t / z);
} else if (y <= -3.4e-81) {
tmp = y * (t / (y - z));
} else if (y <= 4.3e+39) {
tmp = t / ((z - y) / x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = t / (1.0d0 - (z / y))
if (y <= (-4.5d+22)) then
tmp = t_1
else if (y <= (-4.3d-45)) then
tmp = (x - y) * (t / z)
else if (y <= (-3.4d-81)) then
tmp = y * (t / (y - z))
else if (y <= 4.3d+39) then
tmp = t / ((z - y) / x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -4.5e+22) {
tmp = t_1;
} else if (y <= -4.3e-45) {
tmp = (x - y) * (t / z);
} else if (y <= -3.4e-81) {
tmp = y * (t / (y - z));
} else if (y <= 4.3e+39) {
tmp = t / ((z - y) / x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -4.5e+22: tmp = t_1 elif y <= -4.3e-45: tmp = (x - y) * (t / z) elif y <= -3.4e-81: tmp = y * (t / (y - z)) elif y <= 4.3e+39: tmp = t / ((z - y) / x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -4.5e+22) tmp = t_1; elseif (y <= -4.3e-45) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= -3.4e-81) tmp = Float64(y * Float64(t / Float64(y - z))); elseif (y <= 4.3e+39) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -4.5e+22) tmp = t_1; elseif (y <= -4.3e-45) tmp = (x - y) * (t / z); elseif (y <= -3.4e-81) tmp = y * (t / (y - z)); elseif (y <= 4.3e+39) tmp = t / ((z - y) / x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.5e+22], t$95$1, If[LessEqual[y, -4.3e-45], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e-81], N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.3e+39], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.3 \cdot 10^{-45}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-81}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+39}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.4999999999999998e22 or 4.3e39 < y Initial program 99.9%
associate-*l/75.2%
associate-/l*67.4%
Simplified67.4%
associate-*r/75.2%
associate-*l/99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 85.8%
mul-1-neg85.8%
div-sub85.8%
sub-neg85.8%
*-inverses85.8%
metadata-eval85.8%
Simplified85.8%
Taylor expanded in t around 0 85.8%
if -4.4999999999999998e22 < y < -4.2999999999999999e-45Initial program 99.8%
associate-*l/93.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 72.0%
*-commutative72.0%
associate-/l*78.1%
Simplified78.1%
if -4.2999999999999999e-45 < y < -3.3999999999999999e-81Initial program 80.6%
associate-*l/92.3%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in x around 0 90.3%
mul-1-neg90.3%
associate-*l/82.7%
distribute-rgt-neg-out82.7%
Simplified82.7%
if -3.3999999999999999e-81 < y < 4.3e39Initial program 95.6%
associate-*l/88.0%
associate-/l*91.7%
Simplified91.7%
associate-*r/88.0%
associate-*l/95.6%
*-commutative95.6%
clear-num95.6%
un-div-inv95.7%
Applied egg-rr95.7%
Taylor expanded in x around inf 82.8%
Final simplification83.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.7e+89)
t
(if (or (<= y -1.45e-46) (and (not (<= y -3.4e-55)) (<= y 2.15e+41)))
(* x (/ t z))
t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.7e+89) {
tmp = t;
} else if ((y <= -1.45e-46) || (!(y <= -3.4e-55) && (y <= 2.15e+41))) {
tmp = x * (t / z);
} else {
tmp = 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 <= (-1.7d+89)) then
tmp = t
else if ((y <= (-1.45d-46)) .or. (.not. (y <= (-3.4d-55))) .and. (y <= 2.15d+41)) then
tmp = x * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.7e+89) {
tmp = t;
} else if ((y <= -1.45e-46) || (!(y <= -3.4e-55) && (y <= 2.15e+41))) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.7e+89: tmp = t elif (y <= -1.45e-46) or (not (y <= -3.4e-55) and (y <= 2.15e+41)): tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.7e+89) tmp = t; elseif ((y <= -1.45e-46) || (!(y <= -3.4e-55) && (y <= 2.15e+41))) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.7e+89) tmp = t; elseif ((y <= -1.45e-46) || (~((y <= -3.4e-55)) && (y <= 2.15e+41))) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.7e+89], t, If[Or[LessEqual[y, -1.45e-46], And[N[Not[LessEqual[y, -3.4e-55]], $MachinePrecision], LessEqual[y, 2.15e+41]]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+89}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-46} \lor \neg \left(y \leq -3.4 \cdot 10^{-55}\right) \land y \leq 2.15 \cdot 10^{+41}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.7000000000000001e89 or -1.45000000000000002e-46 < y < -3.39999999999999973e-55 or 2.15000000000000012e41 < y Initial program 99.0%
associate-*l/74.1%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in y around inf 72.9%
if -1.7000000000000001e89 < y < -1.45000000000000002e-46 or -3.39999999999999973e-55 < y < 2.15000000000000012e41Initial program 95.5%
associate-*l/89.2%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in y around 0 54.7%
*-commutative54.7%
associate-/l*56.9%
Simplified56.9%
Final simplification63.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.7e+89)
t
(if (<= y -2.3e-46)
(* x (/ t z))
(if (<= y -4.6e-55) t (if (<= y 1.25e+40) (* t (/ x z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.7e+89) {
tmp = t;
} else if (y <= -2.3e-46) {
tmp = x * (t / z);
} else if (y <= -4.6e-55) {
tmp = t;
} else if (y <= 1.25e+40) {
tmp = t * (x / z);
} else {
tmp = 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 <= (-1.7d+89)) then
tmp = t
else if (y <= (-2.3d-46)) then
tmp = x * (t / z)
else if (y <= (-4.6d-55)) then
tmp = t
else if (y <= 1.25d+40) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.7e+89) {
tmp = t;
} else if (y <= -2.3e-46) {
tmp = x * (t / z);
} else if (y <= -4.6e-55) {
tmp = t;
} else if (y <= 1.25e+40) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.7e+89: tmp = t elif y <= -2.3e-46: tmp = x * (t / z) elif y <= -4.6e-55: tmp = t elif y <= 1.25e+40: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.7e+89) tmp = t; elseif (y <= -2.3e-46) tmp = Float64(x * Float64(t / z)); elseif (y <= -4.6e-55) tmp = t; elseif (y <= 1.25e+40) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.7e+89) tmp = t; elseif (y <= -2.3e-46) tmp = x * (t / z); elseif (y <= -4.6e-55) tmp = t; elseif (y <= 1.25e+40) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.7e+89], t, If[LessEqual[y, -2.3e-46], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.6e-55], t, If[LessEqual[y, 1.25e+40], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+89}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-46}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-55}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+40}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.7000000000000001e89 or -2.2999999999999999e-46 < y < -4.60000000000000023e-55 or 1.25000000000000001e40 < y Initial program 99.0%
associate-*l/74.1%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in y around inf 72.9%
if -1.7000000000000001e89 < y < -2.2999999999999999e-46Initial program 99.8%
associate-*l/96.6%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in y around 0 35.5%
*-commutative35.5%
associate-/l*38.7%
Simplified38.7%
if -4.60000000000000023e-55 < y < 1.25000000000000001e40Initial program 94.7%
Taylor expanded in y around 0 63.8%
Final simplification65.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- y x) y))))
(if (<= y -5.7e+85)
t_1
(if (<= y -5.2e-81)
(* (- x y) (/ t z))
(if (<= y 2.05e+44) (* t (/ x (- z y))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((y - x) / y);
double tmp;
if (y <= -5.7e+85) {
tmp = t_1;
} else if (y <= -5.2e-81) {
tmp = (x - y) * (t / z);
} else if (y <= 2.05e+44) {
tmp = t * (x / (z - y));
} 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 = t * ((y - x) / y)
if (y <= (-5.7d+85)) then
tmp = t_1
else if (y <= (-5.2d-81)) then
tmp = (x - y) * (t / z)
else if (y <= 2.05d+44) then
tmp = t * (x / (z - y))
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 = t * ((y - x) / y);
double tmp;
if (y <= -5.7e+85) {
tmp = t_1;
} else if (y <= -5.2e-81) {
tmp = (x - y) * (t / z);
} else if (y <= 2.05e+44) {
tmp = t * (x / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((y - x) / y) tmp = 0 if y <= -5.7e+85: tmp = t_1 elif y <= -5.2e-81: tmp = (x - y) * (t / z) elif y <= 2.05e+44: tmp = t * (x / (z - y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(y - x) / y)) tmp = 0.0 if (y <= -5.7e+85) tmp = t_1; elseif (y <= -5.2e-81) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 2.05e+44) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((y - x) / y); tmp = 0.0; if (y <= -5.7e+85) tmp = t_1; elseif (y <= -5.2e-81) tmp = (x - y) * (t / z); elseif (y <= 2.05e+44) tmp = t * (x / (z - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.7e+85], t$95$1, If[LessEqual[y, -5.2e-81], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e+44], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - x}{y}\\
\mathbf{if}\;y \leq -5.7 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-81}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.7000000000000002e85 or 2.04999999999999982e44 < y Initial program 99.9%
associate-*l/72.6%
associate-/l*64.8%
Simplified64.8%
associate-*r/72.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 84.2%
neg-mul-184.2%
distribute-neg-frac284.2%
sub-neg84.2%
distribute-neg-in84.2%
remove-double-neg84.2%
Simplified84.2%
Taylor expanded in t around 0 59.6%
associate-/l*84.2%
Simplified84.2%
if -5.7000000000000002e85 < y < -5.1999999999999998e-81Initial program 93.4%
associate-*l/95.1%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in z around inf 63.3%
*-commutative63.3%
associate-/l*67.6%
Simplified67.6%
if -5.1999999999999998e-81 < y < 2.04999999999999982e44Initial program 95.6%
Taylor expanded in x around inf 82.8%
Final simplification81.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.45e+106)
t
(if (<= y -7.2e-82)
(* y (/ t (- z)))
(if (<= y 1.05e+44) (/ t (/ z x)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e+106) {
tmp = t;
} else if (y <= -7.2e-82) {
tmp = y * (t / -z);
} else if (y <= 1.05e+44) {
tmp = t / (z / x);
} else {
tmp = 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 <= (-1.45d+106)) then
tmp = t
else if (y <= (-7.2d-82)) then
tmp = y * (t / -z)
else if (y <= 1.05d+44) then
tmp = t / (z / x)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e+106) {
tmp = t;
} else if (y <= -7.2e-82) {
tmp = y * (t / -z);
} else if (y <= 1.05e+44) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.45e+106: tmp = t elif y <= -7.2e-82: tmp = y * (t / -z) elif y <= 1.05e+44: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.45e+106) tmp = t; elseif (y <= -7.2e-82) tmp = Float64(y * Float64(t / Float64(-z))); elseif (y <= 1.05e+44) tmp = Float64(t / Float64(z / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.45e+106) tmp = t; elseif (y <= -7.2e-82) tmp = y * (t / -z); elseif (y <= 1.05e+44) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e+106], t, If[LessEqual[y, -7.2e-82], N[(y * N[(t / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+44], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+106}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-82}:\\
\;\;\;\;y \cdot \frac{t}{-z}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+44}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.4500000000000001e106 or 1.04999999999999993e44 < y Initial program 99.9%
associate-*l/72.0%
associate-/l*64.3%
Simplified64.3%
Taylor expanded in y around inf 73.6%
if -1.4500000000000001e106 < y < -7.19999999999999996e-82Initial program 93.9%
associate-*l/95.5%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in z around inf 61.1%
*-commutative61.1%
associate-/l*64.7%
Simplified64.7%
Taylor expanded in x around 0 47.7%
associate-*r/47.7%
mul-1-neg47.7%
distribute-rgt-neg-out47.7%
associate-*l/49.7%
Simplified49.7%
if -7.19999999999999996e-82 < y < 1.04999999999999993e44Initial program 95.6%
associate-*l/87.9%
associate-/l*91.6%
Simplified91.6%
associate-*r/87.9%
associate-*l/95.6%
*-commutative95.6%
clear-num95.5%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in y around 0 65.3%
Final simplification66.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.45e+106)
t
(if (<= y -7.5e+14)
(* (/ y z) (- t))
(if (<= y 3.35e+45) (* t (/ x z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e+106) {
tmp = t;
} else if (y <= -7.5e+14) {
tmp = (y / z) * -t;
} else if (y <= 3.35e+45) {
tmp = t * (x / z);
} else {
tmp = 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 <= (-1.45d+106)) then
tmp = t
else if (y <= (-7.5d+14)) then
tmp = (y / z) * -t
else if (y <= 3.35d+45) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e+106) {
tmp = t;
} else if (y <= -7.5e+14) {
tmp = (y / z) * -t;
} else if (y <= 3.35e+45) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.45e+106: tmp = t elif y <= -7.5e+14: tmp = (y / z) * -t elif y <= 3.35e+45: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.45e+106) tmp = t; elseif (y <= -7.5e+14) tmp = Float64(Float64(y / z) * Float64(-t)); elseif (y <= 3.35e+45) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.45e+106) tmp = t; elseif (y <= -7.5e+14) tmp = (y / z) * -t; elseif (y <= 3.35e+45) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e+106], t, If[LessEqual[y, -7.5e+14], N[(N[(y / z), $MachinePrecision] * (-t)), $MachinePrecision], If[LessEqual[y, 3.35e+45], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+106}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{+14}:\\
\;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 3.35 \cdot 10^{+45}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.4500000000000001e106 or 3.34999999999999994e45 < y Initial program 99.9%
associate-*l/72.0%
associate-/l*64.3%
Simplified64.3%
Taylor expanded in y around inf 73.6%
if -1.4500000000000001e106 < y < -7.5e14Initial program 99.7%
associate-*l/99.8%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in z around inf 61.6%
*-commutative61.6%
associate-/l*60.7%
Simplified60.7%
Taylor expanded in x around 0 55.0%
mul-1-neg55.0%
associate-/l*55.0%
distribute-rgt-neg-in55.0%
distribute-neg-frac255.0%
Simplified55.0%
if -7.5e14 < y < 3.34999999999999994e45Initial program 94.7%
Taylor expanded in y around 0 60.3%
Final simplification65.2%
(FPCore (x y z t) :precision binary64 (if (<= y -4e+105) (/ t (- 1.0 (/ z y))) (if (<= y 1.55e+111) (* (- y x) (/ t (- y z))) (/ t (/ y (- y x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e+105) {
tmp = t / (1.0 - (z / y));
} else if (y <= 1.55e+111) {
tmp = (y - x) * (t / (y - z));
} else {
tmp = t / (y / (y - 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 (y <= (-4d+105)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= 1.55d+111) then
tmp = (y - x) * (t / (y - z))
else
tmp = t / (y / (y - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e+105) {
tmp = t / (1.0 - (z / y));
} else if (y <= 1.55e+111) {
tmp = (y - x) * (t / (y - z));
} else {
tmp = t / (y / (y - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4e+105: tmp = t / (1.0 - (z / y)) elif y <= 1.55e+111: tmp = (y - x) * (t / (y - z)) else: tmp = t / (y / (y - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4e+105) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= 1.55e+111) tmp = Float64(Float64(y - x) * Float64(t / Float64(y - z))); else tmp = Float64(t / Float64(y / Float64(y - x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4e+105) tmp = t / (1.0 - (z / y)); elseif (y <= 1.55e+111) tmp = (y - x) * (t / (y - z)); else tmp = t / (y / (y - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4e+105], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+111], N[(N[(y - x), $MachinePrecision] * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(y / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+105}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+111}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{t}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{y}{y - x}}\\
\end{array}
\end{array}
if y < -3.9999999999999998e105Initial program 99.9%
associate-*l/75.6%
associate-/l*60.1%
Simplified60.1%
associate-*r/75.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 91.1%
mul-1-neg91.1%
div-sub91.1%
sub-neg91.1%
*-inverses91.1%
metadata-eval91.1%
Simplified91.1%
Taylor expanded in t around 0 91.1%
if -3.9999999999999998e105 < y < 1.55e111Initial program 95.4%
associate-*l/90.4%
associate-/l*91.9%
Simplified91.9%
if 1.55e111 < y Initial program 99.9%
associate-*l/59.4%
associate-/l*64.5%
Simplified64.5%
associate-*r/59.4%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 89.6%
neg-mul-189.6%
distribute-neg-frac289.6%
sub-neg89.6%
distribute-neg-in89.6%
remove-double-neg89.6%
Simplified89.6%
Final simplification91.4%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return 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 = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 97.0%
associate-*l/82.8%
associate-/l*81.3%
Simplified81.3%
Taylor expanded in y around inf 36.8%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - 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 = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024085
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))