
(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 14 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 96.3%
Final simplification96.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- x y) z))))
(if (<= y -4.6e+144)
t
(if (<= y -1.8e+17)
t_1
(if (<= y -25000.0)
t
(if (<= y -1.3e-55)
(* (- x y) (/ t z))
(if (<= y 0.002)
(* x (/ t (- z y)))
(if (<= y 1.2e+50) t_1 t))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double tmp;
if (y <= -4.6e+144) {
tmp = t;
} else if (y <= -1.8e+17) {
tmp = t_1;
} else if (y <= -25000.0) {
tmp = t;
} else if (y <= -1.3e-55) {
tmp = (x - y) * (t / z);
} else if (y <= 0.002) {
tmp = x * (t / (z - y));
} else if (y <= 1.2e+50) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * ((x - y) / z)
if (y <= (-4.6d+144)) then
tmp = t
else if (y <= (-1.8d+17)) then
tmp = t_1
else if (y <= (-25000.0d0)) then
tmp = t
else if (y <= (-1.3d-55)) then
tmp = (x - y) * (t / z)
else if (y <= 0.002d0) then
tmp = x * (t / (z - y))
else if (y <= 1.2d+50) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double tmp;
if (y <= -4.6e+144) {
tmp = t;
} else if (y <= -1.8e+17) {
tmp = t_1;
} else if (y <= -25000.0) {
tmp = t;
} else if (y <= -1.3e-55) {
tmp = (x - y) * (t / z);
} else if (y <= 0.002) {
tmp = x * (t / (z - y));
} else if (y <= 1.2e+50) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) tmp = 0 if y <= -4.6e+144: tmp = t elif y <= -1.8e+17: tmp = t_1 elif y <= -25000.0: tmp = t elif y <= -1.3e-55: tmp = (x - y) * (t / z) elif y <= 0.002: tmp = x * (t / (z - y)) elif y <= 1.2e+50: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) tmp = 0.0 if (y <= -4.6e+144) tmp = t; elseif (y <= -1.8e+17) tmp = t_1; elseif (y <= -25000.0) tmp = t; elseif (y <= -1.3e-55) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 0.002) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 1.2e+50) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); tmp = 0.0; if (y <= -4.6e+144) tmp = t; elseif (y <= -1.8e+17) tmp = t_1; elseif (y <= -25000.0) tmp = t; elseif (y <= -1.3e-55) tmp = (x - y) * (t / z); elseif (y <= 0.002) tmp = x * (t / (z - y)); elseif (y <= 1.2e+50) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+144], t, If[LessEqual[y, -1.8e+17], t$95$1, If[LessEqual[y, -25000.0], t, If[LessEqual[y, -1.3e-55], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.002], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+50], t$95$1, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -25000:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-55}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 0.002:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.6000000000000003e144 or -1.8e17 < y < -25000 or 1.2000000000000001e50 < y Initial program 99.8%
associate-*l/71.2%
associate-/l*74.2%
Simplified74.2%
Taylor expanded in y around inf 73.3%
if -4.6000000000000003e144 < y < -1.8e17 or 2e-3 < y < 1.2000000000000001e50Initial program 99.7%
Taylor expanded in z around inf 63.6%
if -25000 < y < -1.2999999999999999e-55Initial program 99.5%
associate-*l/92.2%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
associate-/l*75.3%
Simplified75.3%
if -1.2999999999999999e-55 < y < 2e-3Initial program 92.8%
associate-*l/88.7%
associate-/l*95.7%
Simplified95.7%
clear-num94.5%
un-div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in x around inf 77.9%
*-commutative77.9%
associate-*r/83.2%
Simplified83.2%
Final simplification76.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t (- z y)))))
(if (<= y -4.8e+121)
t
(if (<= y -2.1e+15)
t_1
(if (<= y -2.8e-22)
t
(if (<= y 11000000.0)
t_1
(if (<= y 3.1e+43)
(* t (/ y (- z)))
(if (<= y 1.2e+64) (/ t (/ (- y) x)) t))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / (z - y));
double tmp;
if (y <= -4.8e+121) {
tmp = t;
} else if (y <= -2.1e+15) {
tmp = t_1;
} else if (y <= -2.8e-22) {
tmp = t;
} else if (y <= 11000000.0) {
tmp = t_1;
} else if (y <= 3.1e+43) {
tmp = t * (y / -z);
} else if (y <= 1.2e+64) {
tmp = t / (-y / 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) :: t_1
real(8) :: tmp
t_1 = x * (t / (z - y))
if (y <= (-4.8d+121)) then
tmp = t
else if (y <= (-2.1d+15)) then
tmp = t_1
else if (y <= (-2.8d-22)) then
tmp = t
else if (y <= 11000000.0d0) then
tmp = t_1
else if (y <= 3.1d+43) then
tmp = t * (y / -z)
else if (y <= 1.2d+64) then
tmp = t / (-y / x)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t / (z - y));
double tmp;
if (y <= -4.8e+121) {
tmp = t;
} else if (y <= -2.1e+15) {
tmp = t_1;
} else if (y <= -2.8e-22) {
tmp = t;
} else if (y <= 11000000.0) {
tmp = t_1;
} else if (y <= 3.1e+43) {
tmp = t * (y / -z);
} else if (y <= 1.2e+64) {
tmp = t / (-y / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / (z - y)) tmp = 0 if y <= -4.8e+121: tmp = t elif y <= -2.1e+15: tmp = t_1 elif y <= -2.8e-22: tmp = t elif y <= 11000000.0: tmp = t_1 elif y <= 3.1e+43: tmp = t * (y / -z) elif y <= 1.2e+64: tmp = t / (-y / x) else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / Float64(z - y))) tmp = 0.0 if (y <= -4.8e+121) tmp = t; elseif (y <= -2.1e+15) tmp = t_1; elseif (y <= -2.8e-22) tmp = t; elseif (y <= 11000000.0) tmp = t_1; elseif (y <= 3.1e+43) tmp = Float64(t * Float64(y / Float64(-z))); elseif (y <= 1.2e+64) tmp = Float64(t / Float64(Float64(-y) / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / (z - y)); tmp = 0.0; if (y <= -4.8e+121) tmp = t; elseif (y <= -2.1e+15) tmp = t_1; elseif (y <= -2.8e-22) tmp = t; elseif (y <= 11000000.0) tmp = t_1; elseif (y <= 3.1e+43) tmp = t * (y / -z); elseif (y <= 1.2e+64) tmp = t / (-y / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+121], t, If[LessEqual[y, -2.1e+15], t$95$1, If[LessEqual[y, -2.8e-22], t, If[LessEqual[y, 11000000.0], t$95$1, If[LessEqual[y, 3.1e+43], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+64], N[(t / N[((-y) / x), $MachinePrecision]), $MachinePrecision], t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z - y}\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+121}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-22}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 11000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+43}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+64}:\\
\;\;\;\;\frac{t}{\frac{-y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.8e121 or -2.1e15 < y < -2.79999999999999995e-22 or 1.2e64 < y Initial program 99.8%
associate-*l/70.8%
associate-/l*73.9%
Simplified73.9%
Taylor expanded in y around inf 72.3%
if -4.8e121 < y < -2.1e15 or -2.79999999999999995e-22 < y < 1.1e7Initial program 94.2%
associate-*l/88.6%
associate-/l*94.6%
Simplified94.6%
clear-num93.1%
un-div-inv93.3%
Applied egg-rr93.3%
Taylor expanded in x around inf 72.5%
*-commutative72.5%
associate-*r/77.9%
Simplified77.9%
if 1.1e7 < y < 3.1000000000000002e43Initial program 99.7%
associate-*l/90.8%
associate-/l*87.5%
Simplified87.5%
Taylor expanded in z around inf 64.5%
*-commutative64.5%
associate-/l*65.0%
Simplified65.0%
Taylor expanded in x around 0 56.3%
mul-1-neg56.3%
associate-/l*65.2%
distribute-rgt-neg-in65.2%
distribute-frac-neg265.2%
Simplified65.2%
if 3.1000000000000002e43 < y < 1.2e64Initial program 99.7%
associate-*l/99.7%
associate-/l*99.2%
Simplified99.2%
associate-*r/99.7%
associate-*l/99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 66.9%
Taylor expanded in z around 0 66.9%
neg-mul-166.9%
distribute-neg-frac66.9%
Simplified66.9%
Final simplification75.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t z))))
(if (<= y -5e+144)
t
(if (<= y -1.95e+17)
t_1
(if (<= y -2.6e-22)
t
(if (<= y 0.00185)
(* x (/ t (- z y)))
(if (<= y 4.2e+43)
t_1
(if (<= y 2.4e+65) (/ t (/ (- y) x)) t))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double tmp;
if (y <= -5e+144) {
tmp = t;
} else if (y <= -1.95e+17) {
tmp = t_1;
} else if (y <= -2.6e-22) {
tmp = t;
} else if (y <= 0.00185) {
tmp = x * (t / (z - y));
} else if (y <= 4.2e+43) {
tmp = t_1;
} else if (y <= 2.4e+65) {
tmp = t / (-y / 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) :: t_1
real(8) :: tmp
t_1 = (x - y) * (t / z)
if (y <= (-5d+144)) then
tmp = t
else if (y <= (-1.95d+17)) then
tmp = t_1
else if (y <= (-2.6d-22)) then
tmp = t
else if (y <= 0.00185d0) then
tmp = x * (t / (z - y))
else if (y <= 4.2d+43) then
tmp = t_1
else if (y <= 2.4d+65) then
tmp = t / (-y / x)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double tmp;
if (y <= -5e+144) {
tmp = t;
} else if (y <= -1.95e+17) {
tmp = t_1;
} else if (y <= -2.6e-22) {
tmp = t;
} else if (y <= 0.00185) {
tmp = x * (t / (z - y));
} else if (y <= 4.2e+43) {
tmp = t_1;
} else if (y <= 2.4e+65) {
tmp = t / (-y / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / z) tmp = 0 if y <= -5e+144: tmp = t elif y <= -1.95e+17: tmp = t_1 elif y <= -2.6e-22: tmp = t elif y <= 0.00185: tmp = x * (t / (z - y)) elif y <= 4.2e+43: tmp = t_1 elif y <= 2.4e+65: tmp = t / (-y / x) else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / z)) tmp = 0.0 if (y <= -5e+144) tmp = t; elseif (y <= -1.95e+17) tmp = t_1; elseif (y <= -2.6e-22) tmp = t; elseif (y <= 0.00185) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 4.2e+43) tmp = t_1; elseif (y <= 2.4e+65) tmp = Float64(t / Float64(Float64(-y) / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / z); tmp = 0.0; if (y <= -5e+144) tmp = t; elseif (y <= -1.95e+17) tmp = t_1; elseif (y <= -2.6e-22) tmp = t; elseif (y <= 0.00185) tmp = x * (t / (z - y)); elseif (y <= 4.2e+43) tmp = t_1; elseif (y <= 2.4e+65) tmp = t / (-y / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e+144], t, If[LessEqual[y, -1.95e+17], t$95$1, If[LessEqual[y, -2.6e-22], t, If[LessEqual[y, 0.00185], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+43], t$95$1, If[LessEqual[y, 2.4e+65], N[(t / N[((-y) / x), $MachinePrecision]), $MachinePrecision], t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{if}\;y \leq -5 \cdot 10^{+144}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-22}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.00185:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+65}:\\
\;\;\;\;\frac{t}{\frac{-y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.9999999999999999e144 or -1.95e17 < y < -2.6e-22 or 2.4000000000000002e65 < y Initial program 99.9%
associate-*l/69.7%
associate-/l*72.9%
Simplified72.9%
Taylor expanded in y around inf 74.7%
if -4.9999999999999999e144 < y < -1.95e17 or 0.0018500000000000001 < y < 4.20000000000000003e43Initial program 99.7%
associate-*l/89.0%
associate-/l*87.0%
Simplified87.0%
Taylor expanded in z around inf 57.4%
*-commutative57.4%
associate-/l*57.3%
Simplified57.3%
if -2.6e-22 < y < 0.0018500000000000001Initial program 93.3%
associate-*l/88.9%
associate-/l*96.0%
Simplified96.0%
clear-num94.9%
un-div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in x around inf 75.8%
*-commutative75.8%
associate-*r/81.4%
Simplified81.4%
if 4.20000000000000003e43 < y < 2.4000000000000002e65Initial program 99.7%
associate-*l/99.7%
associate-/l*99.2%
Simplified99.2%
associate-*r/99.7%
associate-*l/99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 66.9%
Taylor expanded in z around 0 66.9%
neg-mul-166.9%
distribute-neg-frac66.9%
Simplified66.9%
Final simplification75.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- x y) z))) (t_2 (- t (* x (/ t y)))))
(if (<= y -5.5e+144)
t_2
(if (<= y -1.2e+62)
t_1
(if (<= y -3.5e-23)
t_2
(if (<= y 0.0022)
(* x (/ t (- z y)))
(if (<= y 6.4e+43) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t - (x * (t / y));
double tmp;
if (y <= -5.5e+144) {
tmp = t_2;
} else if (y <= -1.2e+62) {
tmp = t_1;
} else if (y <= -3.5e-23) {
tmp = t_2;
} else if (y <= 0.0022) {
tmp = x * (t / (z - y));
} else if (y <= 6.4e+43) {
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 = t * ((x - y) / z)
t_2 = t - (x * (t / y))
if (y <= (-5.5d+144)) then
tmp = t_2
else if (y <= (-1.2d+62)) then
tmp = t_1
else if (y <= (-3.5d-23)) then
tmp = t_2
else if (y <= 0.0022d0) then
tmp = x * (t / (z - y))
else if (y <= 6.4d+43) 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 = t * ((x - y) / z);
double t_2 = t - (x * (t / y));
double tmp;
if (y <= -5.5e+144) {
tmp = t_2;
} else if (y <= -1.2e+62) {
tmp = t_1;
} else if (y <= -3.5e-23) {
tmp = t_2;
} else if (y <= 0.0022) {
tmp = x * (t / (z - y));
} else if (y <= 6.4e+43) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) t_2 = t - (x * (t / y)) tmp = 0 if y <= -5.5e+144: tmp = t_2 elif y <= -1.2e+62: tmp = t_1 elif y <= -3.5e-23: tmp = t_2 elif y <= 0.0022: tmp = x * (t / (z - y)) elif y <= 6.4e+43: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) t_2 = Float64(t - Float64(x * Float64(t / y))) tmp = 0.0 if (y <= -5.5e+144) tmp = t_2; elseif (y <= -1.2e+62) tmp = t_1; elseif (y <= -3.5e-23) tmp = t_2; elseif (y <= 0.0022) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 6.4e+43) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); t_2 = t - (x * (t / y)); tmp = 0.0; if (y <= -5.5e+144) tmp = t_2; elseif (y <= -1.2e+62) tmp = t_1; elseif (y <= -3.5e-23) tmp = t_2; elseif (y <= 0.0022) tmp = x * (t / (z - y)); elseif (y <= 6.4e+43) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+144], t$95$2, If[LessEqual[y, -1.2e+62], t$95$1, If[LessEqual[y, -3.5e-23], t$95$2, If[LessEqual[y, 0.0022], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+43], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
t_2 := t - x \cdot \frac{t}{y}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-23}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 0.0022:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -5.50000000000000022e144 or -1.2e62 < y < -3.49999999999999993e-23 or 6.40000000000000029e43 < y Initial program 99.8%
associate-*l/73.1%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in z around 0 63.0%
associate-*r/63.0%
mul-1-neg63.0%
distribute-lft-neg-out63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in x around 0 77.7%
mul-1-neg77.7%
unsub-neg77.7%
Simplified77.7%
*-commutative77.7%
associate-/l*82.9%
Applied egg-rr82.9%
if -5.50000000000000022e144 < y < -1.2e62 or 0.00220000000000000013 < y < 6.40000000000000029e43Initial program 99.6%
Taylor expanded in z around inf 74.5%
if -3.49999999999999993e-23 < y < 0.00220000000000000013Initial program 93.3%
associate-*l/88.8%
associate-/l*96.0%
Simplified96.0%
clear-num94.9%
un-div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in x around inf 76.1%
*-commutative76.1%
associate-*r/81.7%
Simplified81.7%
Final simplification81.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- x y) z))) (t_2 (- t (* t (/ x y)))))
(if (<= y -4.6e+144)
t_2
(if (<= y -1.2e+62)
t_1
(if (<= y -2.4e-25)
t_2
(if (<= y 0.00165)
(* x (/ t (- z y)))
(if (<= y 9.5e+41) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((x - y) / z);
double t_2 = t - (t * (x / y));
double tmp;
if (y <= -4.6e+144) {
tmp = t_2;
} else if (y <= -1.2e+62) {
tmp = t_1;
} else if (y <= -2.4e-25) {
tmp = t_2;
} else if (y <= 0.00165) {
tmp = x * (t / (z - y));
} else if (y <= 9.5e+41) {
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 = t * ((x - y) / z)
t_2 = t - (t * (x / y))
if (y <= (-4.6d+144)) then
tmp = t_2
else if (y <= (-1.2d+62)) then
tmp = t_1
else if (y <= (-2.4d-25)) then
tmp = t_2
else if (y <= 0.00165d0) then
tmp = x * (t / (z - y))
else if (y <= 9.5d+41) 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 = t * ((x - y) / z);
double t_2 = t - (t * (x / y));
double tmp;
if (y <= -4.6e+144) {
tmp = t_2;
} else if (y <= -1.2e+62) {
tmp = t_1;
} else if (y <= -2.4e-25) {
tmp = t_2;
} else if (y <= 0.00165) {
tmp = x * (t / (z - y));
} else if (y <= 9.5e+41) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((x - y) / z) t_2 = t - (t * (x / y)) tmp = 0 if y <= -4.6e+144: tmp = t_2 elif y <= -1.2e+62: tmp = t_1 elif y <= -2.4e-25: tmp = t_2 elif y <= 0.00165: tmp = x * (t / (z - y)) elif y <= 9.5e+41: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(x - y) / z)) t_2 = Float64(t - Float64(t * Float64(x / y))) tmp = 0.0 if (y <= -4.6e+144) tmp = t_2; elseif (y <= -1.2e+62) tmp = t_1; elseif (y <= -2.4e-25) tmp = t_2; elseif (y <= 0.00165) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 9.5e+41) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((x - y) / z); t_2 = t - (t * (x / y)); tmp = 0.0; if (y <= -4.6e+144) tmp = t_2; elseif (y <= -1.2e+62) tmp = t_1; elseif (y <= -2.4e-25) tmp = t_2; elseif (y <= 0.00165) tmp = x * (t / (z - y)); elseif (y <= 9.5e+41) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+144], t$95$2, If[LessEqual[y, -1.2e+62], t$95$1, If[LessEqual[y, -2.4e-25], t$95$2, If[LessEqual[y, 0.00165], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e+41], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x - y}{z}\\
t_2 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-25}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 0.00165:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -4.6000000000000003e144 or -1.2e62 < y < -2.40000000000000009e-25 or 9.4999999999999996e41 < y Initial program 99.8%
associate-*l/73.1%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in z around 0 63.0%
associate-*r/63.0%
mul-1-neg63.0%
distribute-lft-neg-out63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in x around 0 77.7%
mul-1-neg77.7%
unsub-neg77.7%
Simplified77.7%
associate-/l*87.8%
*-commutative87.8%
Applied egg-rr87.8%
if -4.6000000000000003e144 < y < -1.2e62 or 0.00165 < y < 9.4999999999999996e41Initial program 99.6%
Taylor expanded in z around inf 74.5%
if -2.40000000000000009e-25 < y < 0.00165Initial program 93.3%
associate-*l/88.8%
associate-/l*96.0%
Simplified96.0%
clear-num94.9%
un-div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in x around inf 76.1%
*-commutative76.1%
associate-*r/81.7%
Simplified81.7%
Final simplification83.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ z (- x y)))) (t_2 (- t (* t (/ x y)))))
(if (<= y -4.6e+144)
t_2
(if (<= y -5.2e+61)
t_1
(if (<= y -1.02e-26)
t_2
(if (<= y 0.00165)
(* x (/ t (- z y)))
(if (<= y 3.1e+42) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (z / (x - y));
double t_2 = t - (t * (x / y));
double tmp;
if (y <= -4.6e+144) {
tmp = t_2;
} else if (y <= -5.2e+61) {
tmp = t_1;
} else if (y <= -1.02e-26) {
tmp = t_2;
} else if (y <= 0.00165) {
tmp = x * (t / (z - y));
} else if (y <= 3.1e+42) {
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 = t / (z / (x - y))
t_2 = t - (t * (x / y))
if (y <= (-4.6d+144)) then
tmp = t_2
else if (y <= (-5.2d+61)) then
tmp = t_1
else if (y <= (-1.02d-26)) then
tmp = t_2
else if (y <= 0.00165d0) then
tmp = x * (t / (z - y))
else if (y <= 3.1d+42) 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 = t / (z / (x - y));
double t_2 = t - (t * (x / y));
double tmp;
if (y <= -4.6e+144) {
tmp = t_2;
} else if (y <= -5.2e+61) {
tmp = t_1;
} else if (y <= -1.02e-26) {
tmp = t_2;
} else if (y <= 0.00165) {
tmp = x * (t / (z - y));
} else if (y <= 3.1e+42) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (z / (x - y)) t_2 = t - (t * (x / y)) tmp = 0 if y <= -4.6e+144: tmp = t_2 elif y <= -5.2e+61: tmp = t_1 elif y <= -1.02e-26: tmp = t_2 elif y <= 0.00165: tmp = x * (t / (z - y)) elif y <= 3.1e+42: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(z / Float64(x - y))) t_2 = Float64(t - Float64(t * Float64(x / y))) tmp = 0.0 if (y <= -4.6e+144) tmp = t_2; elseif (y <= -5.2e+61) tmp = t_1; elseif (y <= -1.02e-26) tmp = t_2; elseif (y <= 0.00165) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 3.1e+42) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (z / (x - y)); t_2 = t - (t * (x / y)); tmp = 0.0; if (y <= -4.6e+144) tmp = t_2; elseif (y <= -5.2e+61) tmp = t_1; elseif (y <= -1.02e-26) tmp = t_2; elseif (y <= 0.00165) tmp = x * (t / (z - y)); elseif (y <= 3.1e+42) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+144], t$95$2, If[LessEqual[y, -5.2e+61], t$95$1, If[LessEqual[y, -1.02e-26], t$95$2, If[LessEqual[y, 0.00165], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+42], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{z}{x - y}}\\
t_2 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 0.00165:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -4.6000000000000003e144 or -5.19999999999999945e61 < y < -1.02e-26 or 3.1000000000000002e42 < y Initial program 99.8%
associate-*l/73.1%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in z around 0 63.0%
associate-*r/63.0%
mul-1-neg63.0%
distribute-lft-neg-out63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in x around 0 77.7%
mul-1-neg77.7%
unsub-neg77.7%
Simplified77.7%
associate-/l*87.8%
*-commutative87.8%
Applied egg-rr87.8%
if -4.6000000000000003e144 < y < -5.19999999999999945e61 or 0.00165 < y < 3.1000000000000002e42Initial program 99.6%
associate-*l/92.1%
associate-/l*86.6%
Simplified86.6%
associate-*r/92.1%
associate-*l/99.6%
*-commutative99.6%
clear-num99.3%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 74.6%
if -1.02e-26 < y < 0.00165Initial program 93.3%
associate-*l/88.8%
associate-/l*96.0%
Simplified96.0%
clear-num94.9%
un-div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in x around inf 76.1%
*-commutative76.1%
associate-*r/81.7%
Simplified81.7%
Final simplification83.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- t (* t (/ x y)))))
(if (<= y -4.6e+144)
t_1
(if (<= y -1.2e+62)
(/ (* (- x y) t) z)
(if (<= y -1.5e-23)
t_1
(if (<= y 0.00176)
(* x (/ t (- z y)))
(if (<= y 5.4e+45) (/ t (/ z (- x y))) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = t - (t * (x / y));
double tmp;
if (y <= -4.6e+144) {
tmp = t_1;
} else if (y <= -1.2e+62) {
tmp = ((x - y) * t) / z;
} else if (y <= -1.5e-23) {
tmp = t_1;
} else if (y <= 0.00176) {
tmp = x * (t / (z - y));
} else if (y <= 5.4e+45) {
tmp = t / (z / (x - 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 - (t * (x / y))
if (y <= (-4.6d+144)) then
tmp = t_1
else if (y <= (-1.2d+62)) then
tmp = ((x - y) * t) / z
else if (y <= (-1.5d-23)) then
tmp = t_1
else if (y <= 0.00176d0) then
tmp = x * (t / (z - y))
else if (y <= 5.4d+45) then
tmp = t / (z / (x - 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 - (t * (x / y));
double tmp;
if (y <= -4.6e+144) {
tmp = t_1;
} else if (y <= -1.2e+62) {
tmp = ((x - y) * t) / z;
} else if (y <= -1.5e-23) {
tmp = t_1;
} else if (y <= 0.00176) {
tmp = x * (t / (z - y));
} else if (y <= 5.4e+45) {
tmp = t / (z / (x - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t - (t * (x / y)) tmp = 0 if y <= -4.6e+144: tmp = t_1 elif y <= -1.2e+62: tmp = ((x - y) * t) / z elif y <= -1.5e-23: tmp = t_1 elif y <= 0.00176: tmp = x * (t / (z - y)) elif y <= 5.4e+45: tmp = t / (z / (x - y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t - Float64(t * Float64(x / y))) tmp = 0.0 if (y <= -4.6e+144) tmp = t_1; elseif (y <= -1.2e+62) tmp = Float64(Float64(Float64(x - y) * t) / z); elseif (y <= -1.5e-23) tmp = t_1; elseif (y <= 0.00176) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 5.4e+45) tmp = Float64(t / Float64(z / Float64(x - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t - (t * (x / y)); tmp = 0.0; if (y <= -4.6e+144) tmp = t_1; elseif (y <= -1.2e+62) tmp = ((x - y) * t) / z; elseif (y <= -1.5e-23) tmp = t_1; elseif (y <= 0.00176) tmp = x * (t / (z - y)); elseif (y <= 5.4e+45) tmp = t / (z / (x - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+144], t$95$1, If[LessEqual[y, -1.2e+62], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -1.5e-23], t$95$1, If[LessEqual[y, 0.00176], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e+45], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{+62}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.00176:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+45}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.6000000000000003e144 or -1.2e62 < y < -1.50000000000000001e-23 or 5.39999999999999968e45 < y Initial program 99.8%
associate-*l/73.1%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in z around 0 63.0%
associate-*r/63.0%
mul-1-neg63.0%
distribute-lft-neg-out63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in x around 0 77.7%
mul-1-neg77.7%
unsub-neg77.7%
Simplified77.7%
associate-/l*87.8%
*-commutative87.8%
Applied egg-rr87.8%
if -4.6000000000000003e144 < y < -1.2e62Initial program 99.4%
associate-*l/99.8%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in z around inf 81.6%
if -1.50000000000000001e-23 < y < 0.00176000000000000006Initial program 93.3%
associate-*l/88.8%
associate-/l*96.0%
Simplified96.0%
clear-num94.9%
un-div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in x around inf 76.1%
*-commutative76.1%
associate-*r/81.7%
Simplified81.7%
if 0.00176000000000000006 < y < 5.39999999999999968e45Initial program 99.7%
associate-*l/88.5%
associate-/l*91.3%
Simplified91.3%
associate-*r/88.5%
associate-*l/99.7%
*-commutative99.7%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 71.4%
Final simplification83.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- t (* t (/ x y)))))
(if (<= y -4.7e+144)
t_1
(if (<= y -1.95e+59)
(/ (* (- x y) t) z)
(if (<= y -2.2e-24)
t_1
(if (<= y 8200000.0)
(* x (/ t (- z y)))
(if (<= y 2.55e+48) (* y (/ t (- y z))) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = t - (t * (x / y));
double tmp;
if (y <= -4.7e+144) {
tmp = t_1;
} else if (y <= -1.95e+59) {
tmp = ((x - y) * t) / z;
} else if (y <= -2.2e-24) {
tmp = t_1;
} else if (y <= 8200000.0) {
tmp = x * (t / (z - y));
} else if (y <= 2.55e+48) {
tmp = y * (t / (y - 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 = t - (t * (x / y))
if (y <= (-4.7d+144)) then
tmp = t_1
else if (y <= (-1.95d+59)) then
tmp = ((x - y) * t) / z
else if (y <= (-2.2d-24)) then
tmp = t_1
else if (y <= 8200000.0d0) then
tmp = x * (t / (z - y))
else if (y <= 2.55d+48) then
tmp = y * (t / (y - 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 = t - (t * (x / y));
double tmp;
if (y <= -4.7e+144) {
tmp = t_1;
} else if (y <= -1.95e+59) {
tmp = ((x - y) * t) / z;
} else if (y <= -2.2e-24) {
tmp = t_1;
} else if (y <= 8200000.0) {
tmp = x * (t / (z - y));
} else if (y <= 2.55e+48) {
tmp = y * (t / (y - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t - (t * (x / y)) tmp = 0 if y <= -4.7e+144: tmp = t_1 elif y <= -1.95e+59: tmp = ((x - y) * t) / z elif y <= -2.2e-24: tmp = t_1 elif y <= 8200000.0: tmp = x * (t / (z - y)) elif y <= 2.55e+48: tmp = y * (t / (y - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t - Float64(t * Float64(x / y))) tmp = 0.0 if (y <= -4.7e+144) tmp = t_1; elseif (y <= -1.95e+59) tmp = Float64(Float64(Float64(x - y) * t) / z); elseif (y <= -2.2e-24) tmp = t_1; elseif (y <= 8200000.0) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 2.55e+48) tmp = Float64(y * Float64(t / Float64(y - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t - (t * (x / y)); tmp = 0.0; if (y <= -4.7e+144) tmp = t_1; elseif (y <= -1.95e+59) tmp = ((x - y) * t) / z; elseif (y <= -2.2e-24) tmp = t_1; elseif (y <= 8200000.0) tmp = x * (t / (z - y)); elseif (y <= 2.55e+48) tmp = y * (t / (y - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.7e+144], t$95$1, If[LessEqual[y, -1.95e+59], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -2.2e-24], t$95$1, If[LessEqual[y, 8200000.0], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.55e+48], N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - t \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{+59}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8200000:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{+48}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.7000000000000002e144 or -1.95000000000000011e59 < y < -2.20000000000000002e-24 or 2.5499999999999999e48 < y Initial program 99.8%
associate-*l/73.1%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in z around 0 63.0%
associate-*r/63.0%
mul-1-neg63.0%
distribute-lft-neg-out63.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in x around 0 77.7%
mul-1-neg77.7%
unsub-neg77.7%
Simplified77.7%
associate-/l*87.8%
*-commutative87.8%
Applied egg-rr87.8%
if -4.7000000000000002e144 < y < -1.95000000000000011e59Initial program 99.4%
associate-*l/99.8%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in z around inf 81.6%
if -2.20000000000000002e-24 < y < 8.2e6Initial program 93.5%
associate-*l/88.6%
associate-/l*96.1%
Simplified96.1%
clear-num94.9%
un-div-inv95.1%
Applied egg-rr95.1%
Taylor expanded in x around inf 74.9%
*-commutative74.9%
associate-*r/80.9%
Simplified80.9%
if 8.2e6 < y < 2.5499999999999999e48Initial program 99.7%
associate-*l/90.8%
associate-/l*87.5%
Simplified87.5%
Taylor expanded in x around 0 73.7%
mul-1-neg73.7%
associate-*l/82.4%
distribute-rgt-neg-out82.4%
Simplified82.4%
Final simplification83.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.75e+121)
t
(if (<= y -1.5e+18)
(* t (/ x (- z y)))
(if (<= y -2.8e-22) t (if (<= y 2.55e+65) (* x (/ t (- z y))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.75e+121) {
tmp = t;
} else if (y <= -1.5e+18) {
tmp = t * (x / (z - y));
} else if (y <= -2.8e-22) {
tmp = t;
} else if (y <= 2.55e+65) {
tmp = x * (t / (z - y));
} 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.75d+121)) then
tmp = t
else if (y <= (-1.5d+18)) then
tmp = t * (x / (z - y))
else if (y <= (-2.8d-22)) then
tmp = t
else if (y <= 2.55d+65) then
tmp = x * (t / (z - y))
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.75e+121) {
tmp = t;
} else if (y <= -1.5e+18) {
tmp = t * (x / (z - y));
} else if (y <= -2.8e-22) {
tmp = t;
} else if (y <= 2.55e+65) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.75e+121: tmp = t elif y <= -1.5e+18: tmp = t * (x / (z - y)) elif y <= -2.8e-22: tmp = t elif y <= 2.55e+65: tmp = x * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.75e+121) tmp = t; elseif (y <= -1.5e+18) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= -2.8e-22) tmp = t; elseif (y <= 2.55e+65) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.75e+121) tmp = t; elseif (y <= -1.5e+18) tmp = t * (x / (z - y)); elseif (y <= -2.8e-22) tmp = t; elseif (y <= 2.55e+65) tmp = x * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.75e+121], t, If[LessEqual[y, -1.5e+18], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.8e-22], t, If[LessEqual[y, 2.55e+65], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+121}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{+18}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-22}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{+65}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.75e121 or -1.5e18 < y < -2.79999999999999995e-22 or 2.54999999999999994e65 < y Initial program 99.8%
associate-*l/70.8%
associate-/l*73.9%
Simplified73.9%
Taylor expanded in y around inf 72.3%
if -1.75e121 < y < -1.5e18Initial program 99.7%
Taylor expanded in x around inf 64.2%
if -2.79999999999999995e-22 < y < 2.54999999999999994e65Initial program 94.2%
associate-*l/89.2%
associate-/l*95.7%
Simplified95.7%
clear-num94.2%
un-div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in x around inf 71.3%
*-commutative71.3%
associate-*r/75.8%
Simplified75.8%
Final simplification74.0%
(FPCore (x y z t) :precision binary64 (if (<= y -8.5e-28) t (if (<= y 0.35) (* x (/ t z)) (if (<= y 1.7e+50) (* t (/ y (- z))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.5e-28) {
tmp = t;
} else if (y <= 0.35) {
tmp = x * (t / z);
} else if (y <= 1.7e+50) {
tmp = t * (y / -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 <= (-8.5d-28)) then
tmp = t
else if (y <= 0.35d0) then
tmp = x * (t / z)
else if (y <= 1.7d+50) then
tmp = t * (y / -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 <= -8.5e-28) {
tmp = t;
} else if (y <= 0.35) {
tmp = x * (t / z);
} else if (y <= 1.7e+50) {
tmp = t * (y / -z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.5e-28: tmp = t elif y <= 0.35: tmp = x * (t / z) elif y <= 1.7e+50: tmp = t * (y / -z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.5e-28) tmp = t; elseif (y <= 0.35) tmp = Float64(x * Float64(t / z)); elseif (y <= 1.7e+50) tmp = Float64(t * Float64(y / Float64(-z))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.5e-28) tmp = t; elseif (y <= 0.35) tmp = x * (t / z); elseif (y <= 1.7e+50) tmp = t * (y / -z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.5e-28], t, If[LessEqual[y, 0.35], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+50], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-28}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.35:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+50}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.49999999999999925e-28 or 1.6999999999999999e50 < y Initial program 99.8%
associate-*l/75.2%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in y around inf 62.1%
if -8.49999999999999925e-28 < y < 0.34999999999999998Initial program 93.3%
associate-*l/88.2%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in y around 0 63.1%
*-commutative63.1%
associate-/l*69.1%
Simplified69.1%
if 0.34999999999999998 < y < 1.6999999999999999e50Initial program 99.7%
associate-*l/93.7%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in z around inf 63.7%
*-commutative63.7%
associate-/l*63.4%
Simplified63.4%
Taylor expanded in x around 0 52.0%
mul-1-neg52.0%
associate-/l*58.1%
distribute-rgt-neg-in58.1%
distribute-frac-neg258.1%
Simplified58.1%
Final simplification65.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9e+192) (not (<= y 6e+114))) (- t (* t (/ x y))) (* (- x y) (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e+192) || !(y <= 6e+114)) {
tmp = t - (t * (x / y));
} else {
tmp = (x - y) * (t / (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-9d+192)) .or. (.not. (y <= 6d+114))) then
tmp = t - (t * (x / y))
else
tmp = (x - y) * (t / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e+192) || !(y <= 6e+114)) {
tmp = t - (t * (x / y));
} else {
tmp = (x - y) * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9e+192) or not (y <= 6e+114): tmp = t - (t * (x / y)) else: tmp = (x - y) * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9e+192) || !(y <= 6e+114)) tmp = Float64(t - Float64(t * Float64(x / y))); else tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9e+192) || ~((y <= 6e+114))) tmp = t - (t * (x / y)); else tmp = (x - y) * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9e+192], N[Not[LessEqual[y, 6e+114]], $MachinePrecision]], N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+192} \lor \neg \left(y \leq 6 \cdot 10^{+114}\right):\\
\;\;\;\;t - t \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -9e192 or 6.0000000000000001e114 < y Initial program 99.9%
associate-*l/67.8%
associate-/l*68.9%
Simplified68.9%
Taylor expanded in z around 0 64.6%
associate-*r/64.6%
mul-1-neg64.6%
distribute-lft-neg-out64.6%
*-commutative64.6%
Simplified64.6%
Taylor expanded in x around 0 81.9%
mul-1-neg81.9%
unsub-neg81.9%
Simplified81.9%
associate-/l*95.0%
*-commutative95.0%
Applied egg-rr95.0%
if -9e192 < y < 6.0000000000000001e114Initial program 95.3%
associate-*l/87.9%
associate-/l*93.5%
Simplified93.5%
Final simplification93.8%
(FPCore (x y z t) :precision binary64 (if (<= y -1.5e-27) t (if (<= y 21000000000.0) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e-27) {
tmp = t;
} else if (y <= 21000000000.0) {
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.5d-27)) then
tmp = t
else if (y <= 21000000000.0d0) 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.5e-27) {
tmp = t;
} else if (y <= 21000000000.0) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.5e-27: tmp = t elif y <= 21000000000.0: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.5e-27) tmp = t; elseif (y <= 21000000000.0) 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.5e-27) tmp = t; elseif (y <= 21000000000.0) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.5e-27], t, If[LessEqual[y, 21000000000.0], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-27}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 21000000000:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.5000000000000001e-27 or 2.1e10 < y Initial program 99.8%
associate-*l/76.3%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in y around inf 59.2%
if -1.5000000000000001e-27 < y < 2.1e10Initial program 93.6%
associate-*l/88.8%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in y around 0 62.1%
*-commutative62.1%
associate-/l*67.7%
Simplified67.7%
Final simplification64.0%
(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 96.3%
associate-*l/83.3%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in y around inf 31.5%
Final simplification31.5%
(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 2024066
(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))