
(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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{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-271) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(+ t (/ (* (- t x) (- a y)) 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-271) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -2e-271) || !(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) * Float64(a - y)) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-271], 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] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-271} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999993e-271 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 76.6%
+-commutative76.6%
*-commutative76.6%
associate-/l*90.2%
fma-define90.2%
Simplified90.2%
if -1.99999999999999993e-271 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.1%
+-commutative4.1%
*-commutative4.1%
associate-/l*4.1%
fma-define4.1%
Simplified4.1%
Taylor expanded in z around inf 99.6%
associate--l+99.6%
associate-*r/99.6%
associate-*r/99.6%
mul-1-neg99.6%
div-sub99.6%
mul-1-neg99.6%
distribute-lft-out--99.6%
associate-*r/99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.6%
Simplified99.6%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (- y z) (/ (- t x) (- z a)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-271)
t_2
(if (<= t_2 0.0) (+ t (/ (* (- t x) (- a y)) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y - z) * ((t - x) / (z - a)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -2e-271) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y - z) * ((t - x) / (z - a)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -2e-271) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y - z) * ((t - x) / (z - a))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -2e-271: tmp = t_2 elif t_2 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(z - a)))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -2e-271) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y - z) * ((t - x) / (z - a))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -2e-271) tmp = t_2; elseif (t_2 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-271], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \left(y - z\right) \cdot \frac{t - x}{z - a}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-271}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 67.0%
associate-/l*86.7%
Simplified86.7%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999993e-271Initial program 94.3%
if -1.99999999999999993e-271 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.1%
+-commutative4.1%
*-commutative4.1%
associate-/l*4.1%
fma-define4.1%
Simplified4.1%
Taylor expanded in z around inf 99.6%
associate--l+99.6%
associate-*r/99.6%
associate-*r/99.6%
mul-1-neg99.6%
div-sub99.6%
mul-1-neg99.6%
distribute-lft-out--99.6%
associate-*r/99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.6%
Simplified99.6%
Final simplification90.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -2e-271) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (/ (* (- t x) (- a y)) 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-271) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / 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-271)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + (((t - x) * (a - y)) / 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-271) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / 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-271) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -2e-271) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / 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-271) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-271], 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[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-271} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999993e-271 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 76.6%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in y around 0 77.1%
mul-1-neg77.1%
associate-/l*82.6%
distribute-lft-neg-out82.6%
+-commutative82.6%
div-sub82.6%
distribute-rgt-out85.7%
sub-neg85.7%
associate-/r/90.1%
Simplified90.1%
if -1.99999999999999993e-271 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.1%
+-commutative4.1%
*-commutative4.1%
associate-/l*4.1%
fma-define4.1%
Simplified4.1%
Taylor expanded in z around inf 99.6%
associate--l+99.6%
associate-*r/99.6%
associate-*r/99.6%
mul-1-neg99.6%
div-sub99.6%
mul-1-neg99.6%
distribute-lft-out--99.6%
associate-*r/99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.6%
Simplified99.6%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.85e+228)
x
(if (<= a -3.8e-119)
(+ x t)
(if (<= a 5.8e-279)
(* x (/ y z))
(if (<= a 2.9e+76) (* t (+ 1.0 (/ a z))) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.85e+228) {
tmp = x;
} else if (a <= -3.8e-119) {
tmp = x + t;
} else if (a <= 5.8e-279) {
tmp = x * (y / z);
} else if (a <= 2.9e+76) {
tmp = t * (1.0 + (a / z));
} 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 <= (-2.85d+228)) then
tmp = x
else if (a <= (-3.8d-119)) then
tmp = x + t
else if (a <= 5.8d-279) then
tmp = x * (y / z)
else if (a <= 2.9d+76) then
tmp = t * (1.0d0 + (a / z))
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 <= -2.85e+228) {
tmp = x;
} else if (a <= -3.8e-119) {
tmp = x + t;
} else if (a <= 5.8e-279) {
tmp = x * (y / z);
} else if (a <= 2.9e+76) {
tmp = t * (1.0 + (a / z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.85e+228: tmp = x elif a <= -3.8e-119: tmp = x + t elif a <= 5.8e-279: tmp = x * (y / z) elif a <= 2.9e+76: tmp = t * (1.0 + (a / z)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.85e+228) tmp = x; elseif (a <= -3.8e-119) tmp = Float64(x + t); elseif (a <= 5.8e-279) tmp = Float64(x * Float64(y / z)); elseif (a <= 2.9e+76) tmp = Float64(t * Float64(1.0 + Float64(a / z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.85e+228) tmp = x; elseif (a <= -3.8e-119) tmp = x + t; elseif (a <= 5.8e-279) tmp = x * (y / z); elseif (a <= 2.9e+76) tmp = t * (1.0 + (a / z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.85e+228], x, If[LessEqual[a, -3.8e-119], N[(x + t), $MachinePrecision], If[LessEqual[a, 5.8e-279], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.9e+76], N[(t * N[(1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.85 \cdot 10^{+228}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -3.8 \cdot 10^{-119}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-279}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+76}:\\
\;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.8500000000000001e228 or 2.9000000000000002e76 < a Initial program 72.1%
+-commutative72.1%
*-commutative72.1%
associate-/l*98.3%
fma-define98.3%
Simplified98.3%
Taylor expanded in a around inf 65.0%
if -2.8500000000000001e228 < a < -3.79999999999999975e-119Initial program 78.0%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in t around inf 67.2%
Taylor expanded in z around inf 39.6%
if -3.79999999999999975e-119 < a < 5.8e-279Initial program 58.4%
+-commutative58.4%
*-commutative58.4%
associate-/l*67.4%
fma-define67.3%
Simplified67.3%
Taylor expanded in z around inf 81.7%
associate--l+81.7%
associate-*r/81.7%
associate-*r/81.7%
mul-1-neg81.7%
div-sub81.7%
mul-1-neg81.7%
distribute-lft-out--81.7%
associate-*r/81.7%
mul-1-neg81.7%
unsub-neg81.7%
distribute-rgt-out--81.7%
Simplified81.7%
Taylor expanded in t around 0 41.5%
Taylor expanded in y around inf 38.5%
associate-/l*50.3%
Simplified50.3%
if 5.8e-279 < a < 2.9000000000000002e76Initial program 71.0%
+-commutative71.0%
*-commutative71.0%
associate-/l*78.9%
fma-define78.9%
Simplified78.9%
Taylor expanded in y around 0 25.2%
mul-1-neg25.2%
associate-/l*25.2%
distribute-lft-neg-out25.2%
+-commutative25.2%
*-commutative25.2%
fma-define25.4%
Simplified25.4%
Taylor expanded in z around -inf 40.7%
mul-1-neg40.7%
unsub-neg40.7%
distribute-lft-out--40.7%
Simplified40.7%
Taylor expanded in t around inf 36.9%
cancel-sign-sub-inv36.9%
metadata-eval36.9%
*-lft-identity36.9%
+-commutative36.9%
Simplified36.9%
Final simplification46.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.85e+228)
x
(if (<= a -5.8e-118)
(+ x t)
(if (<= a 1.9e-59) (* x (/ y z)) (if (<= a 1.2e+71) (* t (/ y a)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.85e+228) {
tmp = x;
} else if (a <= -5.8e-118) {
tmp = x + t;
} else if (a <= 1.9e-59) {
tmp = x * (y / z);
} else if (a <= 1.2e+71) {
tmp = t * (y / a);
} 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 <= (-2.85d+228)) then
tmp = x
else if (a <= (-5.8d-118)) then
tmp = x + t
else if (a <= 1.9d-59) then
tmp = x * (y / z)
else if (a <= 1.2d+71) then
tmp = t * (y / a)
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 <= -2.85e+228) {
tmp = x;
} else if (a <= -5.8e-118) {
tmp = x + t;
} else if (a <= 1.9e-59) {
tmp = x * (y / z);
} else if (a <= 1.2e+71) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.85e+228: tmp = x elif a <= -5.8e-118: tmp = x + t elif a <= 1.9e-59: tmp = x * (y / z) elif a <= 1.2e+71: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.85e+228) tmp = x; elseif (a <= -5.8e-118) tmp = Float64(x + t); elseif (a <= 1.9e-59) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.2e+71) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.85e+228) tmp = x; elseif (a <= -5.8e-118) tmp = x + t; elseif (a <= 1.9e-59) tmp = x * (y / z); elseif (a <= 1.2e+71) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.85e+228], x, If[LessEqual[a, -5.8e-118], N[(x + t), $MachinePrecision], If[LessEqual[a, 1.9e-59], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e+71], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.85 \cdot 10^{+228}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-118}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-59}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+71}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.8500000000000001e228 or 1.1999999999999999e71 < a Initial program 71.5%
+-commutative71.5%
*-commutative71.5%
associate-/l*98.4%
fma-define98.4%
Simplified98.4%
Taylor expanded in a around inf 63.1%
if -2.8500000000000001e228 < a < -5.79999999999999961e-118Initial program 78.0%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in t around inf 67.2%
Taylor expanded in z around inf 39.6%
if -5.79999999999999961e-118 < a < 1.89999999999999992e-59Initial program 65.2%
+-commutative65.2%
*-commutative65.2%
associate-/l*72.3%
fma-define72.2%
Simplified72.2%
Taylor expanded in z around inf 84.0%
associate--l+84.0%
associate-*r/84.0%
associate-*r/84.0%
mul-1-neg84.0%
div-sub84.0%
mul-1-neg84.0%
distribute-lft-out--84.0%
associate-*r/84.0%
mul-1-neg84.0%
unsub-neg84.0%
distribute-rgt-out--84.0%
Simplified84.0%
Taylor expanded in t around 0 37.5%
Taylor expanded in y around inf 35.3%
associate-/l*41.9%
Simplified41.9%
if 1.89999999999999992e-59 < a < 1.1999999999999999e71Initial program 71.7%
+-commutative71.7%
*-commutative71.7%
associate-/l*81.2%
fma-define81.3%
Simplified81.3%
Taylor expanded in t around inf 71.0%
Taylor expanded in z around 0 41.5%
associate-/l*41.6%
Simplified41.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- t x) (/ a y)))))
(if (<= a -7.2e-37)
t_1
(if (<= a 8.4e-60)
(+ t (/ (* y (- x t)) z))
(if (<= a 2.7e+88) (/ t (/ (- a z) (- y z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / y));
double tmp;
if (a <= -7.2e-37) {
tmp = t_1;
} else if (a <= 8.4e-60) {
tmp = t + ((y * (x - t)) / z);
} else if (a <= 2.7e+88) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((t - x) / (a / y))
if (a <= (-7.2d-37)) then
tmp = t_1
else if (a <= 8.4d-60) then
tmp = t + ((y * (x - t)) / z)
else if (a <= 2.7d+88) then
tmp = t / ((a - z) / (y - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / y));
double tmp;
if (a <= -7.2e-37) {
tmp = t_1;
} else if (a <= 8.4e-60) {
tmp = t + ((y * (x - t)) / z);
} else if (a <= 2.7e+88) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) / (a / y)) tmp = 0 if a <= -7.2e-37: tmp = t_1 elif a <= 8.4e-60: tmp = t + ((y * (x - t)) / z) elif a <= 2.7e+88: tmp = t / ((a - z) / (y - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) / Float64(a / y))) tmp = 0.0 if (a <= -7.2e-37) tmp = t_1; elseif (a <= 8.4e-60) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); elseif (a <= 2.7e+88) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) / (a / y)); tmp = 0.0; if (a <= -7.2e-37) tmp = t_1; elseif (a <= 8.4e-60) tmp = t + ((y * (x - t)) / z); elseif (a <= 2.7e+88) tmp = t / ((a - z) / (y - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.2e-37], t$95$1, If[LessEqual[a, 8.4e-60], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e+88], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -7.2 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8.4 \cdot 10^{-60}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{+88}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.20000000000000014e-37 or 2.70000000000000016e88 < a Initial program 73.7%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in y around 0 79.6%
mul-1-neg79.6%
associate-/l*91.5%
distribute-lft-neg-out91.5%
+-commutative91.5%
div-sub91.5%
distribute-rgt-out91.5%
sub-neg91.5%
associate-/r/93.5%
Simplified93.5%
Taylor expanded in z around 0 73.7%
if -7.20000000000000014e-37 < a < 8.39999999999999964e-60Initial program 67.8%
+-commutative67.8%
*-commutative67.8%
associate-/l*73.1%
fma-define73.1%
Simplified73.1%
Taylor expanded in z around inf 82.4%
associate--l+82.4%
associate-*r/82.4%
associate-*r/82.4%
mul-1-neg82.4%
div-sub82.5%
mul-1-neg82.5%
distribute-lft-out--82.5%
associate-*r/82.5%
mul-1-neg82.5%
unsub-neg82.5%
distribute-rgt-out--82.5%
Simplified82.5%
Taylor expanded in y around inf 79.8%
if 8.39999999999999964e-60 < a < 2.70000000000000016e88Initial program 70.4%
+-commutative70.4%
*-commutative70.4%
associate-/l*82.4%
fma-define82.4%
Simplified82.4%
Taylor expanded in t around inf 72.8%
sub-div72.8%
frac-2neg72.8%
sub-neg72.8%
distribute-neg-in72.8%
add-sqr-sqrt50.5%
sqrt-unprod54.5%
sqr-neg54.5%
sqrt-unprod14.9%
add-sqr-sqrt46.5%
add-sqr-sqrt31.6%
sqrt-unprod47.6%
sqr-neg47.6%
sqrt-unprod22.1%
add-sqr-sqrt72.8%
sub-neg72.8%
distribute-neg-in72.8%
add-sqr-sqrt50.5%
sqrt-unprod51.2%
sqr-neg51.2%
sqrt-unprod9.9%
add-sqr-sqrt41.6%
add-sqr-sqrt31.7%
sqrt-unprod47.9%
sqr-neg47.9%
sqrt-unprod22.1%
add-sqr-sqrt72.8%
Applied egg-rr72.8%
+-commutative72.8%
unsub-neg72.8%
neg-mul-172.8%
+-commutative72.8%
neg-mul-172.8%
unsub-neg72.8%
Simplified72.8%
clear-num72.7%
un-div-inv72.8%
Applied egg-rr72.8%
Final simplification76.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- t x) (/ a y)))))
(if (<= a -7.2e-40)
t_1
(if (<= a 2.2e-59)
(+ t (/ (* y (- x t)) z))
(if (<= a 1.1e+91) (* t (/ (- y z) (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / y));
double tmp;
if (a <= -7.2e-40) {
tmp = t_1;
} else if (a <= 2.2e-59) {
tmp = t + ((y * (x - t)) / z);
} else if (a <= 1.1e+91) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((t - x) / (a / y))
if (a <= (-7.2d-40)) then
tmp = t_1
else if (a <= 2.2d-59) then
tmp = t + ((y * (x - t)) / z)
else if (a <= 1.1d+91) then
tmp = t * ((y - z) / (a - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / y));
double tmp;
if (a <= -7.2e-40) {
tmp = t_1;
} else if (a <= 2.2e-59) {
tmp = t + ((y * (x - t)) / z);
} else if (a <= 1.1e+91) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) / (a / y)) tmp = 0 if a <= -7.2e-40: tmp = t_1 elif a <= 2.2e-59: tmp = t + ((y * (x - t)) / z) elif a <= 1.1e+91: tmp = t * ((y - z) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) / Float64(a / y))) tmp = 0.0 if (a <= -7.2e-40) tmp = t_1; elseif (a <= 2.2e-59) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); elseif (a <= 1.1e+91) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) / (a / y)); tmp = 0.0; if (a <= -7.2e-40) tmp = t_1; elseif (a <= 2.2e-59) tmp = t + ((y * (x - t)) / z); elseif (a <= 1.1e+91) tmp = t * ((y - z) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7.2e-40], t$95$1, If[LessEqual[a, 2.2e-59], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e+91], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -7.2 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-59}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{+91}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.2e-40 or 1.1e91 < a Initial program 73.7%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in y around 0 79.6%
mul-1-neg79.6%
associate-/l*91.5%
distribute-lft-neg-out91.5%
+-commutative91.5%
div-sub91.5%
distribute-rgt-out91.5%
sub-neg91.5%
associate-/r/93.5%
Simplified93.5%
Taylor expanded in z around 0 73.7%
if -7.2e-40 < a < 2.1999999999999999e-59Initial program 67.8%
+-commutative67.8%
*-commutative67.8%
associate-/l*73.1%
fma-define73.1%
Simplified73.1%
Taylor expanded in z around inf 82.4%
associate--l+82.4%
associate-*r/82.4%
associate-*r/82.4%
mul-1-neg82.4%
div-sub82.5%
mul-1-neg82.5%
distribute-lft-out--82.5%
associate-*r/82.5%
mul-1-neg82.5%
unsub-neg82.5%
distribute-rgt-out--82.5%
Simplified82.5%
Taylor expanded in y around inf 79.8%
if 2.1999999999999999e-59 < a < 1.1e91Initial program 70.4%
+-commutative70.4%
*-commutative70.4%
associate-/l*82.4%
fma-define82.4%
Simplified82.4%
Taylor expanded in t around inf 72.8%
sub-div72.8%
frac-2neg72.8%
sub-neg72.8%
distribute-neg-in72.8%
add-sqr-sqrt50.5%
sqrt-unprod54.5%
sqr-neg54.5%
sqrt-unprod14.9%
add-sqr-sqrt46.5%
add-sqr-sqrt31.6%
sqrt-unprod47.6%
sqr-neg47.6%
sqrt-unprod22.1%
add-sqr-sqrt72.8%
sub-neg72.8%
distribute-neg-in72.8%
add-sqr-sqrt50.5%
sqrt-unprod51.2%
sqr-neg51.2%
sqrt-unprod9.9%
add-sqr-sqrt41.6%
add-sqr-sqrt31.7%
sqrt-unprod47.9%
sqr-neg47.9%
sqrt-unprod22.1%
add-sqr-sqrt72.8%
Applied egg-rr72.8%
+-commutative72.8%
unsub-neg72.8%
neg-mul-172.8%
+-commutative72.8%
neg-mul-172.8%
unsub-neg72.8%
Simplified72.8%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.5e-151) (not (<= a 2.6e-99))) (- x (* (- y z) (/ (- t x) (- z a)))) (+ t (/ (* (- t x) (- a y)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.5e-151) || !(a <= 2.6e-99)) {
tmp = x - ((y - z) * ((t - x) / (z - a)));
} else {
tmp = t + (((t - x) * (a - y)) / 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 ((a <= (-6.5d-151)) .or. (.not. (a <= 2.6d-99))) then
tmp = x - ((y - z) * ((t - x) / (z - a)))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.5e-151) || !(a <= 2.6e-99)) {
tmp = x - ((y - z) * ((t - x) / (z - a)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.5e-151) or not (a <= 2.6e-99): tmp = x - ((y - z) * ((t - x) / (z - a))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.5e-151) || !(a <= 2.6e-99)) tmp = Float64(x - Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(z - a)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6.5e-151) || ~((a <= 2.6e-99))) tmp = x - ((y - z) * ((t - x) / (z - a))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.5e-151], N[Not[LessEqual[a, 2.6e-99]], $MachinePrecision]], N[(x - N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-151} \lor \neg \left(a \leq 2.6 \cdot 10^{-99}\right):\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{t - x}{z - a}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if a < -6.4999999999999994e-151 or 2.60000000000000005e-99 < a Initial program 74.4%
associate-/l*86.9%
Simplified86.9%
if -6.4999999999999994e-151 < a < 2.60000000000000005e-99Initial program 62.7%
+-commutative62.7%
*-commutative62.7%
associate-/l*69.0%
fma-define68.9%
Simplified68.9%
Taylor expanded in z around inf 89.4%
associate--l+89.4%
associate-*r/89.4%
associate-*r/89.4%
mul-1-neg89.4%
div-sub89.4%
mul-1-neg89.4%
distribute-lft-out--89.4%
associate-*r/89.4%
mul-1-neg89.4%
unsub-neg89.4%
distribute-rgt-out--89.4%
Simplified89.4%
Final simplification87.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.05e-66) (not (<= a 3.3e-5))) (+ x (* t (/ (- y z) (- a z)))) (+ t (/ (* (- t x) (- a y)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.05e-66) || !(a <= 3.3e-5)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / 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 ((a <= (-2.05d-66)) .or. (.not. (a <= 3.3d-5))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.05e-66) || !(a <= 3.3e-5)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.05e-66) or not (a <= 3.3e-5): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.05e-66) || !(a <= 3.3e-5)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.05e-66) || ~((a <= 3.3e-5))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.05e-66], N[Not[LessEqual[a, 3.3e-5]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{-66} \lor \neg \left(a \leq 3.3 \cdot 10^{-5}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if a < -2.04999999999999999e-66 or 3.3000000000000003e-5 < a Initial program 74.4%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in t around inf 71.2%
associate-/l*83.3%
Simplified83.3%
if -2.04999999999999999e-66 < a < 3.3000000000000003e-5Initial program 66.1%
+-commutative66.1%
*-commutative66.1%
associate-/l*72.2%
fma-define72.1%
Simplified72.1%
Taylor expanded in z around inf 80.8%
associate--l+80.8%
associate-*r/80.8%
associate-*r/80.8%
mul-1-neg80.8%
div-sub81.6%
mul-1-neg81.6%
distribute-lft-out--81.6%
associate-*r/81.6%
mul-1-neg81.6%
unsub-neg81.6%
distribute-rgt-out--81.6%
Simplified81.6%
Final simplification82.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.6e-67) (not (<= a 2.75e-5))) (+ x (* t (/ (- y z) (- a z)))) (+ t (/ (* y (- x t)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.6e-67) || !(a <= 2.75e-5)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + ((y * (x - t)) / 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 ((a <= (-4.6d-67)) .or. (.not. (a <= 2.75d-5))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t + ((y * (x - t)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.6e-67) || !(a <= 2.75e-5)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t + ((y * (x - t)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.6e-67) or not (a <= 2.75e-5): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t + ((y * (x - t)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.6e-67) || !(a <= 2.75e-5)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.6e-67) || ~((a <= 2.75e-5))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t + ((y * (x - t)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.6e-67], N[Not[LessEqual[a, 2.75e-5]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{-67} \lor \neg \left(a \leq 2.75 \cdot 10^{-5}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\end{array}
\end{array}
if a < -4.6000000000000001e-67 or 2.7500000000000001e-5 < a Initial program 74.4%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in t around inf 71.2%
associate-/l*83.3%
Simplified83.3%
if -4.6000000000000001e-67 < a < 2.7500000000000001e-5Initial program 66.1%
+-commutative66.1%
*-commutative66.1%
associate-/l*72.2%
fma-define72.1%
Simplified72.1%
Taylor expanded in z around inf 80.8%
associate--l+80.8%
associate-*r/80.8%
associate-*r/80.8%
mul-1-neg80.8%
div-sub81.6%
mul-1-neg81.6%
distribute-lft-out--81.6%
associate-*r/81.6%
mul-1-neg81.6%
unsub-neg81.6%
distribute-rgt-out--81.6%
Simplified81.6%
Taylor expanded in y around inf 78.1%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.35e+30) x (if (<= a 3.6e-74) t (if (<= a 4.2e+71) (* t (/ y a)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.35e+30) {
tmp = x;
} else if (a <= 3.6e-74) {
tmp = t;
} else if (a <= 4.2e+71) {
tmp = t * (y / a);
} 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.35d+30)) then
tmp = x
else if (a <= 3.6d-74) then
tmp = t
else if (a <= 4.2d+71) then
tmp = t * (y / a)
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.35e+30) {
tmp = x;
} else if (a <= 3.6e-74) {
tmp = t;
} else if (a <= 4.2e+71) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.35e+30: tmp = x elif a <= 3.6e-74: tmp = t elif a <= 4.2e+71: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.35e+30) tmp = x; elseif (a <= 3.6e-74) tmp = t; elseif (a <= 4.2e+71) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.35e+30) tmp = x; elseif (a <= 3.6e-74) tmp = t; elseif (a <= 4.2e+71) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.35e+30], x, If[LessEqual[a, 3.6e-74], t, If[LessEqual[a, 4.2e+71], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-74}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+71}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.3499999999999999e30 or 4.19999999999999978e71 < a Initial program 73.2%
+-commutative73.2%
*-commutative73.2%
associate-/l*93.9%
fma-define93.9%
Simplified93.9%
Taylor expanded in a around inf 53.2%
if -1.3499999999999999e30 < a < 3.6000000000000002e-74Initial program 68.1%
+-commutative68.1%
*-commutative68.1%
associate-/l*73.9%
fma-define73.9%
Simplified73.9%
Taylor expanded in t around inf 60.5%
Taylor expanded in z around inf 37.3%
if 3.6000000000000002e-74 < a < 4.19999999999999978e71Initial program 72.1%
+-commutative72.1%
*-commutative72.1%
associate-/l*83.4%
fma-define83.4%
Simplified83.4%
Taylor expanded in t around inf 65.8%
Taylor expanded in z around 0 37.1%
associate-/l*37.1%
Simplified37.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7e+30) (not (<= a 1.8e+84))) (+ x (/ (- t x) (/ a y))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7e+30) || !(a <= 1.8e+84)) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-7d+30)) .or. (.not. (a <= 1.8d+84))) then
tmp = x + ((t - x) / (a / y))
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7e+30) || !(a <= 1.8e+84)) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7e+30) or not (a <= 1.8e+84): tmp = x + ((t - x) / (a / y)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7e+30) || !(a <= 1.8e+84)) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7e+30) || ~((a <= 1.8e+84))) tmp = x + ((t - x) / (a / y)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7e+30], N[Not[LessEqual[a, 1.8e+84]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+30} \lor \neg \left(a \leq 1.8 \cdot 10^{+84}\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -7.00000000000000042e30 or 1.8e84 < a Initial program 73.4%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in y around 0 80.9%
mul-1-neg80.9%
associate-/l*92.8%
distribute-lft-neg-out92.8%
+-commutative92.8%
div-sub92.8%
distribute-rgt-out92.7%
sub-neg92.7%
associate-/r/93.7%
Simplified93.7%
Taylor expanded in z around 0 76.4%
if -7.00000000000000042e30 < a < 1.8e84Initial program 69.0%
+-commutative69.0%
*-commutative69.0%
associate-/l*76.5%
fma-define76.4%
Simplified76.4%
Taylor expanded in t around inf 62.4%
sub-div62.4%
frac-2neg62.4%
sub-neg62.4%
distribute-neg-in62.4%
add-sqr-sqrt36.2%
sqrt-unprod39.4%
sqr-neg39.4%
sqrt-unprod10.7%
add-sqr-sqrt27.5%
add-sqr-sqrt16.9%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod25.8%
add-sqr-sqrt62.4%
sub-neg62.4%
distribute-neg-in62.4%
add-sqr-sqrt36.2%
sqrt-unprod35.5%
sqr-neg35.5%
sqrt-unprod5.1%
add-sqr-sqrt17.4%
add-sqr-sqrt12.4%
sqrt-unprod32.4%
sqr-neg32.4%
sqrt-unprod25.8%
add-sqr-sqrt62.4%
Applied egg-rr62.4%
+-commutative62.4%
unsub-neg62.4%
neg-mul-162.4%
+-commutative62.4%
neg-mul-162.4%
unsub-neg62.4%
Simplified62.4%
Final simplification67.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.3e+31) (not (<= a 2.4e+75))) (+ x (* y (/ (- t x) a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.3e+31) || !(a <= 2.4e+75)) {
tmp = x + (y * ((t - x) / 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 ((a <= (-1.3d+31)) .or. (.not. (a <= 2.4d+75))) then
tmp = x + (y * ((t - x) / 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 ((a <= -1.3e+31) || !(a <= 2.4e+75)) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.3e+31) or not (a <= 2.4e+75): tmp = x + (y * ((t - x) / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.3e+31) || !(a <= 2.4e+75)) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / 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 ((a <= -1.3e+31) || ~((a <= 2.4e+75))) tmp = x + (y * ((t - x) / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.3e+31], N[Not[LessEqual[a, 2.4e+75]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / 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}\;a \leq -1.3 \cdot 10^{+31} \lor \neg \left(a \leq 2.4 \cdot 10^{+75}\right):\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -1.3e31 or 2.4e75 < a Initial program 73.4%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in z around 0 64.8%
associate-/l*76.3%
Simplified76.3%
if -1.3e31 < a < 2.4e75Initial program 69.0%
+-commutative69.0%
*-commutative69.0%
associate-/l*76.5%
fma-define76.4%
Simplified76.4%
Taylor expanded in t around inf 62.4%
sub-div62.4%
frac-2neg62.4%
sub-neg62.4%
distribute-neg-in62.4%
add-sqr-sqrt36.2%
sqrt-unprod39.4%
sqr-neg39.4%
sqrt-unprod10.7%
add-sqr-sqrt27.5%
add-sqr-sqrt16.9%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod25.8%
add-sqr-sqrt62.4%
sub-neg62.4%
distribute-neg-in62.4%
add-sqr-sqrt36.2%
sqrt-unprod35.5%
sqr-neg35.5%
sqrt-unprod5.1%
add-sqr-sqrt17.4%
add-sqr-sqrt12.4%
sqrt-unprod32.4%
sqr-neg32.4%
sqrt-unprod25.8%
add-sqr-sqrt62.4%
Applied egg-rr62.4%
+-commutative62.4%
unsub-neg62.4%
neg-mul-162.4%
+-commutative62.4%
neg-mul-162.4%
unsub-neg62.4%
Simplified62.4%
Final simplification67.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.7e+31) (not (<= a 2.8e+89))) (+ x (* t (/ y a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.7e+31) || !(a <= 2.8e+89)) {
tmp = x + (t * (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 ((a <= (-1.7d+31)) .or. (.not. (a <= 2.8d+89))) then
tmp = x + (t * (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 ((a <= -1.7e+31) || !(a <= 2.8e+89)) {
tmp = x + (t * (y / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.7e+31) or not (a <= 2.8e+89): tmp = x + (t * (y / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.7e+31) || !(a <= 2.8e+89)) tmp = Float64(x + Float64(t * 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 ((a <= -1.7e+31) || ~((a <= 2.8e+89))) tmp = x + (t * (y / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.7e+31], N[Not[LessEqual[a, 2.8e+89]], $MachinePrecision]], N[(x + N[(t * 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}\;a \leq -1.7 \cdot 10^{+31} \lor \neg \left(a \leq 2.8 \cdot 10^{+89}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -1.6999999999999999e31 or 2.7999999999999998e89 < a Initial program 73.4%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in t around inf 82.5%
Taylor expanded in z around 0 63.9%
+-commutative63.9%
associate-/l*68.7%
Simplified68.7%
if -1.6999999999999999e31 < a < 2.7999999999999998e89Initial program 69.0%
+-commutative69.0%
*-commutative69.0%
associate-/l*76.5%
fma-define76.4%
Simplified76.4%
Taylor expanded in t around inf 62.4%
sub-div62.4%
frac-2neg62.4%
sub-neg62.4%
distribute-neg-in62.4%
add-sqr-sqrt36.2%
sqrt-unprod39.4%
sqr-neg39.4%
sqrt-unprod10.7%
add-sqr-sqrt27.5%
add-sqr-sqrt16.9%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod25.8%
add-sqr-sqrt62.4%
sub-neg62.4%
distribute-neg-in62.4%
add-sqr-sqrt36.2%
sqrt-unprod35.5%
sqr-neg35.5%
sqrt-unprod5.1%
add-sqr-sqrt17.4%
add-sqr-sqrt12.4%
sqrt-unprod32.4%
sqr-neg32.4%
sqrt-unprod25.8%
add-sqr-sqrt62.4%
Applied egg-rr62.4%
+-commutative62.4%
unsub-neg62.4%
neg-mul-162.4%
+-commutative62.4%
neg-mul-162.4%
unsub-neg62.4%
Simplified62.4%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.2e-42) (not (<= a 1.05e+48))) (+ x (* t (/ y a))) (* t (- 1.0 (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.2e-42) || !(a <= 1.05e+48)) {
tmp = x + (t * (y / a));
} else {
tmp = t * (1.0 - (y / 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 ((a <= (-1.2d-42)) .or. (.not. (a <= 1.05d+48))) then
tmp = x + (t * (y / a))
else
tmp = t * (1.0d0 - (y / z))
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.2e-42) || !(a <= 1.05e+48)) {
tmp = x + (t * (y / a));
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.2e-42) or not (a <= 1.05e+48): tmp = x + (t * (y / a)) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.2e-42) || !(a <= 1.05e+48)) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.2e-42) || ~((a <= 1.05e+48))) tmp = x + (t * (y / a)); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.2e-42], N[Not[LessEqual[a, 1.05e+48]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-42} \lor \neg \left(a \leq 1.05 \cdot 10^{+48}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if a < -1.20000000000000001e-42 or 1.0499999999999999e48 < a Initial program 73.3%
associate-/l*89.3%
Simplified89.3%
Taylor expanded in t around inf 79.3%
Taylor expanded in z around 0 60.0%
+-commutative60.0%
associate-/l*64.6%
Simplified64.6%
if -1.20000000000000001e-42 < a < 1.0499999999999999e48Initial program 68.2%
+-commutative68.2%
*-commutative68.2%
associate-/l*75.0%
fma-define75.0%
Simplified75.0%
Taylor expanded in t around inf 61.2%
Taylor expanded in a around 0 54.5%
mul-1-neg54.5%
unsub-neg54.5%
Simplified54.5%
Final simplification59.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.1e+30) x (if (<= a 1.65e+90) (* t (- 1.0 (/ y z))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.1e+30) {
tmp = x;
} else if (a <= 1.65e+90) {
tmp = t * (1.0 - (y / z));
} 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 <= (-4.1d+30)) then
tmp = x
else if (a <= 1.65d+90) then
tmp = t * (1.0d0 - (y / z))
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 <= -4.1e+30) {
tmp = x;
} else if (a <= 1.65e+90) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.1e+30: tmp = x elif a <= 1.65e+90: tmp = t * (1.0 - (y / z)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.1e+30) tmp = x; elseif (a <= 1.65e+90) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.1e+30) tmp = x; elseif (a <= 1.65e+90) tmp = t * (1.0 - (y / z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.1e+30], x, If[LessEqual[a, 1.65e+90], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{+90}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.10000000000000005e30 or 1.65000000000000004e90 < a Initial program 73.6%
+-commutative73.6%
*-commutative73.6%
associate-/l*93.8%
fma-define93.8%
Simplified93.8%
Taylor expanded in a around inf 54.1%
if -4.10000000000000005e30 < a < 1.65000000000000004e90Initial program 68.8%
+-commutative68.8%
*-commutative68.8%
associate-/l*76.3%
fma-define76.3%
Simplified76.3%
Taylor expanded in t around inf 62.1%
Taylor expanded in a around 0 51.5%
mul-1-neg51.5%
unsub-neg51.5%
Simplified51.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.5e+30) x (if (<= a 7.8e+83) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e+30) {
tmp = x;
} else if (a <= 7.8e+83) {
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.5d+30)) then
tmp = x
else if (a <= 7.8d+83) 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.5e+30) {
tmp = x;
} else if (a <= 7.8e+83) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.5e+30: tmp = x elif a <= 7.8e+83: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.5e+30) tmp = x; elseif (a <= 7.8e+83) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.5e+30) tmp = x; elseif (a <= 7.8e+83) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e+30], x, If[LessEqual[a, 7.8e+83], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{+83}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.49999999999999989e30 or 7.8000000000000003e83 < a Initial program 73.6%
+-commutative73.6%
*-commutative73.6%
associate-/l*93.8%
fma-define93.8%
Simplified93.8%
Taylor expanded in a around inf 54.1%
if -1.49999999999999989e30 < a < 7.8000000000000003e83Initial program 68.8%
+-commutative68.8%
*-commutative68.8%
associate-/l*76.3%
fma-define76.3%
Simplified76.3%
Taylor expanded in t around inf 62.1%
Taylor expanded in z around inf 33.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 70.7%
+-commutative70.7%
*-commutative70.7%
associate-/l*83.1%
fma-define83.1%
Simplified83.1%
Taylor expanded in t around inf 50.4%
Taylor expanded in z around inf 23.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} 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 / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
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 / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024165
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))