
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-304) (not (<= t_1 0.0)))
(+ x (* (- t x) (* (- y z) (/ 1.0 (- a z)))))
(+ t (/ (- x t) (/ z (- y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-304) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) * (1.0 / (a - z))));
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-304)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) * ((y - z) * (1.0d0 / (a - z))))
else
tmp = t + ((x - t) / (z / (y - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-304) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) * (1.0 / (a - z))));
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-304) or not (t_1 <= 0.0): tmp = x + ((t - x) * ((y - z) * (1.0 / (a - z)))) else: tmp = t + ((x - t) / (z / (y - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-304) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) * Float64(1.0 / Float64(a - z))))); else tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-304) || ~((t_1 <= 0.0))) tmp = x + ((t - x) * ((y - z) * (1.0 / (a - z)))); else tmp = t + ((x - t) / (z / (y - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-304], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] * N[(1.0 / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-304} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \left(\left(y - z\right) \cdot \frac{1}{a - z}\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999994e-304 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.0%
add-cube-cbrt88.0%
pow388.1%
Applied egg-rr88.1%
rem-cube-cbrt89.0%
*-commutative89.0%
div-inv88.9%
associate-*l*93.7%
Applied egg-rr93.7%
if -1.99999999999999994e-304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.7%
Taylor expanded in z around inf 79.5%
associate--l+79.5%
distribute-lft-out--79.5%
div-sub79.5%
mul-1-neg79.5%
unsub-neg79.5%
distribute-rgt-out--79.5%
associate-/l*93.9%
Simplified93.9%
Final simplification93.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-259) (not (<= t_1 1e-240)))
t_1
(+ t (/ (- x t) (/ z (- y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -1e-259) || !(t_1 <= 1e-240)) {
tmp = t_1;
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-1d-259)) .or. (.not. (t_1 <= 1d-240))) then
tmp = t_1
else
tmp = t + ((x - t) / (z / (y - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -1e-259) || !(t_1 <= 1e-240)) {
tmp = t_1;
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -1e-259) or not (t_1 <= 1e-240): tmp = t_1 else: tmp = t + ((x - t) / (z / (y - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -1e-259) || !(t_1 <= 1e-240)) tmp = t_1; else tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -1e-259) || ~((t_1 <= 1e-240))) tmp = t_1; else tmp = t + ((x - t) / (z / (y - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-259], N[Not[LessEqual[t$95$1, 1e-240]], $MachinePrecision]], t$95$1, N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-259} \lor \neg \left(t_1 \leq 10^{-240}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.0000000000000001e-259 or 9.9999999999999997e-241 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.4%
if -1.0000000000000001e-259 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999997e-241Initial program 8.7%
Taylor expanded in z around inf 77.6%
associate--l+77.6%
distribute-lft-out--77.6%
div-sub77.6%
mul-1-neg77.6%
unsub-neg77.6%
distribute-rgt-out--77.6%
associate-/l*89.8%
Simplified89.8%
Final simplification90.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (- t (/ (- t x) (/ z (- y a))))))
(if (<= z -7.5e+135)
t_2
(if (<= z -1.3e+21)
t_1
(if (<= z -9.8e-39)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= z 2.05e+21) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double t_2 = t - ((t - x) / (z / (y - a)));
double tmp;
if (z <= -7.5e+135) {
tmp = t_2;
} else if (z <= -1.3e+21) {
tmp = t_1;
} else if (z <= -9.8e-39) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= 2.05e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((t - x) * (y / a))
t_2 = t - ((t - x) / (z / (y - a)))
if (z <= (-7.5d+135)) then
tmp = t_2
else if (z <= (-1.3d+21)) then
tmp = t_1
else if (z <= (-9.8d-39)) then
tmp = t + (((t - x) * (a - y)) / z)
else if (z <= 2.05d+21) 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 a) {
double t_1 = x + ((t - x) * (y / a));
double t_2 = t - ((t - x) / (z / (y - a)));
double tmp;
if (z <= -7.5e+135) {
tmp = t_2;
} else if (z <= -1.3e+21) {
tmp = t_1;
} else if (z <= -9.8e-39) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= 2.05e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) t_2 = t - ((t - x) / (z / (y - a))) tmp = 0 if z <= -7.5e+135: tmp = t_2 elif z <= -1.3e+21: tmp = t_1 elif z <= -9.8e-39: tmp = t + (((t - x) * (a - y)) / z) elif z <= 2.05e+21: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a))) t_2 = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a)))) tmp = 0.0 if (z <= -7.5e+135) tmp = t_2; elseif (z <= -1.3e+21) tmp = t_1; elseif (z <= -9.8e-39) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (z <= 2.05e+21) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); t_2 = t - ((t - x) / (z / (y - a))); tmp = 0.0; if (z <= -7.5e+135) tmp = t_2; elseif (z <= -1.3e+21) tmp = t_1; elseif (z <= -9.8e-39) tmp = t + (((t - x) * (a - y)) / z); elseif (z <= 2.05e+21) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+135], t$95$2, If[LessEqual[z, -1.3e+21], t$95$1, If[LessEqual[z, -9.8e-39], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+21], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
t_2 := t - \frac{t - x}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+135}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.8 \cdot 10^{-39}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -7.49999999999999947e135 or 2.05e21 < z Initial program 59.6%
Taylor expanded in z around inf 66.6%
associate--l+66.6%
distribute-lft-out--66.6%
div-sub66.6%
mul-1-neg66.6%
unsub-neg66.6%
distribute-rgt-out--66.7%
associate-/l*83.9%
Simplified83.9%
if -7.49999999999999947e135 < z < -1.3e21 or -9.79999999999999947e-39 < z < 2.05e21Initial program 92.9%
Taylor expanded in z around 0 65.7%
associate-/l*75.2%
associate-/r/76.7%
Simplified76.7%
if -1.3e21 < z < -9.79999999999999947e-39Initial program 67.1%
clear-num67.1%
associate-/r/66.9%
Applied egg-rr66.9%
Taylor expanded in z around inf 77.7%
associate--l+77.7%
associate-*r/77.7%
associate-*r/77.7%
div-sub77.7%
distribute-lft-out--77.7%
associate-*r/77.7%
mul-1-neg77.7%
unsub-neg77.7%
distribute-rgt-out--77.7%
Simplified77.7%
Final simplification79.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (- x (/ x (/ a y)))))
(if (<= x -3e+188)
t_2
(if (<= x 2.85e+16)
t_1
(if (<= x 3.8e+96)
(* y (/ (- t x) (- a z)))
(if (<= x 9.5e+135) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x - (x / (a / y));
double tmp;
if (x <= -3e+188) {
tmp = t_2;
} else if (x <= 2.85e+16) {
tmp = t_1;
} else if (x <= 3.8e+96) {
tmp = y * ((t - x) / (a - z));
} else if (x <= 9.5e+135) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x - (x / (a / y))
if (x <= (-3d+188)) then
tmp = t_2
else if (x <= 2.85d+16) then
tmp = t_1
else if (x <= 3.8d+96) then
tmp = y * ((t - x) / (a - z))
else if (x <= 9.5d+135) 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 a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x - (x / (a / y));
double tmp;
if (x <= -3e+188) {
tmp = t_2;
} else if (x <= 2.85e+16) {
tmp = t_1;
} else if (x <= 3.8e+96) {
tmp = y * ((t - x) / (a - z));
} else if (x <= 9.5e+135) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x - (x / (a / y)) tmp = 0 if x <= -3e+188: tmp = t_2 elif x <= 2.85e+16: tmp = t_1 elif x <= 3.8e+96: tmp = y * ((t - x) / (a - z)) elif x <= 9.5e+135: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x - Float64(x / Float64(a / y))) tmp = 0.0 if (x <= -3e+188) tmp = t_2; elseif (x <= 2.85e+16) tmp = t_1; elseif (x <= 3.8e+96) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (x <= 9.5e+135) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x - (x / (a / y)); tmp = 0.0; if (x <= -3e+188) tmp = t_2; elseif (x <= 2.85e+16) tmp = t_1; elseif (x <= 3.8e+96) tmp = y * ((t - x) / (a - z)); elseif (x <= 9.5e+135) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3e+188], t$95$2, If[LessEqual[x, 2.85e+16], t$95$1, If[LessEqual[x, 3.8e+96], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+135], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x - \frac{x}{\frac{a}{y}}\\
\mathbf{if}\;x \leq -3 \cdot 10^{+188}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.85 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+96}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+135}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -3.0000000000000001e188 or 9.50000000000000036e135 < x Initial program 69.7%
Taylor expanded in z around 0 48.6%
associate-/l*57.8%
associate-/r/60.0%
Simplified60.0%
Taylor expanded in t around 0 50.3%
mul-1-neg50.3%
associate-/l*61.7%
Simplified61.7%
if -3.0000000000000001e188 < x < 2.85e16 or 3.8000000000000002e96 < x < 9.50000000000000036e135Initial program 80.6%
Taylor expanded in x around 0 54.4%
div-inv54.4%
associate-*l*77.2%
un-div-inv77.3%
Applied egg-rr77.3%
if 2.85e16 < x < 3.8000000000000002e96Initial program 78.7%
clear-num78.5%
associate-/r/78.5%
Applied egg-rr78.5%
Taylor expanded in y around inf 65.1%
div-sub65.1%
Simplified65.1%
Final simplification72.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (- x (/ x (/ a y)))))
(if (<= x -2.6e+188)
t_2
(if (<= x 5.4e-39)
t_1
(if (<= x 2.5e+96)
(* (- t x) (/ y (- a z)))
(if (<= x 9.5e+135) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x - (x / (a / y));
double tmp;
if (x <= -2.6e+188) {
tmp = t_2;
} else if (x <= 5.4e-39) {
tmp = t_1;
} else if (x <= 2.5e+96) {
tmp = (t - x) * (y / (a - z));
} else if (x <= 9.5e+135) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x - (x / (a / y))
if (x <= (-2.6d+188)) then
tmp = t_2
else if (x <= 5.4d-39) then
tmp = t_1
else if (x <= 2.5d+96) then
tmp = (t - x) * (y / (a - z))
else if (x <= 9.5d+135) 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 a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x - (x / (a / y));
double tmp;
if (x <= -2.6e+188) {
tmp = t_2;
} else if (x <= 5.4e-39) {
tmp = t_1;
} else if (x <= 2.5e+96) {
tmp = (t - x) * (y / (a - z));
} else if (x <= 9.5e+135) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x - (x / (a / y)) tmp = 0 if x <= -2.6e+188: tmp = t_2 elif x <= 5.4e-39: tmp = t_1 elif x <= 2.5e+96: tmp = (t - x) * (y / (a - z)) elif x <= 9.5e+135: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x - Float64(x / Float64(a / y))) tmp = 0.0 if (x <= -2.6e+188) tmp = t_2; elseif (x <= 5.4e-39) tmp = t_1; elseif (x <= 2.5e+96) tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z))); elseif (x <= 9.5e+135) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x - (x / (a / y)); tmp = 0.0; if (x <= -2.6e+188) tmp = t_2; elseif (x <= 5.4e-39) tmp = t_1; elseif (x <= 2.5e+96) tmp = (t - x) * (y / (a - z)); elseif (x <= 9.5e+135) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.6e+188], t$95$2, If[LessEqual[x, 5.4e-39], t$95$1, If[LessEqual[x, 2.5e+96], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+135], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x - \frac{x}{\frac{a}{y}}\\
\mathbf{if}\;x \leq -2.6 \cdot 10^{+188}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+96}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+135}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -2.59999999999999987e188 or 9.50000000000000036e135 < x Initial program 69.7%
Taylor expanded in z around 0 48.6%
associate-/l*57.8%
associate-/r/60.0%
Simplified60.0%
Taylor expanded in t around 0 50.3%
mul-1-neg50.3%
associate-/l*61.7%
Simplified61.7%
if -2.59999999999999987e188 < x < 5.4000000000000001e-39 or 2.5000000000000002e96 < x < 9.50000000000000036e135Initial program 79.5%
Taylor expanded in x around 0 55.1%
div-inv55.1%
associate-*l*77.6%
un-div-inv77.7%
Applied egg-rr77.7%
if 5.4000000000000001e-39 < x < 2.5000000000000002e96Initial program 85.2%
Taylor expanded in y around inf 66.7%
div-sub66.7%
associate-*r/54.7%
associate-/l*66.8%
associate-/r/66.8%
Simplified66.8%
Final simplification72.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= z -2.2e+121)
t_2
(if (<= z -4.5e+20)
t_1
(if (<= z -5e-39)
(* (- t x) (/ y (- a z)))
(if (<= z 162000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.2e+121) {
tmp = t_2;
} else if (z <= -4.5e+20) {
tmp = t_1;
} else if (z <= -5e-39) {
tmp = (t - x) * (y / (a - z));
} else if (z <= 162000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((t - x) * (y / a))
t_2 = t * ((y - z) / (a - z))
if (z <= (-2.2d+121)) then
tmp = t_2
else if (z <= (-4.5d+20)) then
tmp = t_1
else if (z <= (-5d-39)) then
tmp = (t - x) * (y / (a - z))
else if (z <= 162000000000.0d0) 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 a) {
double t_1 = x + ((t - x) * (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.2e+121) {
tmp = t_2;
} else if (z <= -4.5e+20) {
tmp = t_1;
} else if (z <= -5e-39) {
tmp = (t - x) * (y / (a - z));
} else if (z <= 162000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) t_2 = t * ((y - z) / (a - z)) tmp = 0 if z <= -2.2e+121: tmp = t_2 elif z <= -4.5e+20: tmp = t_1 elif z <= -5e-39: tmp = (t - x) * (y / (a - z)) elif z <= 162000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a))) t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -2.2e+121) tmp = t_2; elseif (z <= -4.5e+20) tmp = t_1; elseif (z <= -5e-39) tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z))); elseif (z <= 162000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -2.2e+121) tmp = t_2; elseif (z <= -4.5e+20) tmp = t_1; elseif (z <= -5e-39) tmp = (t - x) * (y / (a - z)); elseif (z <= 162000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+121], t$95$2, If[LessEqual[z, -4.5e+20], t$95$1, If[LessEqual[z, -5e-39], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 162000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+121}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{+20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-39}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 162000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.20000000000000001e121 or 1.62e11 < z Initial program 61.8%
Taylor expanded in x around 0 41.7%
div-inv41.7%
associate-*l*74.6%
un-div-inv74.7%
Applied egg-rr74.7%
if -2.20000000000000001e121 < z < -4.5e20 or -4.9999999999999998e-39 < z < 1.62e11Initial program 92.6%
Taylor expanded in z around 0 66.3%
associate-/l*75.6%
associate-/r/77.1%
Simplified77.1%
if -4.5e20 < z < -4.9999999999999998e-39Initial program 67.1%
Taylor expanded in y around inf 70.3%
div-sub70.3%
associate-*r/69.9%
associate-/l*75.5%
associate-/r/77.2%
Simplified77.2%
Final simplification76.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))))
(if (<= a -1.3e+163)
t_1
(if (<= a -3.4e-62)
(* t (/ (- y z) (- a z)))
(if (<= a 1.85e-146)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= a 1.3e-12) (/ t (/ (- a z) (- y z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double tmp;
if (a <= -1.3e+163) {
tmp = t_1;
} else if (a <= -3.4e-62) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 1.85e-146) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (a <= 1.3e-12) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((t - x) * (y / a))
if (a <= (-1.3d+163)) then
tmp = t_1
else if (a <= (-3.4d-62)) then
tmp = t * ((y - z) / (a - z))
else if (a <= 1.85d-146) then
tmp = t + (((t - x) * (a - y)) / z)
else if (a <= 1.3d-12) then
tmp = t / ((a - z) / (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 a) {
double t_1 = x + ((t - x) * (y / a));
double tmp;
if (a <= -1.3e+163) {
tmp = t_1;
} else if (a <= -3.4e-62) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 1.85e-146) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (a <= 1.3e-12) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) tmp = 0 if a <= -1.3e+163: tmp = t_1 elif a <= -3.4e-62: tmp = t * ((y - z) / (a - z)) elif a <= 1.85e-146: tmp = t + (((t - x) * (a - y)) / z) elif a <= 1.3e-12: tmp = t / ((a - z) / (y - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a))) tmp = 0.0 if (a <= -1.3e+163) tmp = t_1; elseif (a <= -3.4e-62) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (a <= 1.85e-146) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (a <= 1.3e-12) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); tmp = 0.0; if (a <= -1.3e+163) tmp = t_1; elseif (a <= -3.4e-62) tmp = t * ((y - z) / (a - z)); elseif (a <= 1.85e-146) tmp = t + (((t - x) * (a - y)) / z); elseif (a <= 1.3e-12) tmp = t / ((a - z) / (y - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.3e+163], t$95$1, If[LessEqual[a, -3.4e-62], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.85e-146], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e-12], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -1.3 \cdot 10^{+163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{-62}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-146}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-12}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.3000000000000001e163 or 1.29999999999999991e-12 < a Initial program 89.2%
Taylor expanded in z around 0 56.5%
associate-/l*73.1%
associate-/r/74.1%
Simplified74.1%
if -1.3000000000000001e163 < a < -3.39999999999999988e-62Initial program 86.6%
Taylor expanded in x around 0 47.7%
div-inv47.7%
associate-*l*75.5%
un-div-inv75.6%
Applied egg-rr75.6%
if -3.39999999999999988e-62 < a < 1.84999999999999993e-146Initial program 64.3%
clear-num64.2%
associate-/r/64.4%
Applied egg-rr64.4%
Taylor expanded in z around inf 82.4%
associate--l+82.4%
associate-*r/82.4%
associate-*r/82.4%
div-sub83.6%
distribute-lft-out--83.6%
associate-*r/83.6%
mul-1-neg83.6%
unsub-neg83.6%
distribute-rgt-out--83.6%
Simplified83.6%
if 1.84999999999999993e-146 < a < 1.29999999999999991e-12Initial program 67.4%
Taylor expanded in x around 0 50.8%
associate-/l*73.2%
Simplified73.2%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.05e+113) t (if (<= z -3.1e+19) x (if (<= z 1.3e+31) (* t (/ y (- a z))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+113) {
tmp = t;
} else if (z <= -3.1e+19) {
tmp = x;
} else if (z <= 1.3e+31) {
tmp = t * (y / (a - z));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.05d+113)) then
tmp = t
else if (z <= (-3.1d+19)) then
tmp = x
else if (z <= 1.3d+31) then
tmp = t * (y / (a - z))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+113) {
tmp = t;
} else if (z <= -3.1e+19) {
tmp = x;
} else if (z <= 1.3e+31) {
tmp = t * (y / (a - z));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.05e+113: tmp = t elif z <= -3.1e+19: tmp = x elif z <= 1.3e+31: tmp = t * (y / (a - z)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.05e+113) tmp = t; elseif (z <= -3.1e+19) tmp = x; elseif (z <= 1.3e+31) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.05e+113) tmp = t; elseif (z <= -3.1e+19) tmp = x; elseif (z <= 1.3e+31) tmp = t * (y / (a - z)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e+113], t, If[LessEqual[z, -3.1e+19], x, If[LessEqual[z, 1.3e+31], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+113}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+19}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+31}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.0499999999999999e113 or 1.3e31 < z Initial program 61.1%
Taylor expanded in z around inf 58.6%
if -1.0499999999999999e113 < z < -3.1e19Initial program 93.9%
Taylor expanded in a around inf 41.3%
if -3.1e19 < z < 1.3e31Initial program 89.8%
Taylor expanded in x around 0 50.5%
associate-/l*56.5%
Simplified56.5%
Taylor expanded in y around inf 42.5%
associate-*r/47.2%
Simplified47.2%
Final simplification51.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.45e+188) (not (<= x 1.1e+136))) (- x (/ x (/ a y))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.45e+188) || !(x <= 1.1e+136)) {
tmp = x - (x / (a / y));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-2.45d+188)) .or. (.not. (x <= 1.1d+136))) then
tmp = x - (x / (a / y))
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.45e+188) || !(x <= 1.1e+136)) {
tmp = x - (x / (a / y));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.45e+188) or not (x <= 1.1e+136): tmp = x - (x / (a / y)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.45e+188) || !(x <= 1.1e+136)) tmp = Float64(x - Float64(x / Float64(a / y))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.45e+188) || ~((x <= 1.1e+136))) tmp = x - (x / (a / y)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.45e+188], N[Not[LessEqual[x, 1.1e+136]], $MachinePrecision]], N[(x - N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.45 \cdot 10^{+188} \lor \neg \left(x \leq 1.1 \cdot 10^{+136}\right):\\
\;\;\;\;x - \frac{x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -2.45e188 or 1.1e136 < x Initial program 69.7%
Taylor expanded in z around 0 48.6%
associate-/l*57.8%
associate-/r/60.0%
Simplified60.0%
Taylor expanded in t around 0 50.3%
mul-1-neg50.3%
associate-/l*61.7%
Simplified61.7%
if -2.45e188 < x < 1.1e136Initial program 80.4%
Taylor expanded in x around 0 52.1%
div-inv52.1%
associate-*l*73.8%
un-div-inv73.9%
Applied egg-rr73.9%
Final simplification71.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.8e+135) (- t (/ t (/ z y))) (if (<= z 1.6e+31) (+ x (* t (/ y a))) (/ (- t) (+ (/ a z) -1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.8e+135) {
tmp = t - (t / (z / y));
} else if (z <= 1.6e+31) {
tmp = x + (t * (y / a));
} else {
tmp = -t / ((a / z) + -1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.8d+135)) then
tmp = t - (t / (z / y))
else if (z <= 1.6d+31) then
tmp = x + (t * (y / a))
else
tmp = -t / ((a / z) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.8e+135) {
tmp = t - (t / (z / y));
} else if (z <= 1.6e+31) {
tmp = x + (t * (y / a));
} else {
tmp = -t / ((a / z) + -1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.8e+135: tmp = t - (t / (z / y)) elif z <= 1.6e+31: tmp = x + (t * (y / a)) else: tmp = -t / ((a / z) + -1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.8e+135) tmp = Float64(t - Float64(t / Float64(z / y))); elseif (z <= 1.6e+31) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(Float64(-t) / Float64(Float64(a / z) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.8e+135) tmp = t - (t / (z / y)); elseif (z <= 1.6e+31) tmp = x + (t * (y / a)); else tmp = -t / ((a / z) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.8e+135], N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+31], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-t) / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+135}:\\
\;\;\;\;t - \frac{t}{\frac{z}{y}}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+31}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\
\end{array}
\end{array}
if z < -4.79999999999999995e135Initial program 71.4%
Taylor expanded in x around 0 34.9%
associate-/l*79.4%
associate-/r/68.8%
Simplified68.8%
Taylor expanded in a around 0 32.2%
associate-*r/32.2%
*-commutative32.2%
neg-mul-132.2%
distribute-rgt-neg-in32.2%
Simplified32.2%
Taylor expanded in y around 0 59.1%
mul-1-neg59.1%
unsub-neg59.1%
associate-/l*76.6%
Simplified76.6%
if -4.79999999999999995e135 < z < 1.6e31Initial program 90.8%
Taylor expanded in z around 0 61.8%
associate-/l*71.1%
associate-/r/72.4%
Simplified72.4%
Taylor expanded in t around inf 55.2%
associate-*r/61.4%
Simplified61.4%
if 1.6e31 < z Initial program 52.2%
Taylor expanded in x around 0 42.3%
Taylor expanded in y around 0 36.2%
mul-1-neg36.2%
associate-/l*62.1%
div-sub62.1%
sub-neg62.1%
*-inverses62.1%
metadata-eval62.1%
Simplified62.1%
Final simplification63.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.1e+113) t (if (<= z -9.8e-154) x (if (<= z 1.65e+31) (/ t (/ a y)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.1e+113) {
tmp = t;
} else if (z <= -9.8e-154) {
tmp = x;
} else if (z <= 1.65e+31) {
tmp = t / (a / y);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.1d+113)) then
tmp = t
else if (z <= (-9.8d-154)) then
tmp = x
else if (z <= 1.65d+31) then
tmp = t / (a / y)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.1e+113) {
tmp = t;
} else if (z <= -9.8e-154) {
tmp = x;
} else if (z <= 1.65e+31) {
tmp = t / (a / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.1e+113: tmp = t elif z <= -9.8e-154: tmp = x elif z <= 1.65e+31: tmp = t / (a / y) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.1e+113) tmp = t; elseif (z <= -9.8e-154) tmp = x; elseif (z <= 1.65e+31) tmp = Float64(t / Float64(a / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.1e+113) tmp = t; elseif (z <= -9.8e-154) tmp = x; elseif (z <= 1.65e+31) tmp = t / (a / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.1e+113], t, If[LessEqual[z, -9.8e-154], x, If[LessEqual[z, 1.65e+31], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+113}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -9.8 \cdot 10^{-154}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+31}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.10000000000000005e113 or 1.64999999999999996e31 < z Initial program 61.1%
Taylor expanded in z around inf 58.6%
if -1.10000000000000005e113 < z < -9.79999999999999993e-154Initial program 89.0%
Taylor expanded in a around inf 32.7%
if -9.79999999999999993e-154 < z < 1.64999999999999996e31Initial program 91.4%
Taylor expanded in x around 0 52.9%
Taylor expanded in y around inf 46.3%
Taylor expanded in a around inf 40.9%
associate-/l*47.1%
Simplified47.1%
Final simplification48.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.1e+135) (not (<= z 2.05e+20))) (- t (/ t (/ z y))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.1e+135) || !(z <= 2.05e+20)) {
tmp = t - (t / (z / y));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.1d+135)) .or. (.not. (z <= 2.05d+20))) then
tmp = t - (t / (z / y))
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.1e+135) || !(z <= 2.05e+20)) {
tmp = t - (t / (z / y));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.1e+135) or not (z <= 2.05e+20): tmp = t - (t / (z / y)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.1e+135) || !(z <= 2.05e+20)) tmp = Float64(t - Float64(t / Float64(z / y))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.1e+135) || ~((z <= 2.05e+20))) tmp = t - (t / (z / y)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.1e+135], N[Not[LessEqual[z, 2.05e+20]], $MachinePrecision]], N[(t - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+135} \lor \neg \left(z \leq 2.05 \cdot 10^{+20}\right):\\
\;\;\;\;t - \frac{t}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -4.1e135 or 2.05e20 < z Initial program 59.6%
Taylor expanded in x around 0 40.2%
associate-/l*74.2%
associate-/r/59.6%
Simplified59.6%
Taylor expanded in a around 0 34.2%
associate-*r/34.2%
*-commutative34.2%
neg-mul-134.2%
distribute-rgt-neg-in34.2%
Simplified34.2%
Taylor expanded in y around 0 57.5%
mul-1-neg57.5%
unsub-neg57.5%
associate-/l*65.6%
Simplified65.6%
if -4.1e135 < z < 2.05e20Initial program 90.7%
Taylor expanded in z around 0 62.2%
associate-/l*71.5%
associate-/r/72.9%
Simplified72.9%
Taylor expanded in t around inf 55.5%
associate-*r/61.8%
Simplified61.8%
Final simplification63.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.2e+139) t (if (<= z 3e+31) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+139) {
tmp = t;
} else if (z <= 3e+31) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9.2d+139)) then
tmp = t
else if (z <= 3d+31) then
tmp = x + (t * (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+139) {
tmp = t;
} else if (z <= 3e+31) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.2e+139: tmp = t elif z <= 3e+31: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.2e+139) tmp = t; elseif (z <= 3e+31) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.2e+139) tmp = t; elseif (z <= 3e+31) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+139], t, If[LessEqual[z, 3e+31], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+139}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+31}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.2e139 or 2.99999999999999989e31 < z Initial program 59.2%
Taylor expanded in z around inf 60.3%
if -9.2e139 < z < 2.99999999999999989e31Initial program 90.8%
Taylor expanded in z around 0 61.8%
associate-/l*71.1%
associate-/r/72.4%
Simplified72.4%
Taylor expanded in t around inf 55.2%
associate-*r/61.4%
Simplified61.4%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.5e+112) t (if (<= z 1.4e+19) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+112) {
tmp = t;
} else if (z <= 1.4e+19) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9.5d+112)) then
tmp = t
else if (z <= 1.4d+19) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+112) {
tmp = t;
} else if (z <= 1.4e+19) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+112: tmp = t elif z <= 1.4e+19: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+112) tmp = t; elseif (z <= 1.4e+19) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+112) tmp = t; elseif (z <= 1.4e+19) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+112], t, If[LessEqual[z, 1.4e+19], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+112}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+19}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.5000000000000008e112 or 1.4e19 < z Initial program 61.8%
Taylor expanded in z around inf 57.6%
if -9.5000000000000008e112 < z < 1.4e19Initial program 90.3%
Taylor expanded in a around inf 28.7%
Final simplification41.2%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 78.0%
Taylor expanded in z around inf 28.4%
Final simplification28.4%
herbie shell --seed 2024011
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))