
(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 19 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 (/ 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}
Initial program 97.3%
*-commutative97.3%
clear-num97.2%
un-div-inv97.3%
Applied egg-rr97.3%
Final simplification97.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t z))) (t_2 (* t (- 1.0 (/ x y)))))
(if (<= y -6e+40)
t_2
(if (<= y -1600000.0)
t_1
(if (<= y -1.2e-14)
t_2
(if (<= y 2.8e-91)
(* x (/ t (- z y)))
(if (or (<= y 8e+39) (not (<= y 8.5e+53))) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -6e+40) {
tmp = t_2;
} else if (y <= -1600000.0) {
tmp = t_1;
} else if (y <= -1.2e-14) {
tmp = t_2;
} else if (y <= 2.8e-91) {
tmp = x * (t / (z - y));
} else if ((y <= 8e+39) || !(y <= 8.5e+53)) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x - y) * (t / z)
t_2 = t * (1.0d0 - (x / y))
if (y <= (-6d+40)) then
tmp = t_2
else if (y <= (-1600000.0d0)) then
tmp = t_1
else if (y <= (-1.2d-14)) then
tmp = t_2
else if (y <= 2.8d-91) then
tmp = x * (t / (z - y))
else if ((y <= 8d+39) .or. (.not. (y <= 8.5d+53))) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -6e+40) {
tmp = t_2;
} else if (y <= -1600000.0) {
tmp = t_1;
} else if (y <= -1.2e-14) {
tmp = t_2;
} else if (y <= 2.8e-91) {
tmp = x * (t / (z - y));
} else if ((y <= 8e+39) || !(y <= 8.5e+53)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / z) t_2 = t * (1.0 - (x / y)) tmp = 0 if y <= -6e+40: tmp = t_2 elif y <= -1600000.0: tmp = t_1 elif y <= -1.2e-14: tmp = t_2 elif y <= 2.8e-91: tmp = x * (t / (z - y)) elif (y <= 8e+39) or not (y <= 8.5e+53): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / z)) t_2 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -6e+40) tmp = t_2; elseif (y <= -1600000.0) tmp = t_1; elseif (y <= -1.2e-14) tmp = t_2; elseif (y <= 2.8e-91) tmp = Float64(x * Float64(t / Float64(z - y))); elseif ((y <= 8e+39) || !(y <= 8.5e+53)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / z); t_2 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -6e+40) tmp = t_2; elseif (y <= -1600000.0) tmp = t_1; elseif (y <= -1.2e-14) tmp = t_2; elseif (y <= 2.8e-91) tmp = x * (t / (z - y)); elseif ((y <= 8e+39) || ~((y <= 8.5e+53))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e+40], t$95$2, If[LessEqual[y, -1600000.0], t$95$1, If[LessEqual[y, -1.2e-14], t$95$2, If[LessEqual[y, 2.8e-91], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 8e+39], N[Not[LessEqual[y, 8.5e+53]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z}\\
t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -6 \cdot 10^{+40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1600000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-91}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+39} \lor \neg \left(y \leq 8.5 \cdot 10^{+53}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -6.0000000000000004e40 or -1.6e6 < y < -1.2e-14 or 2.8e-91 < y < 7.99999999999999952e39 or 8.5000000000000002e53 < y Initial program 99.9%
Taylor expanded in z around 0 77.7%
mul-1-neg77.7%
div-sub77.7%
sub-neg77.7%
*-inverses77.7%
metadata-eval77.7%
Simplified77.7%
Taylor expanded in x around 0 71.4%
associate-*r/71.4%
mul-1-neg71.4%
distribute-rgt-neg-out71.4%
associate-*r/77.8%
*-commutative77.8%
distribute-rgt1-in77.7%
+-commutative77.7%
distribute-frac-neg77.7%
sub-neg77.7%
*-commutative77.7%
Simplified77.7%
if -6.0000000000000004e40 < y < -1.6e6 or 7.99999999999999952e39 < y < 8.5000000000000002e53Initial program 99.6%
Taylor expanded in z around inf 80.1%
associate-/l*87.0%
associate-/r/83.1%
Simplified83.1%
if -1.2e-14 < y < 2.8e-91Initial program 93.7%
Taylor expanded in x around inf 82.7%
*-commutative82.7%
associate-*r/82.2%
Simplified82.2%
Final simplification79.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t z))) (t_2 (* t (- 1.0 (/ x y)))))
(if (<= y -6.1e+40)
t_2
(if (<= y -1150000.0)
t_1
(if (<= y -8.6e-10)
t_2
(if (<= y -7e-295)
(* x (/ t (- z y)))
(if (<= y 1.2e-22)
(* t (/ x (- z y)))
(if (<= y 1e+54) t_1 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -6.1e+40) {
tmp = t_2;
} else if (y <= -1150000.0) {
tmp = t_1;
} else if (y <= -8.6e-10) {
tmp = t_2;
} else if (y <= -7e-295) {
tmp = x * (t / (z - y));
} else if (y <= 1.2e-22) {
tmp = t * (x / (z - y));
} else if (y <= 1e+54) {
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 = (x - y) * (t / z)
t_2 = t * (1.0d0 - (x / y))
if (y <= (-6.1d+40)) then
tmp = t_2
else if (y <= (-1150000.0d0)) then
tmp = t_1
else if (y <= (-8.6d-10)) then
tmp = t_2
else if (y <= (-7d-295)) then
tmp = x * (t / (z - y))
else if (y <= 1.2d-22) then
tmp = t * (x / (z - y))
else if (y <= 1d+54) 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 = (x - y) * (t / z);
double t_2 = t * (1.0 - (x / y));
double tmp;
if (y <= -6.1e+40) {
tmp = t_2;
} else if (y <= -1150000.0) {
tmp = t_1;
} else if (y <= -8.6e-10) {
tmp = t_2;
} else if (y <= -7e-295) {
tmp = x * (t / (z - y));
} else if (y <= 1.2e-22) {
tmp = t * (x / (z - y));
} else if (y <= 1e+54) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / z) t_2 = t * (1.0 - (x / y)) tmp = 0 if y <= -6.1e+40: tmp = t_2 elif y <= -1150000.0: tmp = t_1 elif y <= -8.6e-10: tmp = t_2 elif y <= -7e-295: tmp = x * (t / (z - y)) elif y <= 1.2e-22: tmp = t * (x / (z - y)) elif y <= 1e+54: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / z)) t_2 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -6.1e+40) tmp = t_2; elseif (y <= -1150000.0) tmp = t_1; elseif (y <= -8.6e-10) tmp = t_2; elseif (y <= -7e-295) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (y <= 1.2e-22) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 1e+54) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / z); t_2 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -6.1e+40) tmp = t_2; elseif (y <= -1150000.0) tmp = t_1; elseif (y <= -8.6e-10) tmp = t_2; elseif (y <= -7e-295) tmp = x * (t / (z - y)); elseif (y <= 1.2e-22) tmp = t * (x / (z - y)); elseif (y <= 1e+54) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.1e+40], t$95$2, If[LessEqual[y, -1150000.0], t$95$1, If[LessEqual[y, -8.6e-10], t$95$2, If[LessEqual[y, -7e-295], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e-22], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+54], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z}\\
t_2 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -6.1 \cdot 10^{+40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1150000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -8.6 \cdot 10^{-10}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-295}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-22}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -6.1e40 or -1.15e6 < y < -8.60000000000000029e-10 or 1.0000000000000001e54 < y Initial program 99.9%
Taylor expanded in z around 0 80.4%
mul-1-neg80.4%
div-sub80.4%
sub-neg80.4%
*-inverses80.4%
metadata-eval80.4%
Simplified80.4%
Taylor expanded in x around 0 72.8%
associate-*r/72.8%
mul-1-neg72.8%
distribute-rgt-neg-out72.8%
associate-*r/80.4%
*-commutative80.4%
distribute-rgt1-in80.4%
+-commutative80.4%
distribute-frac-neg80.4%
sub-neg80.4%
*-commutative80.4%
Simplified80.4%
if -6.1e40 < y < -1.15e6 or 1.20000000000000001e-22 < y < 1.0000000000000001e54Initial program 99.7%
Taylor expanded in z around inf 68.9%
associate-/l*73.6%
associate-/r/71.0%
Simplified71.0%
if -8.60000000000000029e-10 < y < -6.99999999999999977e-295Initial program 90.4%
Taylor expanded in x around inf 78.0%
*-commutative78.0%
associate-*r/78.3%
Simplified78.3%
if -6.99999999999999977e-295 < y < 1.20000000000000001e-22Initial program 98.3%
Taylor expanded in x around inf 83.8%
Final simplification79.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -5e+95)
t
(if (<= y -28000.0)
(* y (/ (- t) z))
(if (<= y -10.5)
t
(if (<= y -2.4e-82)
(* x (/ (- t) y))
(if (<= y 4.5e-53) (/ (* t x) z) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e+95) {
tmp = t;
} else if (y <= -28000.0) {
tmp = y * (-t / z);
} else if (y <= -10.5) {
tmp = t;
} else if (y <= -2.4e-82) {
tmp = x * (-t / y);
} else if (y <= 4.5e-53) {
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 <= (-5d+95)) then
tmp = t
else if (y <= (-28000.0d0)) then
tmp = y * (-t / z)
else if (y <= (-10.5d0)) then
tmp = t
else if (y <= (-2.4d-82)) then
tmp = x * (-t / y)
else if (y <= 4.5d-53) 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 <= -5e+95) {
tmp = t;
} else if (y <= -28000.0) {
tmp = y * (-t / z);
} else if (y <= -10.5) {
tmp = t;
} else if (y <= -2.4e-82) {
tmp = x * (-t / y);
} else if (y <= 4.5e-53) {
tmp = (t * x) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5e+95: tmp = t elif y <= -28000.0: tmp = y * (-t / z) elif y <= -10.5: tmp = t elif y <= -2.4e-82: tmp = x * (-t / y) elif y <= 4.5e-53: tmp = (t * x) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5e+95) tmp = t; elseif (y <= -28000.0) tmp = Float64(y * Float64(Float64(-t) / z)); elseif (y <= -10.5) tmp = t; elseif (y <= -2.4e-82) tmp = Float64(x * Float64(Float64(-t) / y)); elseif (y <= 4.5e-53) tmp = Float64(Float64(t * x) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5e+95) tmp = t; elseif (y <= -28000.0) tmp = y * (-t / z); elseif (y <= -10.5) tmp = t; elseif (y <= -2.4e-82) tmp = x * (-t / y); elseif (y <= 4.5e-53) tmp = (t * x) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5e+95], t, If[LessEqual[y, -28000.0], N[(y * N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -10.5], t, If[LessEqual[y, -2.4e-82], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-53], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -28000:\\
\;\;\;\;y \cdot \frac{-t}{z}\\
\mathbf{elif}\;y \leq -10.5:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-82}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.00000000000000025e95 or -28000 < y < -10.5 or 4.49999999999999985e-53 < y Initial program 99.9%
Taylor expanded in y around inf 60.0%
if -5.00000000000000025e95 < y < -28000Initial program 99.7%
Taylor expanded in z around inf 62.4%
associate-/l*62.7%
Simplified62.7%
Taylor expanded in x around 0 50.5%
mul-1-neg50.5%
distribute-neg-frac50.5%
*-commutative50.5%
distribute-lft-neg-out50.5%
associate-*r/47.1%
distribute-lft-neg-out47.1%
distribute-rgt-neg-in47.1%
distribute-neg-frac47.1%
Simplified47.1%
if -10.5 < y < -2.40000000000000008e-82Initial program 85.5%
Taylor expanded in x around inf 77.8%
*-commutative77.8%
associate-*r/73.2%
Simplified73.2%
Taylor expanded in z around 0 63.3%
mul-1-neg63.3%
distribute-neg-frac63.3%
Simplified63.3%
if -2.40000000000000008e-82 < y < 4.49999999999999985e-53Initial program 96.1%
Taylor expanded in y around 0 71.6%
Final simplification63.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -4.8e-24)
t_1
(if (<= y -1.12e-100)
(* x (/ (- t) y))
(if (or (<= y -1.4e-118) (not (<= y 9.5e-143))) t_1 (/ t (/ z x)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -4.8e-24) {
tmp = t_1;
} else if (y <= -1.12e-100) {
tmp = x * (-t / y);
} else if ((y <= -1.4e-118) || !(y <= 9.5e-143)) {
tmp = t_1;
} else {
tmp = t / (z / 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 - (x / y))
if (y <= (-4.8d-24)) then
tmp = t_1
else if (y <= (-1.12d-100)) then
tmp = x * (-t / y)
else if ((y <= (-1.4d-118)) .or. (.not. (y <= 9.5d-143))) then
tmp = t_1
else
tmp = t / (z / 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 - (x / y));
double tmp;
if (y <= -4.8e-24) {
tmp = t_1;
} else if (y <= -1.12e-100) {
tmp = x * (-t / y);
} else if ((y <= -1.4e-118) || !(y <= 9.5e-143)) {
tmp = t_1;
} else {
tmp = t / (z / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -4.8e-24: tmp = t_1 elif y <= -1.12e-100: tmp = x * (-t / y) elif (y <= -1.4e-118) or not (y <= 9.5e-143): tmp = t_1 else: tmp = t / (z / x) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -4.8e-24) tmp = t_1; elseif (y <= -1.12e-100) tmp = Float64(x * Float64(Float64(-t) / y)); elseif ((y <= -1.4e-118) || !(y <= 9.5e-143)) tmp = t_1; else tmp = Float64(t / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -4.8e-24) tmp = t_1; elseif (y <= -1.12e-100) tmp = x * (-t / y); elseif ((y <= -1.4e-118) || ~((y <= 9.5e-143))) tmp = t_1; else tmp = t / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e-24], t$95$1, If[LessEqual[y, -1.12e-100], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.4e-118], N[Not[LessEqual[y, 9.5e-143]], $MachinePrecision]], t$95$1, N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{-24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.12 \cdot 10^{-100}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-118} \lor \neg \left(y \leq 9.5 \cdot 10^{-143}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\end{array}
\end{array}
if y < -4.7999999999999996e-24 or -1.11999999999999996e-100 < y < -1.4e-118 or 9.4999999999999993e-143 < y Initial program 99.8%
Taylor expanded in z around 0 70.2%
mul-1-neg70.2%
div-sub70.2%
sub-neg70.2%
*-inverses70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in x around 0 64.9%
associate-*r/64.9%
mul-1-neg64.9%
distribute-rgt-neg-out64.9%
associate-*r/70.2%
*-commutative70.2%
distribute-rgt1-in70.2%
+-commutative70.2%
distribute-frac-neg70.2%
sub-neg70.2%
*-commutative70.2%
Simplified70.2%
if -4.7999999999999996e-24 < y < -1.11999999999999996e-100Initial program 75.6%
Taylor expanded in x around inf 83.2%
*-commutative83.2%
associate-*r/83.5%
Simplified83.5%
Taylor expanded in z around 0 75.3%
mul-1-neg75.3%
distribute-neg-frac75.3%
Simplified75.3%
if -1.4e-118 < y < 9.4999999999999993e-143Initial program 96.0%
Taylor expanded in y around 0 81.2%
associate-/l*81.5%
Simplified81.5%
Final simplification73.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.3e+94)
t
(if (<= y -2600000.0)
(* t (/ (- y) z))
(if (<= y -1.8e-82)
(* x (/ (- t) y))
(if (<= y 4.5e-53) (/ (* t x) z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e+94) {
tmp = t;
} else if (y <= -2600000.0) {
tmp = t * (-y / z);
} else if (y <= -1.8e-82) {
tmp = x * (-t / y);
} else if (y <= 4.5e-53) {
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.3d+94)) then
tmp = t
else if (y <= (-2600000.0d0)) then
tmp = t * (-y / z)
else if (y <= (-1.8d-82)) then
tmp = x * (-t / y)
else if (y <= 4.5d-53) 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.3e+94) {
tmp = t;
} else if (y <= -2600000.0) {
tmp = t * (-y / z);
} else if (y <= -1.8e-82) {
tmp = x * (-t / y);
} else if (y <= 4.5e-53) {
tmp = (t * x) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.3e+94: tmp = t elif y <= -2600000.0: tmp = t * (-y / z) elif y <= -1.8e-82: tmp = x * (-t / y) elif y <= 4.5e-53: tmp = (t * x) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.3e+94) tmp = t; elseif (y <= -2600000.0) tmp = Float64(t * Float64(Float64(-y) / z)); elseif (y <= -1.8e-82) tmp = Float64(x * Float64(Float64(-t) / y)); elseif (y <= 4.5e-53) tmp = Float64(Float64(t * x) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.3e+94) tmp = t; elseif (y <= -2600000.0) tmp = t * (-y / z); elseif (y <= -1.8e-82) tmp = x * (-t / y); elseif (y <= 4.5e-53) tmp = (t * x) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.3e+94], t, If[LessEqual[y, -2600000.0], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.8e-82], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-53], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+94}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2600000:\\
\;\;\;\;t \cdot \frac{-y}{z}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-82}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.3e94 or 4.49999999999999985e-53 < y Initial program 99.9%
Taylor expanded in y around inf 59.7%
if -1.3e94 < y < -2.6e6Initial program 99.7%
Taylor expanded in x around 0 71.4%
neg-mul-171.4%
distribute-neg-frac71.4%
Simplified71.4%
Taylor expanded in y around 0 50.6%
mul-1-neg50.6%
distribute-neg-frac50.6%
Simplified50.6%
if -2.6e6 < y < -1.79999999999999999e-82Initial program 86.2%
Taylor expanded in x around inf 74.1%
*-commutative74.1%
associate-*r/69.8%
Simplified69.8%
Taylor expanded in z around 0 60.4%
mul-1-neg60.4%
distribute-neg-frac60.4%
Simplified60.4%
if -1.79999999999999999e-82 < y < 4.49999999999999985e-53Initial program 96.1%
Taylor expanded in y around 0 71.6%
Final simplification63.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.5e+93)
t
(if (<= y -250000.0)
(/ t (/ (- z) y))
(if (<= y -2.5e-82)
(* x (/ (- t) y))
(if (<= y 4.5e-53) (/ (* t x) z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+93) {
tmp = t;
} else if (y <= -250000.0) {
tmp = t / (-z / y);
} else if (y <= -2.5e-82) {
tmp = x * (-t / y);
} else if (y <= 4.5e-53) {
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 <= (-7.5d+93)) then
tmp = t
else if (y <= (-250000.0d0)) then
tmp = t / (-z / y)
else if (y <= (-2.5d-82)) then
tmp = x * (-t / y)
else if (y <= 4.5d-53) 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 <= -7.5e+93) {
tmp = t;
} else if (y <= -250000.0) {
tmp = t / (-z / y);
} else if (y <= -2.5e-82) {
tmp = x * (-t / y);
} else if (y <= 4.5e-53) {
tmp = (t * x) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e+93: tmp = t elif y <= -250000.0: tmp = t / (-z / y) elif y <= -2.5e-82: tmp = x * (-t / y) elif y <= 4.5e-53: tmp = (t * x) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e+93) tmp = t; elseif (y <= -250000.0) tmp = Float64(t / Float64(Float64(-z) / y)); elseif (y <= -2.5e-82) tmp = Float64(x * Float64(Float64(-t) / y)); elseif (y <= 4.5e-53) tmp = Float64(Float64(t * x) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.5e+93) tmp = t; elseif (y <= -250000.0) tmp = t / (-z / y); elseif (y <= -2.5e-82) tmp = x * (-t / y); elseif (y <= 4.5e-53) tmp = (t * x) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e+93], t, If[LessEqual[y, -250000.0], N[(t / N[((-z) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.5e-82], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-53], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+93}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -250000:\\
\;\;\;\;\frac{t}{\frac{-z}{y}}\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-82}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.5000000000000002e93 or 4.49999999999999985e-53 < y Initial program 99.9%
Taylor expanded in y around inf 59.7%
if -7.5000000000000002e93 < y < -2.5e5Initial program 99.7%
Taylor expanded in z around inf 62.4%
associate-/l*62.7%
Simplified62.7%
Taylor expanded in x around 0 50.6%
neg-mul-150.6%
distribute-neg-frac50.6%
Simplified50.6%
if -2.5e5 < y < -2.4999999999999999e-82Initial program 86.2%
Taylor expanded in x around inf 74.1%
*-commutative74.1%
associate-*r/69.8%
Simplified69.8%
Taylor expanded in z around 0 60.4%
mul-1-neg60.4%
distribute-neg-frac60.4%
Simplified60.4%
if -2.4999999999999999e-82 < y < 4.49999999999999985e-53Initial program 96.1%
Taylor expanded in y around 0 71.6%
Final simplification63.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -8e+168) (not (<= y 1.3e+117))) (* t (- 1.0 (/ x y))) (* (- x y) (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8e+168) || !(y <= 1.3e+117)) {
tmp = t * (1.0 - (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 <= (-8d+168)) .or. (.not. (y <= 1.3d+117))) then
tmp = t * (1.0d0 - (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 <= -8e+168) || !(y <= 1.3e+117)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = (x - y) * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8e+168) or not (y <= 1.3e+117): tmp = t * (1.0 - (x / y)) else: tmp = (x - y) * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8e+168) || !(y <= 1.3e+117)) tmp = Float64(t * Float64(1.0 - 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 <= -8e+168) || ~((y <= 1.3e+117))) tmp = t * (1.0 - (x / y)); else tmp = (x - y) * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -8e+168], N[Not[LessEqual[y, 1.3e+117]], $MachinePrecision]], N[(t * N[(1.0 - 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 -8 \cdot 10^{+168} \lor \neg \left(y \leq 1.3 \cdot 10^{+117}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -7.9999999999999995e168 or 1.3e117 < y Initial program 99.9%
Taylor expanded in z around 0 90.5%
mul-1-neg90.5%
div-sub90.6%
sub-neg90.6%
*-inverses90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in x around 0 79.9%
associate-*r/79.9%
mul-1-neg79.9%
distribute-rgt-neg-out79.9%
associate-*r/90.6%
*-commutative90.6%
distribute-rgt1-in90.6%
+-commutative90.6%
distribute-frac-neg90.6%
sub-neg90.6%
*-commutative90.6%
Simplified90.6%
if -7.9999999999999995e168 < y < 1.3e117Initial program 96.4%
associate-/r/90.2%
Simplified90.2%
clear-num89.9%
associate-/r/89.9%
clear-num90.8%
Applied egg-rr90.8%
Final simplification90.8%
(FPCore (x y z t) :precision binary64 (if (<= x -2e+86) (* t (/ x (- z y))) (if (<= x 3.7e+58) (* t (/ (- y) (- z y))) (/ t (/ (- z y) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2e+86) {
tmp = t * (x / (z - y));
} else if (x <= 3.7e+58) {
tmp = t * (-y / (z - y));
} 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) :: tmp
if (x <= (-2d+86)) then
tmp = t * (x / (z - y))
else if (x <= 3.7d+58) then
tmp = t * (-y / (z - y))
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 tmp;
if (x <= -2e+86) {
tmp = t * (x / (z - y));
} else if (x <= 3.7e+58) {
tmp = t * (-y / (z - y));
} else {
tmp = t / ((z - y) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2e+86: tmp = t * (x / (z - y)) elif x <= 3.7e+58: tmp = t * (-y / (z - y)) else: tmp = t / ((z - y) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2e+86) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (x <= 3.7e+58) tmp = Float64(t * Float64(Float64(-y) / Float64(z - y))); else tmp = Float64(t / Float64(Float64(z - y) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2e+86) tmp = t * (x / (z - y)); elseif (x <= 3.7e+58) tmp = t * (-y / (z - y)); else tmp = t / ((z - y) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2e+86], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e+58], N[(t * N[((-y) / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+86}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+58}:\\
\;\;\;\;t \cdot \frac{-y}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\end{array}
\end{array}
if x < -2e86Initial program 95.6%
Taylor expanded in x around inf 82.1%
if -2e86 < x < 3.7000000000000002e58Initial program 98.0%
Taylor expanded in x around 0 78.6%
neg-mul-178.6%
distribute-neg-frac78.6%
Simplified78.6%
if 3.7000000000000002e58 < x Initial program 96.4%
*-commutative96.4%
clear-num96.3%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in x around inf 76.2%
Final simplification78.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.8e+22) (not (<= y 2.8e-91))) (* t (- 1.0 (/ x y))) (* x (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.8e+22) || !(y <= 2.8e-91)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = x * (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 <= (-3.8d+22)) .or. (.not. (y <= 2.8d-91))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = x * (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 <= -3.8e+22) || !(y <= 2.8e-91)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = x * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.8e+22) or not (y <= 2.8e-91): tmp = t * (1.0 - (x / y)) else: tmp = x * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.8e+22) || !(y <= 2.8e-91)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(x * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.8e+22) || ~((y <= 2.8e-91))) tmp = t * (1.0 - (x / y)); else tmp = x * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.8e+22], N[Not[LessEqual[y, 2.8e-91]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+22} \lor \neg \left(y \leq 2.8 \cdot 10^{-91}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -3.8000000000000004e22 or 2.8e-91 < y Initial program 99.9%
Taylor expanded in z around 0 74.6%
mul-1-neg74.6%
div-sub74.6%
sub-neg74.6%
*-inverses74.6%
metadata-eval74.6%
Simplified74.6%
Taylor expanded in x around 0 68.4%
associate-*r/68.4%
mul-1-neg68.4%
distribute-rgt-neg-out68.4%
associate-*r/74.6%
*-commutative74.6%
distribute-rgt1-in74.6%
+-commutative74.6%
distribute-frac-neg74.6%
sub-neg74.6%
*-commutative74.6%
Simplified74.6%
if -3.8000000000000004e22 < y < 2.8e-91Initial program 94.3%
Taylor expanded in x around inf 80.2%
*-commutative80.2%
associate-*r/78.6%
Simplified78.6%
Final simplification76.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -15500000000.0) (not (<= z 1.95e+34))) (* t (/ (- x y) z)) (* t (- 1.0 (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -15500000000.0) || !(z <= 1.95e+34)) {
tmp = t * ((x - y) / z);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-15500000000.0d0)) .or. (.not. (z <= 1.95d+34))) then
tmp = t * ((x - y) / z)
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -15500000000.0) || !(z <= 1.95e+34)) {
tmp = t * ((x - y) / z);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -15500000000.0) or not (z <= 1.95e+34): tmp = t * ((x - y) / z) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -15500000000.0) || !(z <= 1.95e+34)) tmp = Float64(t * Float64(Float64(x - y) / z)); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -15500000000.0) || ~((z <= 1.95e+34))) tmp = t * ((x - y) / z); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -15500000000.0], N[Not[LessEqual[z, 1.95e+34]], $MachinePrecision]], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -15500000000 \lor \neg \left(z \leq 1.95 \cdot 10^{+34}\right):\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if z < -1.55e10 or 1.9500000000000001e34 < z Initial program 97.1%
Taylor expanded in z around inf 78.4%
if -1.55e10 < z < 1.9500000000000001e34Initial program 97.4%
Taylor expanded in z around 0 73.8%
mul-1-neg73.8%
div-sub73.8%
sub-neg73.8%
*-inverses73.8%
metadata-eval73.8%
Simplified73.8%
Taylor expanded in x around 0 70.3%
associate-*r/70.3%
mul-1-neg70.3%
distribute-rgt-neg-out70.3%
associate-*r/73.8%
*-commutative73.8%
distribute-rgt1-in73.8%
+-commutative73.8%
distribute-frac-neg73.8%
sub-neg73.8%
*-commutative73.8%
Simplified73.8%
Final simplification75.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.95e+86) (not (<= x 6e+58))) (* t (/ x (- z y))) (/ t (- 1.0 (/ z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.95e+86) || !(x <= 6e+58)) {
tmp = t * (x / (z - y));
} else {
tmp = t / (1.0 - (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 ((x <= (-1.95d+86)) .or. (.not. (x <= 6d+58))) then
tmp = t * (x / (z - y))
else
tmp = t / (1.0d0 - (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.95e+86) || !(x <= 6e+58)) {
tmp = t * (x / (z - y));
} else {
tmp = t / (1.0 - (z / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.95e+86) or not (x <= 6e+58): tmp = t * (x / (z - y)) else: tmp = t / (1.0 - (z / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.95e+86) || !(x <= 6e+58)) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = Float64(t / Float64(1.0 - Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.95e+86) || ~((x <= 6e+58))) tmp = t * (x / (z - y)); else tmp = t / (1.0 - (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.95e+86], N[Not[LessEqual[x, 6e+58]], $MachinePrecision]], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{+86} \lor \neg \left(x \leq 6 \cdot 10^{+58}\right):\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\end{array}
\end{array}
if x < -1.9500000000000001e86 or 6.0000000000000005e58 < x Initial program 96.0%
Taylor expanded in x around inf 78.7%
if -1.9500000000000001e86 < x < 6.0000000000000005e58Initial program 98.0%
*-commutative98.0%
clear-num98.0%
un-div-inv98.1%
Applied egg-rr98.1%
Taylor expanded in x around 0 78.5%
mul-1-neg78.5%
neg-sub078.5%
div-sub78.5%
*-inverses78.5%
associate-+l-78.5%
neg-sub078.5%
neg-mul-178.5%
+-commutative78.5%
neg-mul-178.5%
unsub-neg78.5%
Simplified78.5%
Final simplification78.6%
(FPCore (x y z t) :precision binary64 (if (<= x -2.05e+86) (* t (/ x (- z y))) (if (<= x 3.7e+58) (/ t (- 1.0 (/ z y))) (/ t (/ (- z y) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.05e+86) {
tmp = t * (x / (z - y));
} else if (x <= 3.7e+58) {
tmp = t / (1.0 - (z / y));
} 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) :: tmp
if (x <= (-2.05d+86)) then
tmp = t * (x / (z - y))
else if (x <= 3.7d+58) then
tmp = t / (1.0d0 - (z / y))
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 tmp;
if (x <= -2.05e+86) {
tmp = t * (x / (z - y));
} else if (x <= 3.7e+58) {
tmp = t / (1.0 - (z / y));
} else {
tmp = t / ((z - y) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.05e+86: tmp = t * (x / (z - y)) elif x <= 3.7e+58: tmp = t / (1.0 - (z / y)) else: tmp = t / ((z - y) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.05e+86) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (x <= 3.7e+58) tmp = Float64(t / Float64(1.0 - Float64(z / y))); else tmp = Float64(t / Float64(Float64(z - y) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.05e+86) tmp = t * (x / (z - y)); elseif (x <= 3.7e+58) tmp = t / (1.0 - (z / y)); else tmp = t / ((z - y) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.05e+86], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e+58], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.05 \cdot 10^{+86}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+58}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\end{array}
\end{array}
if x < -2.05e86Initial program 95.6%
Taylor expanded in x around inf 82.1%
if -2.05e86 < x < 3.7000000000000002e58Initial program 98.0%
*-commutative98.0%
clear-num98.0%
un-div-inv98.1%
Applied egg-rr98.1%
Taylor expanded in x around 0 78.5%
mul-1-neg78.5%
neg-sub078.5%
div-sub78.5%
*-inverses78.5%
associate-+l-78.5%
neg-sub078.5%
neg-mul-178.5%
+-commutative78.5%
neg-mul-178.5%
unsub-neg78.5%
Simplified78.5%
if 3.7000000000000002e58 < x Initial program 96.4%
*-commutative96.4%
clear-num96.3%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in x around inf 76.2%
Final simplification78.6%
(FPCore (x y z t) :precision binary64 (if (<= y -9e+22) t (if (<= y 1.3e-79) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9e+22) {
tmp = t;
} else if (y <= 1.3e-79) {
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 <= (-9d+22)) then
tmp = t
else if (y <= 1.3d-79) 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 <= -9e+22) {
tmp = t;
} else if (y <= 1.3e-79) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9e+22: tmp = t elif y <= 1.3e-79: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9e+22) tmp = t; elseif (y <= 1.3e-79) 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 <= -9e+22) tmp = t; elseif (y <= 1.3e-79) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9e+22], t, If[LessEqual[y, 1.3e-79], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+22}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-79}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -8.9999999999999996e22 or 1.29999999999999997e-79 < y Initial program 99.9%
Taylor expanded in y around inf 54.6%
if -8.9999999999999996e22 < y < 1.29999999999999997e-79Initial program 94.5%
Taylor expanded in y around 0 65.9%
associate-/l*65.8%
associate-/r/63.7%
Simplified63.7%
Final simplification59.0%
(FPCore (x y z t) :precision binary64 (if (<= y -5.2e+22) t (if (<= y 4.5e-53) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e+22) {
tmp = t;
} else if (y <= 4.5e-53) {
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 <= (-5.2d+22)) then
tmp = t
else if (y <= 4.5d-53) 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 <= -5.2e+22) {
tmp = t;
} else if (y <= 4.5e-53) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.2e+22: tmp = t elif y <= 4.5e-53: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.2e+22) tmp = t; elseif (y <= 4.5e-53) 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 <= -5.2e+22) tmp = t; elseif (y <= 4.5e-53) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.2e+22], t, If[LessEqual[y, 4.5e-53], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+22}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-53}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.2e22 or 4.49999999999999985e-53 < y Initial program 99.9%
Taylor expanded in y around inf 56.3%
if -5.2e22 < y < 4.49999999999999985e-53Initial program 94.7%
Taylor expanded in y around 0 64.4%
Final simplification60.4%
(FPCore (x y z t) :precision binary64 (if (<= y -1.2e+28) t (if (<= y 4e-53) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.2e+28) {
tmp = t;
} else if (y <= 4e-53) {
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.2d+28)) then
tmp = t
else if (y <= 4d-53) 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.2e+28) {
tmp = t;
} else if (y <= 4e-53) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.2e+28: tmp = t elif y <= 4e-53: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.2e+28) tmp = t; elseif (y <= 4e-53) 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.2e+28) tmp = t; elseif (y <= 4e-53) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.2e+28], t, If[LessEqual[y, 4e-53], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+28}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-53}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.19999999999999991e28 or 4.00000000000000012e-53 < y Initial program 99.9%
Taylor expanded in y around inf 56.3%
if -1.19999999999999991e28 < y < 4.00000000000000012e-53Initial program 94.7%
Taylor expanded in y around 0 64.5%
associate-/l*64.4%
Simplified64.4%
Final simplification60.4%
(FPCore (x y z t) :precision binary64 (if (<= y -3.1e+27) t (if (<= y 4.5e-53) (/ (* t x) z) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.1e+27) {
tmp = t;
} else if (y <= 4.5e-53) {
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 <= (-3.1d+27)) then
tmp = t
else if (y <= 4.5d-53) 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 <= -3.1e+27) {
tmp = t;
} else if (y <= 4.5e-53) {
tmp = (t * x) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.1e+27: tmp = t elif y <= 4.5e-53: tmp = (t * x) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.1e+27) tmp = t; elseif (y <= 4.5e-53) tmp = Float64(Float64(t * x) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.1e+27) tmp = t; elseif (y <= 4.5e-53) tmp = (t * x) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.1e+27], t, If[LessEqual[y, 4.5e-53], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+27}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.09999999999999996e27 or 4.49999999999999985e-53 < y Initial program 99.9%
Taylor expanded in y around inf 56.3%
if -3.09999999999999996e27 < y < 4.49999999999999985e-53Initial program 94.7%
Taylor expanded in y around 0 64.5%
Final simplification60.4%
(FPCore (x y z t) :precision binary64 (* t (/ (- x y) (- z y))))
double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - 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 * ((x - y) / (z - y))
end function
public static double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - y));
}
def code(x, y, z, t): return t * ((x - y) / (z - y))
function code(x, y, z, t) return Float64(t * Float64(Float64(x - y) / Float64(z - y))) end
function tmp = code(x, y, z, t) tmp = t * ((x - y) / (z - y)); end
code[x_, y_, z_, t_] := N[(t * N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \frac{x - y}{z - y}
\end{array}
Initial program 97.3%
Final simplification97.3%
(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.3%
Taylor expanded in y around inf 34.1%
Final simplification34.1%
(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 2024019
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))