
(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 17 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-305) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(+ t (* (- y a) (/ x z))))))
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-305) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t + ((y - a) * (x / z));
}
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-305) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t + Float64(Float64(y - a) * Float64(x / z))); end return 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-305], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $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^{-305} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999999e-305 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.7%
+-commutative89.7%
remove-double-neg89.7%
unsub-neg89.7%
*-commutative89.7%
associate-*l/82.2%
associate-/l*94.0%
fma-neg94.0%
remove-double-neg94.0%
Simplified94.0%
if -1.99999999999999999e-305 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.5%
Taylor expanded in z around inf 88.5%
associate--l+88.5%
distribute-lft-out--88.5%
div-sub88.5%
mul-1-neg88.5%
unsub-neg88.5%
div-sub88.5%
associate-/l*91.5%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
neg-mul-199.8%
distribute-neg-frac299.8%
Simplified99.8%
Final simplification94.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-305) (not (<= t_1 0.0)))
(+ x (* (- t x) (/ (- y z) (- a z))))
(+ t (* (- y a) (/ x z))))))
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-305) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + ((y - a) * (x / 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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-305)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) * ((y - z) / (a - z)))
else
tmp = t + ((y - a) * (x / z))
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-305) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + ((y - a) * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-305) or not (t_1 <= 0.0): tmp = x + ((t - x) * ((y - z) / (a - z))) else: tmp = t + ((y - a) * (x / z)) 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-305) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(y - a) * Float64(x / z))); 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-305) || ~((t_1 <= 0.0))) tmp = x + ((t - x) * ((y - z) / (a - z))); else tmp = t + ((y - a) * (x / z)); 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-305], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $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^{-305} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999999e-305 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.7%
+-commutative89.7%
remove-double-neg89.7%
unsub-neg89.7%
*-commutative89.7%
associate-*l/82.2%
associate-/l*94.0%
fma-neg94.0%
remove-double-neg94.0%
Simplified94.0%
fma-undefine94.0%
Applied egg-rr94.0%
if -1.99999999999999999e-305 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.5%
Taylor expanded in z around inf 88.5%
associate--l+88.5%
distribute-lft-out--88.5%
div-sub88.5%
mul-1-neg88.5%
unsub-neg88.5%
div-sub88.5%
associate-/l*91.5%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
neg-mul-199.8%
distribute-neg-frac299.8%
Simplified99.8%
Final simplification94.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-305) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (* (- y a) (/ x z))))))
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-305) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + ((y - a) * (x / 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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-305)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + ((y - a) * (x / z))
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-305) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + ((y - a) * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-305) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + ((y - a) * (x / z)) 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-305) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(y - a) * Float64(x / z))); 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-305) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + ((y - a) * (x / z)); 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-305], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $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^{-305} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999999e-305 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.7%
*-commutative89.7%
associate-*l/82.2%
associate-*r/94.0%
clear-num93.9%
un-div-inv93.9%
Applied egg-rr93.9%
if -1.99999999999999999e-305 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.5%
Taylor expanded in z around inf 88.5%
associate--l+88.5%
distribute-lft-out--88.5%
div-sub88.5%
mul-1-neg88.5%
unsub-neg88.5%
div-sub88.5%
associate-/l*91.5%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
neg-mul-199.8%
distribute-neg-frac299.8%
Simplified99.8%
Final simplification94.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-305) (not (<= t_1 0.0)))
t_1
(+ t (* (- y a) (/ x z))))))
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-305) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + ((y - a) * (x / 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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-305)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t + ((y - a) * (x / z))
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-305) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + ((y - a) * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-305) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t + ((y - a) * (x / z)) 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-305) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t + Float64(Float64(y - a) * Float64(x / z))); 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-305) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t + ((y - a) * (x / z)); 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-305], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $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^{-305} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999999e-305 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.7%
if -1.99999999999999999e-305 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.5%
Taylor expanded in z around inf 88.5%
associate--l+88.5%
distribute-lft-out--88.5%
div-sub88.5%
mul-1-neg88.5%
unsub-neg88.5%
div-sub88.5%
associate-/l*91.5%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
neg-mul-199.8%
distribute-neg-frac299.8%
Simplified99.8%
Final simplification91.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= a -1.1e+76)
t_2
(if (<= a -4e+31)
t_1
(if (<= a -1.48e-21)
t_2
(if (<= a -3.6e-137)
t_1
(if (<= a -8.2e-204)
(/ (* x (- y a)) z)
(if (<= a 1.05e+96) 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 * (1.0 - (y / a));
double tmp;
if (a <= -1.1e+76) {
tmp = t_2;
} else if (a <= -4e+31) {
tmp = t_1;
} else if (a <= -1.48e-21) {
tmp = t_2;
} else if (a <= -3.6e-137) {
tmp = t_1;
} else if (a <= -8.2e-204) {
tmp = (x * (y - a)) / z;
} else if (a <= 1.05e+96) {
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 * (1.0d0 - (y / a))
if (a <= (-1.1d+76)) then
tmp = t_2
else if (a <= (-4d+31)) then
tmp = t_1
else if (a <= (-1.48d-21)) then
tmp = t_2
else if (a <= (-3.6d-137)) then
tmp = t_1
else if (a <= (-8.2d-204)) then
tmp = (x * (y - a)) / z
else if (a <= 1.05d+96) 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 * (1.0 - (y / a));
double tmp;
if (a <= -1.1e+76) {
tmp = t_2;
} else if (a <= -4e+31) {
tmp = t_1;
} else if (a <= -1.48e-21) {
tmp = t_2;
} else if (a <= -3.6e-137) {
tmp = t_1;
} else if (a <= -8.2e-204) {
tmp = (x * (y - a)) / z;
} else if (a <= 1.05e+96) {
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 * (1.0 - (y / a)) tmp = 0 if a <= -1.1e+76: tmp = t_2 elif a <= -4e+31: tmp = t_1 elif a <= -1.48e-21: tmp = t_2 elif a <= -3.6e-137: tmp = t_1 elif a <= -8.2e-204: tmp = (x * (y - a)) / z elif a <= 1.05e+96: 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(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -1.1e+76) tmp = t_2; elseif (a <= -4e+31) tmp = t_1; elseif (a <= -1.48e-21) tmp = t_2; elseif (a <= -3.6e-137) tmp = t_1; elseif (a <= -8.2e-204) tmp = Float64(Float64(x * Float64(y - a)) / z); elseif (a <= 1.05e+96) 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 * (1.0 - (y / a)); tmp = 0.0; if (a <= -1.1e+76) tmp = t_2; elseif (a <= -4e+31) tmp = t_1; elseif (a <= -1.48e-21) tmp = t_2; elseif (a <= -3.6e-137) tmp = t_1; elseif (a <= -8.2e-204) tmp = (x * (y - a)) / z; elseif (a <= 1.05e+96) 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[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e+76], t$95$2, If[LessEqual[a, -4e+31], t$95$1, If[LessEqual[a, -1.48e-21], t$95$2, If[LessEqual[a, -3.6e-137], t$95$1, If[LessEqual[a, -8.2e-204], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 1.05e+96], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{+76}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -4 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.48 \cdot 10^{-21}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -8.2 \cdot 10^{-204}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.1e76 or -3.9999999999999999e31 < a < -1.48e-21 or 1.0500000000000001e96 < a Initial program 92.1%
Taylor expanded in x around inf 71.5%
mul-1-neg71.5%
unsub-neg71.5%
Simplified71.5%
Taylor expanded in z around 0 68.8%
if -1.1e76 < a < -3.9999999999999999e31 or -1.48e-21 < a < -3.60000000000000006e-137 or -8.2000000000000002e-204 < a < 1.0500000000000001e96Initial program 69.9%
Taylor expanded in x around 0 60.5%
associate-/l*73.2%
Simplified73.2%
if -3.60000000000000006e-137 < a < -8.2000000000000002e-204Initial program 51.8%
Taylor expanded in z around inf 84.9%
associate--l+84.9%
distribute-lft-out--84.9%
div-sub84.9%
mul-1-neg84.9%
unsub-neg84.9%
div-sub84.9%
associate-/l*84.1%
associate-/l*78.5%
distribute-rgt-out--84.3%
Simplified84.3%
Taylor expanded in t around 0 63.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.9e+159)
t
(if (<= z -2.75e+59)
(* y (/ (- x t) z))
(if (<= z -9.5e-19)
t
(if (<= z 7.5e+50)
(* x (- 1.0 (/ y a)))
(if (<= z 7e+119) (/ (* y (- x t)) z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+159) {
tmp = t;
} else if (z <= -2.75e+59) {
tmp = y * ((x - t) / z);
} else if (z <= -9.5e-19) {
tmp = t;
} else if (z <= 7.5e+50) {
tmp = x * (1.0 - (y / a));
} else if (z <= 7e+119) {
tmp = (y * (x - t)) / 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 <= (-2.9d+159)) then
tmp = t
else if (z <= (-2.75d+59)) then
tmp = y * ((x - t) / z)
else if (z <= (-9.5d-19)) then
tmp = t
else if (z <= 7.5d+50) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 7d+119) then
tmp = (y * (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 a) {
double tmp;
if (z <= -2.9e+159) {
tmp = t;
} else if (z <= -2.75e+59) {
tmp = y * ((x - t) / z);
} else if (z <= -9.5e-19) {
tmp = t;
} else if (z <= 7.5e+50) {
tmp = x * (1.0 - (y / a));
} else if (z <= 7e+119) {
tmp = (y * (x - t)) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e+159: tmp = t elif z <= -2.75e+59: tmp = y * ((x - t) / z) elif z <= -9.5e-19: tmp = t elif z <= 7.5e+50: tmp = x * (1.0 - (y / a)) elif z <= 7e+119: tmp = (y * (x - t)) / z else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e+159) tmp = t; elseif (z <= -2.75e+59) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (z <= -9.5e-19) tmp = t; elseif (z <= 7.5e+50) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 7e+119) tmp = Float64(Float64(y * Float64(x - t)) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.9e+159) tmp = t; elseif (z <= -2.75e+59) tmp = y * ((x - t) / z); elseif (z <= -9.5e-19) tmp = t; elseif (z <= 7.5e+50) tmp = x * (1.0 - (y / a)); elseif (z <= 7e+119) tmp = (y * (x - t)) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+159], t, If[LessEqual[z, -2.75e+59], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e-19], t, If[LessEqual[z, 7.5e+50], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+119], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+159}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{+59}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-19}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+119}:\\
\;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.90000000000000014e159 or -2.74999999999999995e59 < z < -9.4999999999999995e-19 or 7.0000000000000001e119 < z Initial program 57.1%
Taylor expanded in z around inf 57.3%
if -2.90000000000000014e159 < z < -2.74999999999999995e59Initial program 69.2%
Taylor expanded in y around inf 44.2%
div-sub44.2%
Simplified44.2%
Taylor expanded in a around 0 37.8%
mul-1-neg37.8%
associate-/l*42.7%
distribute-lft-neg-in42.7%
Simplified42.7%
if -9.4999999999999995e-19 < z < 7.4999999999999999e50Initial program 92.7%
Taylor expanded in x around inf 64.9%
mul-1-neg64.9%
unsub-neg64.9%
Simplified64.9%
Taylor expanded in z around 0 59.1%
if 7.4999999999999999e50 < z < 7.0000000000000001e119Initial program 60.6%
Taylor expanded in y around inf 71.5%
div-sub71.5%
Simplified71.5%
Taylor expanded in a around 0 72.0%
associate-*r/72.0%
mul-1-neg72.0%
distribute-rgt-neg-out72.0%
Simplified72.0%
Final simplification57.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- x t) z))))
(if (<= z -1.05e+161)
t
(if (<= z -5.2e+58)
t_1
(if (<= z -9.5e-19)
t
(if (<= z 1.9e+52)
(* x (- 1.0 (/ y a)))
(if (<= z 1.2e+115) t_1 t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((x - t) / z);
double tmp;
if (z <= -1.05e+161) {
tmp = t;
} else if (z <= -5.2e+58) {
tmp = t_1;
} else if (z <= -9.5e-19) {
tmp = t;
} else if (z <= 1.9e+52) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.2e+115) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = y * ((x - t) / z)
if (z <= (-1.05d+161)) then
tmp = t
else if (z <= (-5.2d+58)) then
tmp = t_1
else if (z <= (-9.5d-19)) then
tmp = t
else if (z <= 1.9d+52) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.2d+115) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((x - t) / z);
double tmp;
if (z <= -1.05e+161) {
tmp = t;
} else if (z <= -5.2e+58) {
tmp = t_1;
} else if (z <= -9.5e-19) {
tmp = t;
} else if (z <= 1.9e+52) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.2e+115) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((x - t) / z) tmp = 0 if z <= -1.05e+161: tmp = t elif z <= -5.2e+58: tmp = t_1 elif z <= -9.5e-19: tmp = t elif z <= 1.9e+52: tmp = x * (1.0 - (y / a)) elif z <= 1.2e+115: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(x - t) / z)) tmp = 0.0 if (z <= -1.05e+161) tmp = t; elseif (z <= -5.2e+58) tmp = t_1; elseif (z <= -9.5e-19) tmp = t; elseif (z <= 1.9e+52) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.2e+115) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((x - t) / z); tmp = 0.0; if (z <= -1.05e+161) tmp = t; elseif (z <= -5.2e+58) tmp = t_1; elseif (z <= -9.5e-19) tmp = t; elseif (z <= 1.9e+52) tmp = x * (1.0 - (y / a)); elseif (z <= 1.2e+115) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+161], t, If[LessEqual[z, -5.2e+58], t$95$1, If[LessEqual[z, -9.5e-19], t, If[LessEqual[z, 1.9e+52], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+115], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x - t}{z}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+161}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-19}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+52}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.05e161 or -5.19999999999999976e58 < z < -9.4999999999999995e-19 or 1.2e115 < z Initial program 57.1%
Taylor expanded in z around inf 57.3%
if -1.05e161 < z < -5.19999999999999976e58 or 1.9e52 < z < 1.2e115Initial program 66.2%
Taylor expanded in y around inf 53.6%
div-sub53.6%
Simplified53.6%
Taylor expanded in a around 0 49.6%
mul-1-neg49.6%
associate-/l*52.6%
distribute-lft-neg-in52.6%
Simplified52.6%
if -9.4999999999999995e-19 < z < 1.9e52Initial program 92.7%
Taylor expanded in x around inf 64.9%
mul-1-neg64.9%
unsub-neg64.9%
Simplified64.9%
Taylor expanded in z around 0 59.1%
Final simplification57.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t x) z)) (t_2 (+ t (* t_1 (- a y)))))
(if (<= z -1e+111)
t_2
(if (<= z -7.8e+17)
(- x (* z (/ (- t x) (- a z))))
(if (<= z -9.5e-19)
(- t (* y t_1))
(if (<= z 8.2) (+ x (* (- t x) (/ y (- a z)))) t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) / z;
double t_2 = t + (t_1 * (a - y));
double tmp;
if (z <= -1e+111) {
tmp = t_2;
} else if (z <= -7.8e+17) {
tmp = x - (z * ((t - x) / (a - z)));
} else if (z <= -9.5e-19) {
tmp = t - (y * t_1);
} else if (z <= 8.2) {
tmp = x + ((t - x) * (y / (a - z)));
} 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 - x) / z
t_2 = t + (t_1 * (a - y))
if (z <= (-1d+111)) then
tmp = t_2
else if (z <= (-7.8d+17)) then
tmp = x - (z * ((t - x) / (a - z)))
else if (z <= (-9.5d-19)) then
tmp = t - (y * t_1)
else if (z <= 8.2d0) then
tmp = x + ((t - x) * (y / (a - z)))
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 - x) / z;
double t_2 = t + (t_1 * (a - y));
double tmp;
if (z <= -1e+111) {
tmp = t_2;
} else if (z <= -7.8e+17) {
tmp = x - (z * ((t - x) / (a - z)));
} else if (z <= -9.5e-19) {
tmp = t - (y * t_1);
} else if (z <= 8.2) {
tmp = x + ((t - x) * (y / (a - z)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) / z t_2 = t + (t_1 * (a - y)) tmp = 0 if z <= -1e+111: tmp = t_2 elif z <= -7.8e+17: tmp = x - (z * ((t - x) / (a - z))) elif z <= -9.5e-19: tmp = t - (y * t_1) elif z <= 8.2: tmp = x + ((t - x) * (y / (a - z))) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) / z) t_2 = Float64(t + Float64(t_1 * Float64(a - y))) tmp = 0.0 if (z <= -1e+111) tmp = t_2; elseif (z <= -7.8e+17) tmp = Float64(x - Float64(z * Float64(Float64(t - x) / Float64(a - z)))); elseif (z <= -9.5e-19) tmp = Float64(t - Float64(y * t_1)); elseif (z <= 8.2) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - x) / z; t_2 = t + (t_1 * (a - y)); tmp = 0.0; if (z <= -1e+111) tmp = t_2; elseif (z <= -7.8e+17) tmp = x - (z * ((t - x) / (a - z))); elseif (z <= -9.5e-19) tmp = t - (y * t_1); elseif (z <= 8.2) tmp = x + ((t - x) * (y / (a - z))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(t$95$1 * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+111], t$95$2, If[LessEqual[z, -7.8e+17], N[(x - N[(z * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.5e-19], N[(t - N[(y * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{z}\\
t_2 := t + t\_1 \cdot \left(a - y\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{+17}:\\
\;\;\;\;x - z \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-19}:\\
\;\;\;\;t - y \cdot t\_1\\
\mathbf{elif}\;z \leq 8.2:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -9.99999999999999957e110 or 8.1999999999999993 < z Initial program 55.6%
Taylor expanded in z around inf 68.8%
associate--l+68.8%
distribute-lft-out--68.8%
div-sub68.8%
mul-1-neg68.8%
unsub-neg68.8%
div-sub68.8%
associate-/l*72.6%
associate-/l*80.5%
distribute-rgt-out--80.5%
Simplified80.5%
if -9.99999999999999957e110 < z < -7.8e17Initial program 86.7%
Taylor expanded in y around 0 60.3%
mul-1-neg60.3%
unsub-neg60.3%
associate-/l*73.5%
Simplified73.5%
if -7.8e17 < z < -9.4999999999999995e-19Initial program 80.8%
Taylor expanded in z around inf 81.3%
associate--l+81.3%
distribute-lft-out--81.3%
div-sub81.3%
mul-1-neg81.3%
unsub-neg81.3%
div-sub81.3%
associate-/l*81.3%
associate-/l*81.3%
distribute-rgt-out--81.3%
Simplified81.3%
Taylor expanded in y around inf 81.3%
associate-*r/81.3%
Simplified81.3%
if -9.4999999999999995e-19 < z < 8.1999999999999993Initial program 94.1%
+-commutative94.1%
remove-double-neg94.1%
unsub-neg94.1%
*-commutative94.1%
associate-*l/93.2%
associate-/l*95.5%
fma-neg95.5%
remove-double-neg95.5%
Simplified95.5%
fma-undefine95.5%
Applied egg-rr95.5%
Taylor expanded in y around inf 89.0%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ (- t x) z) (- a y)))))
(if (<= z -3.9e-19)
t_1
(if (<= z 23000.0)
(+ x (* (- t x) (/ y (- a z))))
(if (<= z 1.46e+40)
(/ (* (- y z) t) (- a z))
(if (<= z 2.6e+49) (* x (- 1.0 (/ y a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((t - x) / z) * (a - y));
double tmp;
if (z <= -3.9e-19) {
tmp = t_1;
} else if (z <= 23000.0) {
tmp = x + ((t - x) * (y / (a - z)));
} else if (z <= 1.46e+40) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 2.6e+49) {
tmp = x * (1.0 - (y / a));
} 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 = t + (((t - x) / z) * (a - y))
if (z <= (-3.9d-19)) then
tmp = t_1
else if (z <= 23000.0d0) then
tmp = x + ((t - x) * (y / (a - z)))
else if (z <= 1.46d+40) then
tmp = ((y - z) * t) / (a - z)
else if (z <= 2.6d+49) then
tmp = x * (1.0d0 - (y / a))
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 = t + (((t - x) / z) * (a - y));
double tmp;
if (z <= -3.9e-19) {
tmp = t_1;
} else if (z <= 23000.0) {
tmp = x + ((t - x) * (y / (a - z)));
} else if (z <= 1.46e+40) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 2.6e+49) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (((t - x) / z) * (a - y)) tmp = 0 if z <= -3.9e-19: tmp = t_1 elif z <= 23000.0: tmp = x + ((t - x) * (y / (a - z))) elif z <= 1.46e+40: tmp = ((y - z) * t) / (a - z) elif z <= 2.6e+49: tmp = x * (1.0 - (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))) tmp = 0.0 if (z <= -3.9e-19) tmp = t_1; elseif (z <= 23000.0) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); elseif (z <= 1.46e+40) tmp = Float64(Float64(Float64(y - z) * t) / Float64(a - z)); elseif (z <= 2.6e+49) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (((t - x) / z) * (a - y)); tmp = 0.0; if (z <= -3.9e-19) tmp = t_1; elseif (z <= 23000.0) tmp = x + ((t - x) * (y / (a - z))); elseif (z <= 1.46e+40) tmp = ((y - z) * t) / (a - z); elseif (z <= 2.6e+49) tmp = x * (1.0 - (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.9e-19], t$95$1, If[LessEqual[z, 23000.0], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.46e+40], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+49], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 23000:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.46 \cdot 10^{+40}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+49}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.89999999999999995e-19 or 2.59999999999999989e49 < z Initial program 59.5%
Taylor expanded in z around inf 68.7%
associate--l+68.7%
distribute-lft-out--68.7%
div-sub68.7%
mul-1-neg68.7%
unsub-neg68.7%
div-sub68.7%
associate-/l*72.1%
associate-/l*78.2%
distribute-rgt-out--78.2%
Simplified78.2%
if -3.89999999999999995e-19 < z < 23000Initial program 94.1%
+-commutative94.1%
remove-double-neg94.1%
unsub-neg94.1%
*-commutative94.1%
associate-*l/93.2%
associate-/l*95.5%
fma-neg95.5%
remove-double-neg95.5%
Simplified95.5%
fma-undefine95.5%
Applied egg-rr95.5%
Taylor expanded in y around inf 89.0%
if 23000 < z < 1.46e40Initial program 73.6%
Taylor expanded in x around 0 82.7%
if 1.46e40 < z < 2.59999999999999989e49Initial program 100.0%
Taylor expanded in x around inf 75.5%
mul-1-neg75.5%
unsub-neg75.5%
Simplified75.5%
Taylor expanded in z around 0 77.8%
Final simplification83.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* y (/ (- t x) z)))))
(if (<= z -9.5e-19)
t_1
(if (<= z 13600.0)
(+ x (* (- t x) (/ y (- a z))))
(if (<= z 1.18e+39)
(/ (* (- y z) t) (- a z))
(if (<= z 2.2e+49) (* x (- 1.0 (/ y a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (y * ((t - x) / z));
double tmp;
if (z <= -9.5e-19) {
tmp = t_1;
} else if (z <= 13600.0) {
tmp = x + ((t - x) * (y / (a - z)));
} else if (z <= 1.18e+39) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 2.2e+49) {
tmp = x * (1.0 - (y / a));
} 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 = t - (y * ((t - x) / z))
if (z <= (-9.5d-19)) then
tmp = t_1
else if (z <= 13600.0d0) then
tmp = x + ((t - x) * (y / (a - z)))
else if (z <= 1.18d+39) then
tmp = ((y - z) * t) / (a - z)
else if (z <= 2.2d+49) then
tmp = x * (1.0d0 - (y / a))
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 = t - (y * ((t - x) / z));
double tmp;
if (z <= -9.5e-19) {
tmp = t_1;
} else if (z <= 13600.0) {
tmp = x + ((t - x) * (y / (a - z)));
} else if (z <= 1.18e+39) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 2.2e+49) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (y * ((t - x) / z)) tmp = 0 if z <= -9.5e-19: tmp = t_1 elif z <= 13600.0: tmp = x + ((t - x) * (y / (a - z))) elif z <= 1.18e+39: tmp = ((y - z) * t) / (a - z) elif z <= 2.2e+49: tmp = x * (1.0 - (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(y * Float64(Float64(t - x) / z))) tmp = 0.0 if (z <= -9.5e-19) tmp = t_1; elseif (z <= 13600.0) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); elseif (z <= 1.18e+39) tmp = Float64(Float64(Float64(y - z) * t) / Float64(a - z)); elseif (z <= 2.2e+49) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (y * ((t - x) / z)); tmp = 0.0; if (z <= -9.5e-19) tmp = t_1; elseif (z <= 13600.0) tmp = x + ((t - x) * (y / (a - z))); elseif (z <= 1.18e+39) tmp = ((y - z) * t) / (a - z); elseif (z <= 2.2e+49) tmp = x * (1.0 - (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e-19], t$95$1, If[LessEqual[z, 13600.0], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.18e+39], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+49], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - y \cdot \frac{t - x}{z}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 13600:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.18 \cdot 10^{+39}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+49}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.4999999999999995e-19 or 2.2000000000000001e49 < z Initial program 59.5%
Taylor expanded in z around inf 68.7%
associate--l+68.7%
distribute-lft-out--68.7%
div-sub68.7%
mul-1-neg68.7%
unsub-neg68.7%
div-sub68.7%
associate-/l*72.1%
associate-/l*78.2%
distribute-rgt-out--78.2%
Simplified78.2%
Taylor expanded in y around inf 66.9%
associate-*r/72.1%
Simplified72.1%
if -9.4999999999999995e-19 < z < 13600Initial program 94.1%
+-commutative94.1%
remove-double-neg94.1%
unsub-neg94.1%
*-commutative94.1%
associate-*l/93.2%
associate-/l*95.5%
fma-neg95.5%
remove-double-neg95.5%
Simplified95.5%
fma-undefine95.5%
Applied egg-rr95.5%
Taylor expanded in y around inf 89.0%
if 13600 < z < 1.17999999999999996e39Initial program 73.6%
Taylor expanded in x around 0 82.7%
if 1.17999999999999996e39 < z < 2.2000000000000001e49Initial program 100.0%
Taylor expanded in x around inf 75.5%
mul-1-neg75.5%
unsub-neg75.5%
Simplified75.5%
Taylor expanded in z around 0 77.8%
Final simplification81.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.6e-21)
x
(if (<= a -7e-135)
t
(if (<= a -2.3e-221)
(* x (/ y z))
(if (<= a 1.45e+95) t (* x (+ 1.0 (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-21) {
tmp = x;
} else if (a <= -7e-135) {
tmp = t;
} else if (a <= -2.3e-221) {
tmp = x * (y / z);
} else if (a <= 1.45e+95) {
tmp = t;
} else {
tmp = x * (1.0 + (z / 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 (a <= (-1.6d-21)) then
tmp = x
else if (a <= (-7d-135)) then
tmp = t
else if (a <= (-2.3d-221)) then
tmp = x * (y / z)
else if (a <= 1.45d+95) then
tmp = t
else
tmp = x * (1.0d0 + (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-21) {
tmp = x;
} else if (a <= -7e-135) {
tmp = t;
} else if (a <= -2.3e-221) {
tmp = x * (y / z);
} else if (a <= 1.45e+95) {
tmp = t;
} else {
tmp = x * (1.0 + (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e-21: tmp = x elif a <= -7e-135: tmp = t elif a <= -2.3e-221: tmp = x * (y / z) elif a <= 1.45e+95: tmp = t else: tmp = x * (1.0 + (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e-21) tmp = x; elseif (a <= -7e-135) tmp = t; elseif (a <= -2.3e-221) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.45e+95) tmp = t; else tmp = Float64(x * Float64(1.0 + Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e-21) tmp = x; elseif (a <= -7e-135) tmp = t; elseif (a <= -2.3e-221) tmp = x * (y / z); elseif (a <= 1.45e+95) tmp = t; else tmp = x * (1.0 + (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e-21], x, If[LessEqual[a, -7e-135], t, If[LessEqual[a, -2.3e-221], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e+95], t, N[(x * N[(1.0 + N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-21}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -7 \cdot 10^{-135}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-221}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 + \frac{z}{a}\right)\\
\end{array}
\end{array}
if a < -1.6000000000000001e-21Initial program 91.9%
Taylor expanded in a around inf 52.5%
if -1.6000000000000001e-21 < a < -6.9999999999999997e-135 or -2.3e-221 < a < 1.45000000000000007e95Initial program 71.0%
Taylor expanded in z around inf 40.2%
if -6.9999999999999997e-135 < a < -2.3e-221Initial program 45.4%
Taylor expanded in x around inf 33.0%
mul-1-neg33.0%
unsub-neg33.0%
Simplified33.0%
Taylor expanded in a around 0 58.3%
if 1.45000000000000007e95 < a Initial program 91.5%
Taylor expanded in x around inf 73.1%
mul-1-neg73.1%
unsub-neg73.1%
Simplified73.1%
Taylor expanded in y around 0 65.4%
+-commutative65.4%
Simplified65.4%
Taylor expanded in z around 0 64.1%
Final simplification49.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4e+158)
t
(if (<= z 2e+52)
(* x (- 1.0 (/ y a)))
(if (<= z 3.2e+110) (* t (/ y (- z))) (if (<= z 2.15e+111) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+158) {
tmp = t;
} else if (z <= 2e+52) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.2e+110) {
tmp = t * (y / -z);
} else if (z <= 2.15e+111) {
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 <= (-4d+158)) then
tmp = t
else if (z <= 2d+52) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 3.2d+110) then
tmp = t * (y / -z)
else if (z <= 2.15d+111) 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 <= -4e+158) {
tmp = t;
} else if (z <= 2e+52) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.2e+110) {
tmp = t * (y / -z);
} else if (z <= 2.15e+111) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e+158: tmp = t elif z <= 2e+52: tmp = x * (1.0 - (y / a)) elif z <= 3.2e+110: tmp = t * (y / -z) elif z <= 2.15e+111: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+158) tmp = t; elseif (z <= 2e+52) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 3.2e+110) tmp = Float64(t * Float64(y / Float64(-z))); elseif (z <= 2.15e+111) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e+158) tmp = t; elseif (z <= 2e+52) tmp = x * (1.0 - (y / a)); elseif (z <= 3.2e+110) tmp = t * (y / -z); elseif (z <= 2.15e+111) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+158], t, If[LessEqual[z, 2e+52], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+110], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+111], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+158}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+52}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+110}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.99999999999999981e158 or 2.14999999999999997e111 < z Initial program 48.9%
Taylor expanded in z around inf 60.0%
if -3.99999999999999981e158 < z < 2e52Initial program 89.8%
Taylor expanded in x around inf 59.3%
mul-1-neg59.3%
unsub-neg59.3%
Simplified59.3%
Taylor expanded in z around 0 53.4%
if 2e52 < z < 3.19999999999999994e110Initial program 57.8%
Taylor expanded in y around inf 85.5%
div-sub85.5%
Simplified85.5%
Taylor expanded in a around 0 86.5%
mul-1-neg86.5%
associate-/l*85.5%
distribute-lft-neg-in85.5%
Simplified85.5%
Taylor expanded in t around inf 52.4%
mul-1-neg52.4%
distribute-neg-frac252.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in y around 0 52.4%
mul-1-neg52.4%
associate-*r/65.4%
distribute-rgt-neg-in65.4%
Simplified65.4%
if 3.19999999999999994e110 < z < 2.14999999999999997e111Initial program 100.0%
Taylor expanded in a around inf 100.0%
Final simplification55.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.6e-21)
x
(if (<= a -1.2e-136)
t
(if (<= a -1.08e-222) (* x (/ y z)) (if (<= a 1.02e+95) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-21) {
tmp = x;
} else if (a <= -1.2e-136) {
tmp = t;
} else if (a <= -1.08e-222) {
tmp = x * (y / z);
} else if (a <= 1.02e+95) {
tmp = t;
} else {
tmp = x;
}
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 (a <= (-1.6d-21)) then
tmp = x
else if (a <= (-1.2d-136)) then
tmp = t
else if (a <= (-1.08d-222)) then
tmp = x * (y / z)
else if (a <= 1.02d+95) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-21) {
tmp = x;
} else if (a <= -1.2e-136) {
tmp = t;
} else if (a <= -1.08e-222) {
tmp = x * (y / z);
} else if (a <= 1.02e+95) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e-21: tmp = x elif a <= -1.2e-136: tmp = t elif a <= -1.08e-222: tmp = x * (y / z) elif a <= 1.02e+95: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e-21) tmp = x; elseif (a <= -1.2e-136) tmp = t; elseif (a <= -1.08e-222) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.02e+95) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e-21) tmp = x; elseif (a <= -1.2e-136) tmp = t; elseif (a <= -1.08e-222) tmp = x * (y / z); elseif (a <= 1.02e+95) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e-21], x, If[LessEqual[a, -1.2e-136], t, If[LessEqual[a, -1.08e-222], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.02e+95], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-21}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{-136}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq -1.08 \cdot 10^{-222}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.02 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.6000000000000001e-21 or 1.0200000000000001e95 < a Initial program 91.7%
Taylor expanded in a around inf 57.4%
if -1.6000000000000001e-21 < a < -1.1999999999999999e-136 or -1.07999999999999995e-222 < a < 1.0200000000000001e95Initial program 71.0%
Taylor expanded in z around inf 40.2%
if -1.1999999999999999e-136 < a < -1.07999999999999995e-222Initial program 45.4%
Taylor expanded in x around inf 33.0%
mul-1-neg33.0%
unsub-neg33.0%
Simplified33.0%
Taylor expanded in a around 0 58.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.9e-69) (not (<= z 4.2e-53))) (- t (* y (/ (- t x) z))) (+ x (/ (* y (- t x)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e-69) || !(z <= 4.2e-53)) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + ((y * (t - x)) / 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 <= (-1.9d-69)) .or. (.not. (z <= 4.2d-53))) then
tmp = t - (y * ((t - x) / z))
else
tmp = x + ((y * (t - x)) / 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 <= -1.9e-69) || !(z <= 4.2e-53)) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + ((y * (t - x)) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e-69) or not (z <= 4.2e-53): tmp = t - (y * ((t - x) / z)) else: tmp = x + ((y * (t - x)) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e-69) || !(z <= 4.2e-53)) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); else tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.9e-69) || ~((z <= 4.2e-53))) tmp = t - (y * ((t - x) / z)); else tmp = x + ((y * (t - x)) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e-69], N[Not[LessEqual[z, 4.2e-53]], $MachinePrecision]], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-69} \lor \neg \left(z \leq 4.2 \cdot 10^{-53}\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\end{array}
\end{array}
if z < -1.8999999999999999e-69 or 4.19999999999999955e-53 < z Initial program 64.4%
Taylor expanded in z around inf 65.8%
associate--l+65.8%
distribute-lft-out--65.8%
div-sub65.8%
mul-1-neg65.8%
unsub-neg65.8%
div-sub65.8%
associate-/l*68.5%
associate-/l*74.1%
distribute-rgt-out--74.0%
Simplified74.0%
Taylor expanded in y around inf 64.6%
associate-*r/68.7%
Simplified68.7%
if -1.8999999999999999e-69 < z < 4.19999999999999955e-53Initial program 95.0%
Taylor expanded in z around 0 82.7%
Final simplification75.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.6e-71) (not (<= z 4.8e-17))) (* t (/ (- y z) (- a z))) (+ x (/ (* y (- t x)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.6e-71) || !(z <= 4.8e-17)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((y * (t - x)) / 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 <= (-3.6d-71)) .or. (.not. (z <= 4.8d-17))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((y * (t - x)) / 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 <= -3.6e-71) || !(z <= 4.8e-17)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((y * (t - x)) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.6e-71) or not (z <= 4.8e-17): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((y * (t - x)) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.6e-71) || !(z <= 4.8e-17)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.6e-71) || ~((z <= 4.8e-17))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((y * (t - x)) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.6e-71], N[Not[LessEqual[z, 4.8e-17]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-71} \lor \neg \left(z \leq 4.8 \cdot 10^{-17}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\end{array}
\end{array}
if z < -3.6e-71 or 4.79999999999999973e-17 < z Initial program 64.1%
Taylor expanded in x around 0 47.6%
associate-/l*62.0%
Simplified62.0%
if -3.6e-71 < z < 4.79999999999999973e-17Initial program 94.4%
Taylor expanded in z around 0 80.9%
Final simplification70.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.6e-21) x (if (<= a 1.12e+95) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-21) {
tmp = x;
} else if (a <= 1.12e+95) {
tmp = t;
} else {
tmp = x;
}
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 (a <= (-1.6d-21)) then
tmp = x
else if (a <= 1.12d+95) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-21) {
tmp = x;
} else if (a <= 1.12e+95) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e-21: tmp = x elif a <= 1.12e+95: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e-21) tmp = x; elseif (a <= 1.12e+95) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e-21) tmp = x; elseif (a <= 1.12e+95) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e-21], x, If[LessEqual[a, 1.12e+95], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-21}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.12 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.6000000000000001e-21 or 1.11999999999999999e95 < a Initial program 91.7%
Taylor expanded in a around inf 57.4%
if -1.6000000000000001e-21 < a < 1.11999999999999999e95Initial program 66.8%
Taylor expanded in z around inf 38.9%
(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.3%
Taylor expanded in z around inf 25.0%
herbie shell --seed 2024091
(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)))))