
(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 -1e-289) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(+ t (* (/ (- t x) z) (- a y))))))
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-289) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t + (((t - x) / z) * (a - y));
}
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-289) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); 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, -1e-289], 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[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $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^{-289} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1e-289 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 86.3%
+-commutative86.3%
remove-double-neg86.3%
unsub-neg86.3%
*-commutative86.3%
associate-*l/76.1%
associate-/l*95.5%
fma-neg95.5%
remove-double-neg95.5%
Simplified95.5%
if -1e-289 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.2%
+-commutative3.2%
fma-define3.4%
Simplified3.4%
Taylor expanded in z around inf 81.1%
associate--l+81.1%
distribute-lft-out--81.1%
div-sub81.1%
mul-1-neg81.1%
unsub-neg81.1%
div-sub81.1%
associate-/l*84.0%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification96.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-289) (not (<= t_1 0.0)))
(+ x (/ (- x t) (/ (- a z) (- z y))))
(+ t (* (/ (- t x) z) (- a y))))))
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-289) || !(t_1 <= 0.0)) {
tmp = x + ((x - t) / ((a - z) / (z - y)));
} else {
tmp = t + (((t - x) / z) * (a - y));
}
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-289)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((x - t) / ((a - z) / (z - y)))
else
tmp = t + (((t - x) / z) * (a - y))
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-289) || !(t_1 <= 0.0)) {
tmp = x + ((x - t) / ((a - z) / (z - y)));
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -1e-289) or not (t_1 <= 0.0): tmp = x + ((x - t) / ((a - z) / (z - y))) else: tmp = t + (((t - x) / z) * (a - y)) 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-289) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(x - t) / Float64(Float64(a - z) / Float64(z - y)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); 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-289) || ~((t_1 <= 0.0))) tmp = x + ((x - t) / ((a - z) / (z - y))); else tmp = t + (((t - x) / z) * (a - y)); 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-289], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(x - t), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $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^{-289} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{x - t}{\frac{a - z}{z - y}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1e-289 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 86.3%
+-commutative86.3%
fma-define86.3%
Simplified86.3%
fma-undefine86.3%
*-commutative86.3%
associate-*l/76.1%
associate-*r/95.5%
clear-num95.4%
un-div-inv95.4%
Applied egg-rr95.4%
if -1e-289 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.2%
+-commutative3.2%
fma-define3.4%
Simplified3.4%
Taylor expanded in z around inf 81.1%
associate--l+81.1%
distribute-lft-out--81.1%
div-sub81.1%
mul-1-neg81.1%
unsub-neg81.1%
div-sub81.1%
associate-/l*84.0%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification96.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-203) (not (<= t_1 1e-236)))
t_1
(+ t (* (/ (- t x) z) (- a y))))))
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 <= -5e-203) || !(t_1 <= 1e-236)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
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 <= (-5d-203)) .or. (.not. (t_1 <= 1d-236))) then
tmp = t_1
else
tmp = t + (((t - x) / z) * (a - y))
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 <= -5e-203) || !(t_1 <= 1e-236)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-203) or not (t_1 <= 1e-236): tmp = t_1 else: tmp = t + (((t - x) / z) * (a - y)) 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 <= -5e-203) || !(t_1 <= 1e-236)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); 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 <= -5e-203) || ~((t_1 <= 1e-236))) tmp = t_1; else tmp = t + (((t - x) / z) * (a - y)); 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, -5e-203], N[Not[LessEqual[t$95$1, 1e-236]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $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 -5 \cdot 10^{-203} \lor \neg \left(t\_1 \leq 10^{-236}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000002e-203 or 1e-236 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.7%
if -5.0000000000000002e-203 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1e-236Initial program 9.5%
+-commutative9.5%
fma-define9.6%
Simplified9.6%
Taylor expanded in z around inf 75.8%
associate--l+75.8%
distribute-lft-out--75.8%
div-sub75.8%
mul-1-neg75.8%
unsub-neg75.8%
div-sub75.8%
associate-/l*76.0%
associate-/l*88.0%
distribute-rgt-out--88.0%
Simplified88.0%
Final simplification89.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) a))))
(if (<= z -2.55e+69)
t
(if (<= z -5.8e+27)
x
(if (<= z -5.3e-140)
t_1
(if (<= z -3.5e-191)
x
(if (<= z 1.6e-105) t_1 (if (<= z 3.2e-5) x t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / a);
double tmp;
if (z <= -2.55e+69) {
tmp = t;
} else if (z <= -5.8e+27) {
tmp = x;
} else if (z <= -5.3e-140) {
tmp = t_1;
} else if (z <= -3.5e-191) {
tmp = x;
} else if (z <= 1.6e-105) {
tmp = t_1;
} else if (z <= 3.2e-5) {
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) :: t_1
real(8) :: tmp
t_1 = y * ((t - x) / a)
if (z <= (-2.55d+69)) then
tmp = t
else if (z <= (-5.8d+27)) then
tmp = x
else if (z <= (-5.3d-140)) then
tmp = t_1
else if (z <= (-3.5d-191)) then
tmp = x
else if (z <= 1.6d-105) then
tmp = t_1
else if (z <= 3.2d-5) 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 t_1 = y * ((t - x) / a);
double tmp;
if (z <= -2.55e+69) {
tmp = t;
} else if (z <= -5.8e+27) {
tmp = x;
} else if (z <= -5.3e-140) {
tmp = t_1;
} else if (z <= -3.5e-191) {
tmp = x;
} else if (z <= 1.6e-105) {
tmp = t_1;
} else if (z <= 3.2e-5) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / a) tmp = 0 if z <= -2.55e+69: tmp = t elif z <= -5.8e+27: tmp = x elif z <= -5.3e-140: tmp = t_1 elif z <= -3.5e-191: tmp = x elif z <= 1.6e-105: tmp = t_1 elif z <= 3.2e-5: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / a)) tmp = 0.0 if (z <= -2.55e+69) tmp = t; elseif (z <= -5.8e+27) tmp = x; elseif (z <= -5.3e-140) tmp = t_1; elseif (z <= -3.5e-191) tmp = x; elseif (z <= 1.6e-105) tmp = t_1; elseif (z <= 3.2e-5) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / a); tmp = 0.0; if (z <= -2.55e+69) tmp = t; elseif (z <= -5.8e+27) tmp = x; elseif (z <= -5.3e-140) tmp = t_1; elseif (z <= -3.5e-191) tmp = x; elseif (z <= 1.6e-105) tmp = t_1; elseif (z <= 3.2e-5) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.55e+69], t, If[LessEqual[z, -5.8e+27], x, If[LessEqual[z, -5.3e-140], t$95$1, If[LessEqual[z, -3.5e-191], x, If[LessEqual[z, 1.6e-105], t$95$1, If[LessEqual[z, 3.2e-5], x, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;z \leq -2.55 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -5.3 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.54999999999999999e69 or 3.19999999999999986e-5 < z Initial program 57.4%
+-commutative57.4%
fma-define57.3%
Simplified57.3%
Taylor expanded in z around inf 48.1%
if -2.54999999999999999e69 < z < -5.8000000000000002e27 or -5.29999999999999984e-140 < z < -3.50000000000000007e-191 or 1.59999999999999991e-105 < z < 3.19999999999999986e-5Initial program 89.0%
+-commutative89.0%
fma-define89.2%
Simplified89.2%
Taylor expanded in a around inf 64.3%
if -5.8000000000000002e27 < z < -5.29999999999999984e-140 or -3.50000000000000007e-191 < z < 1.59999999999999991e-105Initial program 89.3%
+-commutative89.3%
fma-define89.4%
Simplified89.4%
Taylor expanded in y around inf 60.5%
div-sub60.5%
Simplified60.5%
Taylor expanded in a around inf 51.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.2e+69)
t
(if (<= z -5.6e+28)
x
(if (<= z -6.6e-119)
(/ (* x (- y)) a)
(if (<= z -1.15e-191)
x
(if (<= z 2.3e-104) (* t (/ y (- a z))) (if (<= z 1e-5) x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e+69) {
tmp = t;
} else if (z <= -5.6e+28) {
tmp = x;
} else if (z <= -6.6e-119) {
tmp = (x * -y) / a;
} else if (z <= -1.15e-191) {
tmp = x;
} else if (z <= 2.3e-104) {
tmp = t * (y / (a - z));
} else if (z <= 1e-5) {
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 <= (-2.2d+69)) then
tmp = t
else if (z <= (-5.6d+28)) then
tmp = x
else if (z <= (-6.6d-119)) then
tmp = (x * -y) / a
else if (z <= (-1.15d-191)) then
tmp = x
else if (z <= 2.3d-104) then
tmp = t * (y / (a - z))
else if (z <= 1d-5) 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 <= -2.2e+69) {
tmp = t;
} else if (z <= -5.6e+28) {
tmp = x;
} else if (z <= -6.6e-119) {
tmp = (x * -y) / a;
} else if (z <= -1.15e-191) {
tmp = x;
} else if (z <= 2.3e-104) {
tmp = t * (y / (a - z));
} else if (z <= 1e-5) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.2e+69: tmp = t elif z <= -5.6e+28: tmp = x elif z <= -6.6e-119: tmp = (x * -y) / a elif z <= -1.15e-191: tmp = x elif z <= 2.3e-104: tmp = t * (y / (a - z)) elif z <= 1e-5: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.2e+69) tmp = t; elseif (z <= -5.6e+28) tmp = x; elseif (z <= -6.6e-119) tmp = Float64(Float64(x * Float64(-y)) / a); elseif (z <= -1.15e-191) tmp = x; elseif (z <= 2.3e-104) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 1e-5) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.2e+69) tmp = t; elseif (z <= -5.6e+28) tmp = x; elseif (z <= -6.6e-119) tmp = (x * -y) / a; elseif (z <= -1.15e-191) tmp = x; elseif (z <= 2.3e-104) tmp = t * (y / (a - z)); elseif (z <= 1e-5) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e+69], t, If[LessEqual[z, -5.6e+28], x, If[LessEqual[z, -6.6e-119], N[(N[(x * (-y)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, -1.15e-191], x, If[LessEqual[z, 2.3e-104], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-5], x, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-119}:\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{a}\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-191}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-104}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.2000000000000002e69 or 1.00000000000000008e-5 < z Initial program 57.4%
+-commutative57.4%
fma-define57.3%
Simplified57.3%
Taylor expanded in z around inf 48.1%
if -2.2000000000000002e69 < z < -5.6000000000000003e28 or -6.60000000000000017e-119 < z < -1.15000000000000005e-191 or 2.2999999999999999e-104 < z < 1.00000000000000008e-5Initial program 87.6%
+-commutative87.6%
fma-define87.8%
Simplified87.8%
Taylor expanded in a around inf 60.9%
if -5.6000000000000003e28 < z < -6.60000000000000017e-119Initial program 96.2%
+-commutative96.2%
fma-define96.5%
Simplified96.5%
Taylor expanded in y around -inf 71.1%
Taylor expanded in a around inf 45.8%
Taylor expanded in t around 0 38.8%
neg-mul-163.6%
Simplified38.8%
if -1.15000000000000005e-191 < z < 2.2999999999999999e-104Initial program 87.5%
+-commutative87.5%
fma-define87.5%
Simplified87.5%
Taylor expanded in y around -inf 62.2%
Taylor expanded in t around inf 48.0%
associate-/l*50.4%
Simplified50.4%
Final simplification49.7%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -1.65e+69)
(not
(or (<= z -3.55e+61) (and (not (<= z -1.4e-25)) (<= z 6.2e+34)))))
(+ t (* (- t x) (/ (- a y) z)))
(+ x (* (- x t) (/ (- z y) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.65e+69) || !((z <= -3.55e+61) || (!(z <= -1.4e-25) && (z <= 6.2e+34)))) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((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) :: tmp
if ((z <= (-1.65d+69)) .or. (.not. (z <= (-3.55d+61)) .or. (.not. (z <= (-1.4d-25))) .and. (z <= 6.2d+34))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + ((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 tmp;
if ((z <= -1.65e+69) || !((z <= -3.55e+61) || (!(z <= -1.4e-25) && (z <= 6.2e+34)))) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((x - t) * ((z - y) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.65e+69) or not ((z <= -3.55e+61) or (not (z <= -1.4e-25) and (z <= 6.2e+34))): tmp = t + ((t - x) * ((a - y) / z)) else: tmp = x + ((x - t) * ((z - y) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.65e+69) || !((z <= -3.55e+61) || (!(z <= -1.4e-25) && (z <= 6.2e+34)))) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(x - t) * Float64(Float64(z - y) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.65e+69) || ~(((z <= -3.55e+61) || (~((z <= -1.4e-25)) && (z <= 6.2e+34))))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + ((x - t) * ((z - y) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.65e+69], N[Not[Or[LessEqual[z, -3.55e+61], And[N[Not[LessEqual[z, -1.4e-25]], $MachinePrecision], LessEqual[z, 6.2e+34]]]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+69} \lor \neg \left(z \leq -3.55 \cdot 10^{+61} \lor \neg \left(z \leq -1.4 \cdot 10^{-25}\right) \land z \leq 6.2 \cdot 10^{+34}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\
\end{array}
\end{array}
if z < -1.6499999999999999e69 or -3.55e61 < z < -1.39999999999999994e-25 or 6.19999999999999955e34 < z Initial program 61.0%
clear-num60.2%
un-div-inv60.2%
Applied egg-rr60.2%
Taylor expanded in z around inf 66.6%
associate--l+66.6%
associate-*r/66.6%
associate-*r/66.6%
mul-1-neg66.6%
div-sub66.6%
mul-1-neg66.6%
distribute-lft-out--66.6%
associate-*r/66.6%
mul-1-neg66.6%
unsub-neg66.6%
distribute-rgt-out--67.4%
*-lft-identity67.4%
times-frac79.2%
Simplified79.2%
if -1.6499999999999999e69 < z < -3.55e61 or -1.39999999999999994e-25 < z < 6.19999999999999955e34Initial program 89.4%
+-commutative89.4%
fma-define89.5%
Simplified89.5%
Taylor expanded in a around inf 81.6%
associate-/l*88.6%
Simplified88.6%
Final simplification83.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ y z) (- x t)))))
(if (<= z -1.42e+69)
t_1
(if (<= z -2.35e+51)
(+ x (* y (/ (- t x) a)))
(if (<= z -2e-20)
t_1
(if (<= z 6.2e+34)
(+ x (* (- x t) (/ (- z y) a)))
(+ t (* x (/ (- y a) z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((y / z) * (x - t));
double tmp;
if (z <= -1.42e+69) {
tmp = t_1;
} else if (z <= -2.35e+51) {
tmp = x + (y * ((t - x) / a));
} else if (z <= -2e-20) {
tmp = t_1;
} else if (z <= 6.2e+34) {
tmp = x + ((x - t) * ((z - y) / a));
} else {
tmp = t + (x * ((y - 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) :: t_1
real(8) :: tmp
t_1 = t + ((y / z) * (x - t))
if (z <= (-1.42d+69)) then
tmp = t_1
else if (z <= (-2.35d+51)) then
tmp = x + (y * ((t - x) / a))
else if (z <= (-2d-20)) then
tmp = t_1
else if (z <= 6.2d+34) then
tmp = x + ((x - t) * ((z - y) / a))
else
tmp = t + (x * ((y - a) / z))
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) * (x - t));
double tmp;
if (z <= -1.42e+69) {
tmp = t_1;
} else if (z <= -2.35e+51) {
tmp = x + (y * ((t - x) / a));
} else if (z <= -2e-20) {
tmp = t_1;
} else if (z <= 6.2e+34) {
tmp = x + ((x - t) * ((z - y) / a));
} else {
tmp = t + (x * ((y - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((y / z) * (x - t)) tmp = 0 if z <= -1.42e+69: tmp = t_1 elif z <= -2.35e+51: tmp = x + (y * ((t - x) / a)) elif z <= -2e-20: tmp = t_1 elif z <= 6.2e+34: tmp = x + ((x - t) * ((z - y) / a)) else: tmp = t + (x * ((y - a) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(y / z) * Float64(x - t))) tmp = 0.0 if (z <= -1.42e+69) tmp = t_1; elseif (z <= -2.35e+51) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (z <= -2e-20) tmp = t_1; elseif (z <= 6.2e+34) tmp = Float64(x + Float64(Float64(x - t) * Float64(Float64(z - y) / a))); else tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((y / z) * (x - t)); tmp = 0.0; if (z <= -1.42e+69) tmp = t_1; elseif (z <= -2.35e+51) tmp = x + (y * ((t - x) / a)); elseif (z <= -2e-20) tmp = t_1; elseif (z <= 6.2e+34) tmp = x + ((x - t) * ((z - y) / a)); else tmp = t + (x * ((y - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.42e+69], t$95$1, If[LessEqual[z, -2.35e+51], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-20], t$95$1, If[LessEqual[z, 6.2e+34], N[(x + N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -1.42 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{+51}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+34}:\\
\;\;\;\;x + \left(x - t\right) \cdot \frac{z - y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if z < -1.42e69 or -2.3500000000000001e51 < z < -1.99999999999999989e-20Initial program 64.0%
clear-num63.5%
un-div-inv63.5%
Applied egg-rr63.5%
Taylor expanded in z around inf 64.9%
associate--l+64.9%
associate-*r/64.9%
associate-*r/64.9%
mul-1-neg64.9%
div-sub64.9%
mul-1-neg64.9%
distribute-lft-out--64.9%
associate-*r/64.9%
mul-1-neg64.9%
unsub-neg64.9%
distribute-rgt-out--66.2%
*-lft-identity66.2%
times-frac74.6%
Simplified74.6%
Taylor expanded in y around inf 68.3%
if -1.42e69 < z < -2.3500000000000001e51Initial program 86.5%
+-commutative86.5%
fma-define86.5%
Simplified86.5%
Taylor expanded in z around 0 73.6%
associate-/l*86.4%
Simplified86.4%
if -1.99999999999999989e-20 < z < 6.19999999999999955e34Initial program 89.0%
+-commutative89.0%
fma-define89.1%
Simplified89.1%
Taylor expanded in a around inf 82.5%
associate-/l*88.1%
Simplified88.1%
if 6.19999999999999955e34 < z Initial program 57.3%
clear-num56.0%
un-div-inv56.0%
Applied egg-rr56.0%
Taylor expanded in z around inf 69.2%
associate--l+69.2%
associate-*r/69.2%
associate-*r/69.2%
mul-1-neg69.2%
div-sub69.2%
mul-1-neg69.2%
distribute-lft-out--69.2%
associate-*r/69.2%
mul-1-neg69.2%
unsub-neg69.2%
distribute-rgt-out--69.5%
*-lft-identity69.5%
times-frac86.2%
Simplified86.2%
Taylor expanded in t around 0 79.5%
neg-mul-179.5%
Simplified79.5%
Final simplification80.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ y z) (- x t)))))
(if (<= z -2.55e+69)
t_1
(if (<= z -1.35e+51)
(+ x (* y (/ (- t x) a)))
(if (or (<= z -6.5e-25) (not (<= z 6.8e-9)))
t_1
(+ x (/ (- t x) (/ a y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((y / z) * (x - t));
double tmp;
if (z <= -2.55e+69) {
tmp = t_1;
} else if (z <= -1.35e+51) {
tmp = x + (y * ((t - x) / a));
} else if ((z <= -6.5e-25) || !(z <= 6.8e-9)) {
tmp = t_1;
} else {
tmp = x + ((t - x) / (a / y));
}
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 / z) * (x - t))
if (z <= (-2.55d+69)) then
tmp = t_1
else if (z <= (-1.35d+51)) then
tmp = x + (y * ((t - x) / a))
else if ((z <= (-6.5d-25)) .or. (.not. (z <= 6.8d-9))) then
tmp = t_1
else
tmp = x + ((t - x) / (a / y))
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) * (x - t));
double tmp;
if (z <= -2.55e+69) {
tmp = t_1;
} else if (z <= -1.35e+51) {
tmp = x + (y * ((t - x) / a));
} else if ((z <= -6.5e-25) || !(z <= 6.8e-9)) {
tmp = t_1;
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((y / z) * (x - t)) tmp = 0 if z <= -2.55e+69: tmp = t_1 elif z <= -1.35e+51: tmp = x + (y * ((t - x) / a)) elif (z <= -6.5e-25) or not (z <= 6.8e-9): tmp = t_1 else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(y / z) * Float64(x - t))) tmp = 0.0 if (z <= -2.55e+69) tmp = t_1; elseif (z <= -1.35e+51) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif ((z <= -6.5e-25) || !(z <= 6.8e-9)) tmp = t_1; else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((y / z) * (x - t)); tmp = 0.0; if (z <= -2.55e+69) tmp = t_1; elseif (z <= -1.35e+51) tmp = x + (y * ((t - x) / a)); elseif ((z <= -6.5e-25) || ~((z <= 6.8e-9))) tmp = t_1; else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.55e+69], t$95$1, If[LessEqual[z, -1.35e+51], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -6.5e-25], N[Not[LessEqual[z, 6.8e-9]], $MachinePrecision]], t$95$1, N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -2.55 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+51}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-25} \lor \neg \left(z \leq 6.8 \cdot 10^{-9}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -2.54999999999999999e69 or -1.34999999999999996e51 < z < -6.5e-25 or 6.7999999999999997e-9 < z Initial program 61.7%
clear-num60.9%
un-div-inv60.9%
Applied egg-rr60.9%
Taylor expanded in z around inf 66.5%
associate--l+66.5%
associate-*r/66.5%
associate-*r/66.5%
mul-1-neg66.5%
div-sub66.5%
mul-1-neg66.5%
distribute-lft-out--66.5%
associate-*r/66.5%
mul-1-neg66.5%
unsub-neg66.5%
distribute-rgt-out--67.4%
*-lft-identity67.4%
times-frac79.1%
Simplified79.1%
Taylor expanded in y around inf 71.6%
if -2.54999999999999999e69 < z < -1.34999999999999996e51Initial program 86.5%
+-commutative86.5%
fma-define86.5%
Simplified86.5%
Taylor expanded in z around 0 73.6%
associate-/l*86.4%
Simplified86.4%
if -6.5e-25 < z < 6.7999999999999997e-9Initial program 88.8%
+-commutative88.8%
fma-define88.9%
Simplified88.9%
fma-undefine88.8%
*-commutative88.8%
associate-*l/89.8%
associate-*r/95.6%
clear-num95.6%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in z around 0 85.4%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ y z) (- x t)))))
(if (<= z -2.15e+69)
t_1
(if (<= z -1.35e+51)
(+ x (* y (/ (- t x) a)))
(if (<= z -1.1e-21)
t_1
(if (<= z 5.6e-6)
(+ x (/ (- t x) (/ a y)))
(+ t (* x (/ (- y a) z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((y / z) * (x - t));
double tmp;
if (z <= -2.15e+69) {
tmp = t_1;
} else if (z <= -1.35e+51) {
tmp = x + (y * ((t - x) / a));
} else if (z <= -1.1e-21) {
tmp = t_1;
} else if (z <= 5.6e-6) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t + (x * ((y - 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) :: t_1
real(8) :: tmp
t_1 = t + ((y / z) * (x - t))
if (z <= (-2.15d+69)) then
tmp = t_1
else if (z <= (-1.35d+51)) then
tmp = x + (y * ((t - x) / a))
else if (z <= (-1.1d-21)) then
tmp = t_1
else if (z <= 5.6d-6) then
tmp = x + ((t - x) / (a / y))
else
tmp = t + (x * ((y - a) / z))
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) * (x - t));
double tmp;
if (z <= -2.15e+69) {
tmp = t_1;
} else if (z <= -1.35e+51) {
tmp = x + (y * ((t - x) / a));
} else if (z <= -1.1e-21) {
tmp = t_1;
} else if (z <= 5.6e-6) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t + (x * ((y - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((y / z) * (x - t)) tmp = 0 if z <= -2.15e+69: tmp = t_1 elif z <= -1.35e+51: tmp = x + (y * ((t - x) / a)) elif z <= -1.1e-21: tmp = t_1 elif z <= 5.6e-6: tmp = x + ((t - x) / (a / y)) else: tmp = t + (x * ((y - a) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(y / z) * Float64(x - t))) tmp = 0.0 if (z <= -2.15e+69) tmp = t_1; elseif (z <= -1.35e+51) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (z <= -1.1e-21) tmp = t_1; elseif (z <= 5.6e-6) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((y / z) * (x - t)); tmp = 0.0; if (z <= -2.15e+69) tmp = t_1; elseif (z <= -1.35e+51) tmp = x + (y * ((t - x) / a)); elseif (z <= -1.1e-21) tmp = t_1; elseif (z <= 5.6e-6) tmp = x + ((t - x) / (a / y)); else tmp = t + (x * ((y - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.15e+69], t$95$1, If[LessEqual[z, -1.35e+51], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-21], t$95$1, If[LessEqual[z, 5.6e-6], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{+51}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-6}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if z < -2.14999999999999996e69 or -1.34999999999999996e51 < z < -1.1e-21Initial program 64.0%
clear-num63.5%
un-div-inv63.5%
Applied egg-rr63.5%
Taylor expanded in z around inf 64.9%
associate--l+64.9%
associate-*r/64.9%
associate-*r/64.9%
mul-1-neg64.9%
div-sub64.9%
mul-1-neg64.9%
distribute-lft-out--64.9%
associate-*r/64.9%
mul-1-neg64.9%
unsub-neg64.9%
distribute-rgt-out--66.2%
*-lft-identity66.2%
times-frac74.6%
Simplified74.6%
Taylor expanded in y around inf 68.3%
if -2.14999999999999996e69 < z < -1.34999999999999996e51Initial program 86.5%
+-commutative86.5%
fma-define86.5%
Simplified86.5%
Taylor expanded in z around 0 73.6%
associate-/l*86.4%
Simplified86.4%
if -1.1e-21 < z < 5.59999999999999975e-6Initial program 88.8%
+-commutative88.8%
fma-define88.9%
Simplified88.9%
fma-undefine88.8%
*-commutative88.8%
associate-*l/89.8%
associate-*r/95.6%
clear-num95.6%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in z around 0 85.4%
if 5.59999999999999975e-6 < z Initial program 58.7%
clear-num57.5%
un-div-inv57.5%
Applied egg-rr57.5%
Taylor expanded in z around inf 68.6%
associate--l+68.6%
associate-*r/68.6%
associate-*r/68.6%
mul-1-neg68.6%
div-sub68.6%
mul-1-neg68.6%
distribute-lft-out--68.6%
associate-*r/68.6%
mul-1-neg68.6%
unsub-neg68.6%
distribute-rgt-out--68.9%
*-lft-identity68.9%
times-frac85.0%
Simplified85.0%
Taylor expanded in t around 0 78.6%
neg-mul-178.6%
Simplified78.6%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* x (/ y a)))) (t_2 (* t (/ z (- z a)))))
(if (<= z -1.8e+129)
t_2
(if (<= z -5.6e-274)
t_1
(if (<= z 2.1e-222)
(* t (/ y (- a z)))
(if (<= z 1.18e+92) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (x * (y / a));
double t_2 = t * (z / (z - a));
double tmp;
if (z <= -1.8e+129) {
tmp = t_2;
} else if (z <= -5.6e-274) {
tmp = t_1;
} else if (z <= 2.1e-222) {
tmp = t * (y / (a - z));
} else if (z <= 1.18e+92) {
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 - (x * (y / a))
t_2 = t * (z / (z - a))
if (z <= (-1.8d+129)) then
tmp = t_2
else if (z <= (-5.6d-274)) then
tmp = t_1
else if (z <= 2.1d-222) then
tmp = t * (y / (a - z))
else if (z <= 1.18d+92) 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 - (x * (y / a));
double t_2 = t * (z / (z - a));
double tmp;
if (z <= -1.8e+129) {
tmp = t_2;
} else if (z <= -5.6e-274) {
tmp = t_1;
} else if (z <= 2.1e-222) {
tmp = t * (y / (a - z));
} else if (z <= 1.18e+92) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (x * (y / a)) t_2 = t * (z / (z - a)) tmp = 0 if z <= -1.8e+129: tmp = t_2 elif z <= -5.6e-274: tmp = t_1 elif z <= 2.1e-222: tmp = t * (y / (a - z)) elif z <= 1.18e+92: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(x * Float64(y / a))) t_2 = Float64(t * Float64(z / Float64(z - a))) tmp = 0.0 if (z <= -1.8e+129) tmp = t_2; elseif (z <= -5.6e-274) tmp = t_1; elseif (z <= 2.1e-222) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 1.18e+92) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (x * (y / a)); t_2 = t * (z / (z - a)); tmp = 0.0; if (z <= -1.8e+129) tmp = t_2; elseif (z <= -5.6e-274) tmp = t_1; elseif (z <= 2.1e-222) tmp = t * (y / (a - z)); elseif (z <= 1.18e+92) 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[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+129], t$95$2, If[LessEqual[z, -5.6e-274], t$95$1, If[LessEqual[z, 2.1e-222], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.18e+92], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - x \cdot \frac{y}{a}\\
t_2 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.18 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.8000000000000001e129 or 1.18e92 < z Initial program 53.1%
clear-num52.3%
un-div-inv52.2%
Applied egg-rr52.2%
Taylor expanded in y around 0 28.2%
associate-*r/44.8%
neg-mul-144.8%
unsub-neg44.8%
Simplified44.8%
Taylor expanded in x around 0 34.0%
mul-1-neg34.0%
associate-/l*58.3%
distribute-rgt-neg-in58.3%
distribute-frac-neg258.3%
sub-neg58.3%
distribute-neg-in58.3%
remove-double-neg58.3%
Simplified58.3%
if -1.8000000000000001e129 < z < -5.5999999999999995e-274 or 2.0999999999999999e-222 < z < 1.18e92Initial program 86.7%
Taylor expanded in t around 0 51.7%
mul-1-neg51.7%
associate-/l*57.3%
distribute-rgt-neg-in57.3%
mul-1-neg57.3%
associate-*r/57.3%
neg-mul-157.3%
neg-sub057.3%
sub-neg57.3%
+-commutative57.3%
associate--r+57.3%
neg-sub057.3%
remove-double-neg57.3%
Simplified57.3%
Taylor expanded in z around 0 48.8%
mul-1-neg48.8%
unsub-neg48.8%
associate-/l*52.2%
Simplified52.2%
if -5.5999999999999995e-274 < z < 2.0999999999999999e-222Initial program 83.1%
+-commutative83.1%
fma-define83.1%
Simplified83.1%
Taylor expanded in y around -inf 67.0%
Taylor expanded in t around inf 63.6%
associate-/l*66.7%
Simplified66.7%
Final simplification56.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* x (/ y a)))))
(if (<= z -3.5e+130)
t
(if (<= z -3e-275)
t_1
(if (<= z 3.6e-222) (* t (/ y (- a z))) (if (<= z 1.15e+92) t_1 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (x * (y / a));
double tmp;
if (z <= -3.5e+130) {
tmp = t;
} else if (z <= -3e-275) {
tmp = t_1;
} else if (z <= 3.6e-222) {
tmp = t * (y / (a - z));
} else if (z <= 1.15e+92) {
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 = x - (x * (y / a))
if (z <= (-3.5d+130)) then
tmp = t
else if (z <= (-3d-275)) then
tmp = t_1
else if (z <= 3.6d-222) then
tmp = t * (y / (a - z))
else if (z <= 1.15d+92) 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 = x - (x * (y / a));
double tmp;
if (z <= -3.5e+130) {
tmp = t;
} else if (z <= -3e-275) {
tmp = t_1;
} else if (z <= 3.6e-222) {
tmp = t * (y / (a - z));
} else if (z <= 1.15e+92) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (x * (y / a)) tmp = 0 if z <= -3.5e+130: tmp = t elif z <= -3e-275: tmp = t_1 elif z <= 3.6e-222: tmp = t * (y / (a - z)) elif z <= 1.15e+92: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(x * Float64(y / a))) tmp = 0.0 if (z <= -3.5e+130) tmp = t; elseif (z <= -3e-275) tmp = t_1; elseif (z <= 3.6e-222) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 1.15e+92) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (x * (y / a)); tmp = 0.0; if (z <= -3.5e+130) tmp = t; elseif (z <= -3e-275) tmp = t_1; elseif (z <= 3.6e-222) tmp = t * (y / (a - z)); elseif (z <= 1.15e+92) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+130], t, If[LessEqual[z, -3e-275], t$95$1, If[LessEqual[z, 3.6e-222], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+92], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - x \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+130}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-222}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.5000000000000001e130 or 1.14999999999999999e92 < z Initial program 53.1%
+-commutative53.1%
fma-define53.2%
Simplified53.2%
Taylor expanded in z around inf 54.4%
if -3.5000000000000001e130 < z < -3e-275 or 3.59999999999999974e-222 < z < 1.14999999999999999e92Initial program 86.7%
Taylor expanded in t around 0 51.7%
mul-1-neg51.7%
associate-/l*57.3%
distribute-rgt-neg-in57.3%
mul-1-neg57.3%
associate-*r/57.3%
neg-mul-157.3%
neg-sub057.3%
sub-neg57.3%
+-commutative57.3%
associate--r+57.3%
neg-sub057.3%
remove-double-neg57.3%
Simplified57.3%
Taylor expanded in z around 0 48.8%
mul-1-neg48.8%
unsub-neg48.8%
associate-/l*52.2%
Simplified52.2%
if -3e-275 < z < 3.59999999999999974e-222Initial program 83.1%
+-commutative83.1%
fma-define83.1%
Simplified83.1%
Taylor expanded in y around -inf 67.0%
Taylor expanded in t around inf 63.6%
associate-/l*66.7%
Simplified66.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.5e+69) (not (<= z 5e-6))) (* t (/ (- y z) (- a z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.5e+69) || !(z <= 5e-6)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (a / y));
}
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.5d+69)) .or. (.not. (z <= 5d-6))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) / (a / y))
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.5e+69) || !(z <= 5e-6)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.5e+69) or not (z <= 5e-6): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.5e+69) || !(z <= 5e-6)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.5e+69) || ~((z <= 5e-6))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.5e+69], N[Not[LessEqual[z, 5e-6]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+69} \lor \neg \left(z \leq 5 \cdot 10^{-6}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -1.49999999999999992e69 or 5.00000000000000041e-6 < z Initial program 57.4%
+-commutative57.4%
fma-define57.3%
Simplified57.3%
Taylor expanded in t around inf 59.7%
div-sub59.8%
Simplified59.8%
if -1.49999999999999992e69 < z < 5.00000000000000041e-6Initial program 89.3%
+-commutative89.3%
fma-define89.4%
Simplified89.4%
fma-undefine89.3%
*-commutative89.3%
associate-*l/88.0%
associate-*r/94.9%
clear-num94.9%
un-div-inv94.9%
Applied egg-rr94.9%
Taylor expanded in z around 0 80.7%
Final simplification70.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+69) (not (<= z 1.25e-5))) (* 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 <= -1.45e+69) || !(z <= 1.25e-5)) {
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 <= (-1.45d+69)) .or. (.not. (z <= 1.25d-5))) 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 <= -1.45e+69) || !(z <= 1.25e-5)) {
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 <= -1.45e+69) or not (z <= 1.25e-5): 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 <= -1.45e+69) || !(z <= 1.25e-5)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+69) || ~((z <= 1.25e-5))) 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, -1.45e+69], N[Not[LessEqual[z, 1.25e-5]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+69} \lor \neg \left(z \leq 1.25 \cdot 10^{-5}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -1.4499999999999999e69 or 1.25000000000000006e-5 < z Initial program 57.4%
+-commutative57.4%
fma-define57.3%
Simplified57.3%
Taylor expanded in t around inf 59.7%
div-sub59.8%
Simplified59.8%
if -1.4499999999999999e69 < z < 1.25000000000000006e-5Initial program 89.3%
+-commutative89.3%
fma-define89.4%
Simplified89.4%
Taylor expanded in z around 0 76.0%
associate-/l*76.4%
Simplified76.4%
Final simplification68.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -380.0) (not (<= x 2.2e+118))) (- x (* x (/ y a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -380.0) || !(x <= 2.2e+118)) {
tmp = x - (x * (y / a));
} 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 <= (-380.0d0)) .or. (.not. (x <= 2.2d+118))) then
tmp = x - (x * (y / a))
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 <= -380.0) || !(x <= 2.2e+118)) {
tmp = x - (x * (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -380.0) or not (x <= 2.2e+118): tmp = x - (x * (y / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -380.0) || !(x <= 2.2e+118)) tmp = Float64(x - Float64(x * Float64(y / a))); 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 <= -380.0) || ~((x <= 2.2e+118))) tmp = x - (x * (y / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -380.0], N[Not[LessEqual[x, 2.2e+118]], $MachinePrecision]], N[(x - N[(x * N[(y / a), $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 -380 \lor \neg \left(x \leq 2.2 \cdot 10^{+118}\right):\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -380 or 2.19999999999999986e118 < x Initial program 70.8%
Taylor expanded in t around 0 52.1%
mul-1-neg52.1%
associate-/l*62.7%
distribute-rgt-neg-in62.7%
mul-1-neg62.7%
associate-*r/62.7%
neg-mul-162.7%
neg-sub062.7%
sub-neg62.7%
+-commutative62.7%
associate--r+62.7%
neg-sub062.7%
remove-double-neg62.7%
Simplified62.7%
Taylor expanded in z around 0 52.7%
mul-1-neg52.7%
unsub-neg52.7%
associate-/l*57.0%
Simplified57.0%
if -380 < x < 2.19999999999999986e118Initial program 76.8%
+-commutative76.8%
fma-define76.9%
Simplified76.9%
Taylor expanded in t around inf 72.1%
div-sub72.2%
Simplified72.2%
Final simplification65.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.8e+72) x (if (<= a 3.6e+56) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e+72) {
tmp = x;
} else if (a <= 3.6e+56) {
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 <= (-3.8d+72)) then
tmp = x
else if (a <= 3.6d+56) 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 <= -3.8e+72) {
tmp = x;
} else if (a <= 3.6e+56) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e+72: tmp = x elif a <= 3.6e+56: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e+72) tmp = x; elseif (a <= 3.6e+56) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.8e+72) tmp = x; elseif (a <= 3.6e+56) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e+72], x, If[LessEqual[a, 3.6e+56], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{+72}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+56}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.80000000000000006e72 or 3.59999999999999998e56 < a Initial program 86.1%
+-commutative86.1%
fma-define86.2%
Simplified86.2%
Taylor expanded in a around inf 56.6%
if -3.80000000000000006e72 < a < 3.59999999999999998e56Initial program 67.6%
+-commutative67.6%
fma-define67.6%
Simplified67.6%
Taylor expanded in z around inf 34.8%
(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 74.3%
+-commutative74.3%
fma-define74.4%
Simplified74.4%
Taylor expanded in z around inf 26.6%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 74.3%
Taylor expanded in t around 0 37.4%
mul-1-neg37.4%
associate-/l*41.8%
distribute-rgt-neg-in41.8%
mul-1-neg41.8%
associate-*r/41.8%
neg-mul-141.8%
neg-sub041.8%
sub-neg41.8%
+-commutative41.8%
associate--r+41.8%
neg-sub041.8%
remove-double-neg41.8%
Simplified41.8%
Taylor expanded in z around inf 2.9%
distribute-rgt1-in2.9%
metadata-eval2.9%
mul0-lft2.9%
Simplified2.9%
herbie shell --seed 2024111
(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)))))