
(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 22 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 (/ y (- z a))) (t_2 (+ (/ z (- a z)) 1.0)))
(if (or (<= x -1e-26) (not (<= x 5.5e-72)))
(* x (+ t_2 (- t_1 (* (/ t x) (/ (- y z) (- z a))))))
(* t (+ (/ (- y z) (- a z)) (/ (* x (+ t_2 t_1)) t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (z - a);
double t_2 = (z / (a - z)) + 1.0;
double tmp;
if ((x <= -1e-26) || !(x <= 5.5e-72)) {
tmp = x * (t_2 + (t_1 - ((t / x) * ((y - z) / (z - a)))));
} else {
tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + t_1)) / 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) :: t_2
real(8) :: tmp
t_1 = y / (z - a)
t_2 = (z / (a - z)) + 1.0d0
if ((x <= (-1d-26)) .or. (.not. (x <= 5.5d-72))) then
tmp = x * (t_2 + (t_1 - ((t / x) * ((y - z) / (z - a)))))
else
tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + t_1)) / 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 / (z - a);
double t_2 = (z / (a - z)) + 1.0;
double tmp;
if ((x <= -1e-26) || !(x <= 5.5e-72)) {
tmp = x * (t_2 + (t_1 - ((t / x) * ((y - z) / (z - a)))));
} else {
tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + t_1)) / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (z - a) t_2 = (z / (a - z)) + 1.0 tmp = 0 if (x <= -1e-26) or not (x <= 5.5e-72): tmp = x * (t_2 + (t_1 - ((t / x) * ((y - z) / (z - a))))) else: tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + t_1)) / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(z - a)) t_2 = Float64(Float64(z / Float64(a - z)) + 1.0) tmp = 0.0 if ((x <= -1e-26) || !(x <= 5.5e-72)) tmp = Float64(x * Float64(t_2 + Float64(t_1 - Float64(Float64(t / x) * Float64(Float64(y - z) / Float64(z - a)))))); else tmp = Float64(t * Float64(Float64(Float64(y - z) / Float64(a - z)) + Float64(Float64(x * Float64(t_2 + t_1)) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (z - a); t_2 = (z / (a - z)) + 1.0; tmp = 0.0; if ((x <= -1e-26) || ~((x <= 5.5e-72))) tmp = x * (t_2 + (t_1 - ((t / x) * ((y - z) / (z - a))))); else tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + t_1)) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[Or[LessEqual[x, -1e-26], N[Not[LessEqual[x, 5.5e-72]], $MachinePrecision]], N[(x * N[(t$95$2 + N[(t$95$1 - N[(N[(t / x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(t$95$2 + t$95$1), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z - a}\\
t_2 := \frac{z}{a - z} + 1\\
\mathbf{if}\;x \leq -1 \cdot 10^{-26} \lor \neg \left(x \leq 5.5 \cdot 10^{-72}\right):\\
\;\;\;\;x \cdot \left(t\_2 + \left(t\_1 - \frac{t}{x} \cdot \frac{y - z}{z - a}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{y - z}{a - z} + \frac{x \cdot \left(t\_2 + t\_1\right)}{t}\right)\\
\end{array}
\end{array}
if x < -1e-26 or 5.49999999999999994e-72 < x Initial program 57.9%
+-commutative57.9%
*-commutative57.9%
associate-/l*74.7%
fma-define74.7%
Simplified74.7%
Taylor expanded in x around -inf 66.8%
mul-1-neg66.8%
*-commutative66.8%
distribute-rgt-neg-in66.8%
+-commutative66.8%
mul-1-neg66.8%
unsub-neg66.8%
times-frac87.1%
+-commutative87.1%
Simplified87.1%
if -1e-26 < x < 5.49999999999999994e-72Initial program 78.6%
+-commutative78.6%
*-commutative78.6%
associate-/l*90.8%
fma-define90.7%
Simplified90.7%
Taylor expanded in x around -inf 67.4%
mul-1-neg67.4%
*-commutative67.4%
distribute-rgt-neg-in67.4%
+-commutative67.4%
mul-1-neg67.4%
unsub-neg67.4%
times-frac66.7%
+-commutative66.7%
Simplified66.7%
Taylor expanded in t around -inf 92.4%
Final simplification89.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-241)
t_2
(if (<= t_2 0.0)
(+ t (* x (/ (- (+ y (/ (* a t) x)) (+ a (* t (/ y x)))) z)))
(if (<= t_2 2e+275) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / (t - x)));
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-241) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (x * (((y + ((a * t) / x)) - (a + (t * (y / x)))) / z));
} else if (t_2 <= 2e+275) {
tmp = t_2;
} 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) / ((a - z) / (t - x)));
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-241) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (x * (((y + ((a * t) / x)) - (a + (t * (y / x)))) / z));
} else if (t_2 <= 2e+275) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) / ((a - z) / (t - x))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -2e-241: tmp = t_2 elif t_2 <= 0.0: tmp = t + (x * (((y + ((a * t) / x)) - (a + (t * (y / x)))) / z)) elif t_2 <= 2e+275: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))) 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-241) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(x * Float64(Float64(Float64(y + Float64(Float64(a * t) / x)) - Float64(a + Float64(t * Float64(y / x)))) / z))); elseif (t_2 <= 2e+275) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) / ((a - z) / (t - x))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -2e-241) tmp = t_2; elseif (t_2 <= 0.0) tmp = t + (x * (((y + ((a * t) / x)) - (a + (t * (y / x)))) / z)); elseif (t_2 <= 2e+275) tmp = t_2; 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[(a - z), $MachinePrecision] / N[(t - x), $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-241], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(x * N[(N[(N[(y + N[(N[(a * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - N[(a + N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+275], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
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^{-241}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + x \cdot \frac{\left(y + \frac{a \cdot t}{x}\right) - \left(a + t \cdot \frac{y}{x}\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\
\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 1.99999999999999992e275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 42.6%
associate-/l*79.7%
Simplified79.7%
clear-num79.8%
un-div-inv80.0%
Applied egg-rr80.0%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.9999999999999999e-241 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.99999999999999992e275Initial program 94.5%
if -1.9999999999999999e-241 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.0%
+-commutative4.0%
*-commutative4.0%
associate-/l*4.0%
fma-define4.0%
Simplified4.0%
Taylor expanded in x around -inf 50.4%
mul-1-neg50.4%
*-commutative50.4%
distribute-rgt-neg-in50.4%
+-commutative50.4%
mul-1-neg50.4%
unsub-neg50.4%
times-frac52.3%
+-commutative52.3%
Simplified52.3%
Taylor expanded in z around -inf 98.8%
associate-/l*99.8%
associate-/l*99.8%
Simplified99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-241)
t_2
(if (<= t_2 0.0)
(+ t (* (- t x) (* (- y a) (/ -1.0 z))))
(if (<= t_2 2e+275) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / (t - x)));
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-241) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + ((t - x) * ((y - a) * (-1.0 / z)));
} else if (t_2 <= 2e+275) {
tmp = t_2;
} 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) / ((a - z) / (t - x)));
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-241) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + ((t - x) * ((y - a) * (-1.0 / z)));
} else if (t_2 <= 2e+275) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) / ((a - z) / (t - x))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -2e-241: tmp = t_2 elif t_2 <= 0.0: tmp = t + ((t - x) * ((y - a) * (-1.0 / z))) elif t_2 <= 2e+275: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))) 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-241) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(y - a) * Float64(-1.0 / z)))); elseif (t_2 <= 2e+275) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) / ((a - z) / (t - x))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -2e-241) tmp = t_2; elseif (t_2 <= 0.0) tmp = t + ((t - x) * ((y - a) * (-1.0 / z))); elseif (t_2 <= 2e+275) tmp = t_2; 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[(a - z), $MachinePrecision] / N[(t - x), $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-241], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+275], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
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^{-241}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{-1}{z}\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\
\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 1.99999999999999992e275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 42.6%
associate-/l*79.7%
Simplified79.7%
clear-num79.8%
un-div-inv80.0%
Applied egg-rr80.0%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.9999999999999999e-241 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.99999999999999992e275Initial program 94.5%
if -1.9999999999999999e-241 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.0%
+-commutative4.0%
*-commutative4.0%
associate-/l*4.0%
fma-define4.0%
Simplified4.0%
Taylor expanded in z around inf 98.8%
associate--l+98.8%
associate-*r/98.8%
associate-*r/98.8%
mul-1-neg98.8%
div-sub98.8%
mul-1-neg98.8%
distribute-lft-out--98.8%
associate-*r/98.8%
mul-1-neg98.8%
unsub-neg98.8%
distribute-rgt-out--98.8%
Simplified98.8%
div-inv98.7%
Applied egg-rr98.7%
associate-*l*99.6%
Simplified99.6%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-241)
t_2
(if (<= t_2 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= t_2 2e+275) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) / ((a - z) / (t - x)));
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-241) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 2e+275) {
tmp = t_2;
} 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) / ((a - z) / (t - x)));
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-241) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 2e+275) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) / ((a - z) / (t - x))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -2e-241: tmp = t_2 elif t_2 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) elif t_2 <= 2e+275: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))) 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-241) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (t_2 <= 2e+275) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) / ((a - z) / (t - x))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -2e-241) tmp = t_2; elseif (t_2 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); elseif (t_2 <= 2e+275) tmp = t_2; 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[(a - z), $MachinePrecision] / N[(t - x), $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-241], 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], If[LessEqual[t$95$2, 2e+275], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
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^{-241}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\
\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 1.99999999999999992e275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 42.6%
associate-/l*79.7%
Simplified79.7%
clear-num79.8%
un-div-inv80.0%
Applied egg-rr80.0%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.9999999999999999e-241 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.99999999999999992e275Initial program 94.5%
if -1.9999999999999999e-241 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.0%
+-commutative4.0%
*-commutative4.0%
associate-/l*4.0%
fma-define4.0%
Simplified4.0%
Taylor expanded in z around inf 98.8%
associate--l+98.8%
associate-*r/98.8%
associate-*r/98.8%
mul-1-neg98.8%
div-sub98.8%
mul-1-neg98.8%
distribute-lft-out--98.8%
associate-*r/98.8%
mul-1-neg98.8%
unsub-neg98.8%
distribute-rgt-out--98.8%
Simplified98.8%
Final simplification88.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-241)
t_2
(if (<= t_2 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= t_2 2e+275) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
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-241) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 2e+275) {
tmp = t_2;
} 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) / (a - z)));
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-241) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (t_2 <= 2e+275) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -2e-241: tmp = t_2 elif t_2 <= 0.0: tmp = t + (((t - x) * (a - y)) / z) elif t_2 <= 2e+275: tmp = t_2 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(a - z)))) 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-241) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (t_2 <= 2e+275) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -2e-241) tmp = t_2; elseif (t_2 <= 0.0) tmp = t + (((t - x) * (a - y)) / z); elseif (t_2 <= 2e+275) tmp = t_2; 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[(a - z), $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-241], 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], If[LessEqual[t$95$2, 2e+275], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
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^{-241}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\
\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 1.99999999999999992e275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 42.6%
associate-/l*79.7%
Simplified79.7%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.9999999999999999e-241 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.99999999999999992e275Initial program 94.5%
if -1.9999999999999999e-241 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.0%
+-commutative4.0%
*-commutative4.0%
associate-/l*4.0%
fma-define4.0%
Simplified4.0%
Taylor expanded in z around inf 98.8%
associate--l+98.8%
associate-*r/98.8%
associate-*r/98.8%
mul-1-neg98.8%
div-sub98.8%
mul-1-neg98.8%
distribute-lft-out--98.8%
associate-*r/98.8%
mul-1-neg98.8%
unsub-neg98.8%
distribute-rgt-out--98.8%
Simplified98.8%
Final simplification88.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1
(*
x
(+
(+ (/ z (- a z)) 1.0)
(- (/ y (- z a)) (* (/ t x) (/ (- y z) (- z a))))))))
(if (<= x -1.25e-59)
t_1
(if (<= x -4.1e-278)
(+ x (* (- y z) (/ (- t x) (- a z))))
(if (<= x 7.8e-72) (+ x (* t (/ (- y z) (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (((z / (a - z)) + 1.0) + ((y / (z - a)) - ((t / x) * ((y - z) / (z - a)))));
double tmp;
if (x <= -1.25e-59) {
tmp = t_1;
} else if (x <= -4.1e-278) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else if (x <= 7.8e-72) {
tmp = x + (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 * (((z / (a - z)) + 1.0d0) + ((y / (z - a)) - ((t / x) * ((y - z) / (z - a)))))
if (x <= (-1.25d-59)) then
tmp = t_1
else if (x <= (-4.1d-278)) then
tmp = x + ((y - z) * ((t - x) / (a - z)))
else if (x <= 7.8d-72) then
tmp = x + (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 * (((z / (a - z)) + 1.0) + ((y / (z - a)) - ((t / x) * ((y - z) / (z - a)))));
double tmp;
if (x <= -1.25e-59) {
tmp = t_1;
} else if (x <= -4.1e-278) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else if (x <= 7.8e-72) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (((z / (a - z)) + 1.0) + ((y / (z - a)) - ((t / x) * ((y - z) / (z - a))))) tmp = 0 if x <= -1.25e-59: tmp = t_1 elif x <= -4.1e-278: tmp = x + ((y - z) * ((t - x) / (a - z))) elif x <= 7.8e-72: tmp = x + (t * ((y - z) / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(Float64(Float64(z / Float64(a - z)) + 1.0) + Float64(Float64(y / Float64(z - a)) - Float64(Float64(t / x) * Float64(Float64(y - z) / Float64(z - a)))))) tmp = 0.0 if (x <= -1.25e-59) tmp = t_1; elseif (x <= -4.1e-278) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); elseif (x <= 7.8e-72) tmp = Float64(x + 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 * (((z / (a - z)) + 1.0) + ((y / (z - a)) - ((t / x) * ((y - z) / (z - a))))); tmp = 0.0; if (x <= -1.25e-59) tmp = t_1; elseif (x <= -4.1e-278) tmp = x + ((y - z) * ((t - x) / (a - z))); elseif (x <= 7.8e-72) tmp = x + (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[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] - N[(N[(t / x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.25e-59], t$95$1, If[LessEqual[x, -4.1e-278], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e-72], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\left(\frac{z}{a - z} + 1\right) + \left(\frac{y}{z - a} - \frac{t}{x} \cdot \frac{y - z}{z - a}\right)\right)\\
\mathbf{if}\;x \leq -1.25 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -4.1 \cdot 10^{-278}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-72}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.25e-59 or 7.8e-72 < x Initial program 58.5%
+-commutative58.5%
*-commutative58.5%
associate-/l*75.1%
fma-define75.2%
Simplified75.2%
Taylor expanded in x around -inf 67.7%
mul-1-neg67.7%
*-commutative67.7%
distribute-rgt-neg-in67.7%
+-commutative67.7%
mul-1-neg67.7%
unsub-neg67.7%
times-frac87.2%
+-commutative87.2%
Simplified87.2%
if -1.25e-59 < x < -4.10000000000000001e-278Initial program 73.8%
associate-/l*91.4%
Simplified91.4%
if -4.10000000000000001e-278 < x < 7.8e-72Initial program 83.5%
associate-/l*77.6%
Simplified77.6%
Taylor expanded in t around inf 78.1%
associate-/l*88.2%
Simplified88.2%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.8e-182) (not (<= a 1.25e-164))) (+ x (* (- y z) (/ (- t x) (- a z)))) (+ t (* y (/ (- x t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.8e-182) || !(a <= 1.25e-164)) {
tmp = x + ((y - z) * ((t - x) / (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 <= (-5.8d-182)) .or. (.not. (a <= 1.25d-164))) then
tmp = x + ((y - z) * ((t - x) / (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 <= -5.8e-182) || !(a <= 1.25e-164)) {
tmp = x + ((y - z) * ((t - x) / (a - z)));
} else {
tmp = t + (y * ((x - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.8e-182) or not (a <= 1.25e-164): tmp = x + ((y - z) * ((t - x) / (a - z))) else: tmp = t + (y * ((x - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.8e-182) || !(a <= 1.25e-164)) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.8e-182) || ~((a <= 1.25e-164))) tmp = x + ((y - z) * ((t - x) / (a - z))); else tmp = t + (y * ((x - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.8e-182], N[Not[LessEqual[a, 1.25e-164]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{-182} \lor \neg \left(a \leq 1.25 \cdot 10^{-164}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if a < -5.79999999999999974e-182 or 1.2499999999999999e-164 < a Initial program 69.8%
associate-/l*81.0%
Simplified81.0%
if -5.79999999999999974e-182 < a < 1.2499999999999999e-164Initial program 50.9%
+-commutative50.9%
*-commutative50.9%
associate-/l*63.4%
fma-define63.4%
Simplified63.4%
Taylor expanded in z around inf 77.9%
associate--l+77.9%
associate-*r/77.9%
associate-*r/77.9%
mul-1-neg77.9%
div-sub77.9%
mul-1-neg77.9%
distribute-lft-out--77.9%
associate-*r/77.9%
mul-1-neg77.9%
unsub-neg77.9%
distribute-rgt-out--77.9%
Simplified77.9%
Taylor expanded in y around inf 75.0%
associate-/l*83.7%
Simplified83.7%
Final simplification81.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.4e-44) (not (<= a 3.3e-50))) (+ 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 <= -3.4e-44) || !(a <= 3.3e-50)) {
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 <= (-3.4d-44)) .or. (.not. (a <= 3.3d-50))) 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 <= -3.4e-44) || !(a <= 3.3e-50)) {
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 <= -3.4e-44) or not (a <= 3.3e-50): 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 <= -3.4e-44) || !(a <= 3.3e-50)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.4e-44) || ~((a <= 3.3e-50))) 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, -3.4e-44], N[Not[LessEqual[a, 3.3e-50]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-44} \lor \neg \left(a \leq 3.3 \cdot 10^{-50}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if a < -3.40000000000000016e-44 or 3.2999999999999998e-50 < a Initial program 72.4%
associate-/l*84.2%
Simplified84.2%
Taylor expanded in t around inf 66.0%
associate-/l*77.6%
Simplified77.6%
if -3.40000000000000016e-44 < a < 3.2999999999999998e-50Initial program 56.1%
+-commutative56.1%
*-commutative56.1%
associate-/l*71.4%
fma-define71.4%
Simplified71.4%
Taylor expanded in z around inf 68.5%
associate--l+68.5%
associate-*r/68.5%
associate-*r/68.5%
mul-1-neg68.5%
div-sub69.4%
mul-1-neg69.4%
distribute-lft-out--69.4%
associate-*r/69.4%
mul-1-neg69.4%
unsub-neg69.4%
distribute-rgt-out--69.4%
Simplified69.4%
Taylor expanded in y around inf 65.4%
associate-/l*73.6%
Simplified73.6%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.2e+50) (not (<= z 1.15e+83))) (+ t (* y (/ (- x t) z))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.2e+50) || !(z <= 1.15e+83)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + ((t - x) * (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 <= (-9.2d+50)) .or. (.not. (z <= 1.15d+83))) then
tmp = t + (y * ((x - t) / z))
else
tmp = x + ((t - x) * (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 <= -9.2e+50) || !(z <= 1.15e+83)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.2e+50) or not (z <= 1.15e+83): tmp = t + (y * ((x - t) / z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.2e+50) || !(z <= 1.15e+83)) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.2e+50) || ~((z <= 1.15e+83))) tmp = t + (y * ((x - t) / z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.2e+50], N[Not[LessEqual[z, 1.15e+83]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+50} \lor \neg \left(z \leq 1.15 \cdot 10^{+83}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -9.19999999999999987e50 or 1.14999999999999997e83 < z Initial program 39.1%
+-commutative39.1%
*-commutative39.1%
associate-/l*67.4%
fma-define67.4%
Simplified67.4%
Taylor expanded in z around inf 56.8%
associate--l+56.8%
associate-*r/56.8%
associate-*r/56.8%
mul-1-neg56.8%
div-sub56.8%
mul-1-neg56.8%
distribute-lft-out--56.8%
associate-*r/56.8%
mul-1-neg56.8%
unsub-neg56.8%
distribute-rgt-out--56.8%
Simplified56.8%
Taylor expanded in y around inf 54.0%
associate-/l*65.7%
Simplified65.7%
if -9.19999999999999987e50 < z < 1.14999999999999997e83Initial program 83.3%
associate-/l*85.7%
Simplified85.7%
clear-num85.0%
un-div-inv85.0%
Applied egg-rr85.0%
Taylor expanded in z around 0 67.2%
*-commutative67.2%
*-lft-identity67.2%
times-frac72.2%
/-rgt-identity72.2%
Simplified72.2%
Final simplification69.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.05e-44) (not (<= a 1.15e-44))) (+ x (* t (/ (- y z) a))) (* t (/ (- z y) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.05e-44) || !(a <= 1.15e-44)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t * ((z - 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.05d-44)) .or. (.not. (a <= 1.15d-44))) then
tmp = x + (t * ((y - z) / a))
else
tmp = t * ((z - 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.05e-44) || !(a <= 1.15e-44)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t * ((z - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.05e-44) or not (a <= 1.15e-44): tmp = x + (t * ((y - z) / a)) else: tmp = t * ((z - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.05e-44) || !(a <= 1.15e-44)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = Float64(t * Float64(Float64(z - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.05e-44) || ~((a <= 1.15e-44))) tmp = x + (t * ((y - z) / a)); else tmp = t * ((z - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.05e-44], N[Not[LessEqual[a, 1.15e-44]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{-44} \lor \neg \left(a \leq 1.15 \cdot 10^{-44}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\end{array}
\end{array}
if a < -1.05000000000000001e-44 or 1.14999999999999999e-44 < a Initial program 72.4%
associate-/l*84.2%
Simplified84.2%
Taylor expanded in t around inf 73.7%
Taylor expanded in a around inf 58.5%
associate-/l*63.8%
Simplified63.8%
if -1.05000000000000001e-44 < a < 1.14999999999999999e-44Initial program 56.1%
+-commutative56.1%
*-commutative56.1%
associate-/l*71.4%
fma-define71.4%
Simplified71.4%
Taylor expanded in x around -inf 63.7%
mul-1-neg63.7%
*-commutative63.7%
distribute-rgt-neg-in63.7%
+-commutative63.7%
mul-1-neg63.7%
unsub-neg63.7%
times-frac82.6%
+-commutative82.6%
Simplified82.6%
Taylor expanded in a around 0 47.1%
associate-*r*47.1%
neg-mul-147.1%
distribute-lft-out--47.1%
associate-/l*50.8%
Simplified50.8%
Taylor expanded in x around 0 36.3%
mul-1-neg36.3%
associate-/l*53.3%
Simplified53.3%
Final simplification59.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.8e-28) (+ x (* z (/ t (- z a)))) (if (<= a 5.5e-46) (+ t (* y (/ (- x t) z))) (+ x (* t (/ (- y z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e-28) {
tmp = x + (z * (t / (z - a)));
} else if (a <= 5.5e-46) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (t * ((y - z) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-6.8d-28)) then
tmp = x + (z * (t / (z - a)))
else if (a <= 5.5d-46) then
tmp = t + (y * ((x - t) / z))
else
tmp = x + (t * ((y - z) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e-28) {
tmp = x + (z * (t / (z - a)));
} else if (a <= 5.5e-46) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (t * ((y - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.8e-28: tmp = x + (z * (t / (z - a))) elif a <= 5.5e-46: tmp = t + (y * ((x - t) / z)) else: tmp = x + (t * ((y - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.8e-28) tmp = Float64(x + Float64(z * Float64(t / Float64(z - a)))); elseif (a <= 5.5e-46) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.8e-28) tmp = x + (z * (t / (z - a))); elseif (a <= 5.5e-46) tmp = t + (y * ((x - t) / z)); else tmp = x + (t * ((y - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.8e-28], N[(x + N[(z * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e-46], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{-28}:\\
\;\;\;\;x + z \cdot \frac{t}{z - a}\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-46}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if a < -6.8000000000000001e-28Initial program 75.8%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in t around inf 71.7%
Taylor expanded in y around 0 65.7%
neg-mul-165.7%
Simplified65.7%
if -6.8000000000000001e-28 < a < 5.49999999999999983e-46Initial program 56.5%
+-commutative56.5%
*-commutative56.5%
associate-/l*72.2%
fma-define72.1%
Simplified72.1%
Taylor expanded in z around inf 68.5%
associate--l+68.5%
associate-*r/68.5%
associate-*r/68.5%
mul-1-neg68.5%
div-sub69.3%
mul-1-neg69.3%
distribute-lft-out--69.3%
associate-*r/69.3%
mul-1-neg69.3%
unsub-neg69.3%
distribute-rgt-out--69.3%
Simplified69.3%
Taylor expanded in y around inf 65.4%
associate-/l*73.4%
Simplified73.4%
if 5.49999999999999983e-46 < a Initial program 69.1%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in t around inf 75.9%
Taylor expanded in a around inf 58.6%
associate-/l*68.1%
Simplified68.1%
Final simplification69.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.9e+81) (- t (/ (* x a) z)) (if (<= z 2.1e+83) (+ x (* (- t x) (/ y a))) (* t (/ (- z y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e+81) {
tmp = t - ((x * a) / z);
} else if (z <= 2.1e+83) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t * ((z - 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 (z <= (-2.9d+81)) then
tmp = t - ((x * a) / z)
else if (z <= 2.1d+83) then
tmp = x + ((t - x) * (y / a))
else
tmp = t * ((z - 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 (z <= -2.9e+81) {
tmp = t - ((x * a) / z);
} else if (z <= 2.1e+83) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t * ((z - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e+81: tmp = t - ((x * a) / z) elif z <= 2.1e+83: tmp = x + ((t - x) * (y / a)) else: tmp = t * ((z - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e+81) tmp = Float64(t - Float64(Float64(x * a) / z)); elseif (z <= 2.1e+83) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); else tmp = Float64(t * Float64(Float64(z - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.9e+81) tmp = t - ((x * a) / z); elseif (z <= 2.1e+83) tmp = x + ((t - x) * (y / a)); else tmp = t * ((z - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+81], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+83], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+81}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+83}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\end{array}
\end{array}
if z < -2.9e81Initial program 39.1%
+-commutative39.1%
*-commutative39.1%
associate-/l*64.5%
fma-define64.5%
Simplified64.5%
Taylor expanded in z around inf 54.0%
associate--l+54.0%
associate-*r/54.0%
associate-*r/54.0%
mul-1-neg54.0%
div-sub54.0%
mul-1-neg54.0%
distribute-lft-out--54.0%
associate-*r/54.0%
mul-1-neg54.0%
unsub-neg54.0%
distribute-rgt-out--54.0%
Simplified54.0%
Taylor expanded in y around 0 38.3%
neg-mul-138.3%
Simplified38.3%
Taylor expanded in t around 0 44.3%
*-commutative44.3%
Simplified44.3%
if -2.9e81 < z < 2.10000000000000002e83Initial program 80.9%
associate-/l*84.8%
Simplified84.8%
clear-num84.2%
un-div-inv84.2%
Applied egg-rr84.2%
Taylor expanded in z around 0 65.4%
*-commutative65.4%
*-lft-identity65.4%
times-frac70.6%
/-rgt-identity70.6%
Simplified70.6%
if 2.10000000000000002e83 < z Initial program 36.7%
+-commutative36.7%
*-commutative36.7%
associate-/l*66.8%
fma-define66.9%
Simplified66.9%
Taylor expanded in x around -inf 44.4%
mul-1-neg44.4%
*-commutative44.4%
distribute-rgt-neg-in44.4%
+-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
times-frac71.6%
+-commutative71.6%
Simplified71.6%
Taylor expanded in a around 0 32.9%
associate-*r*32.9%
neg-mul-132.9%
distribute-lft-out--32.9%
associate-/l*38.4%
Simplified38.4%
Taylor expanded in x around 0 33.3%
mul-1-neg33.3%
associate-/l*61.8%
Simplified61.8%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.2e+81) (- t (/ (* x a) z)) (if (<= z 1.35e+83) (+ x (* y (/ (- t x) a))) (* t (/ (- z y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+81) {
tmp = t - ((x * a) / z);
} else if (z <= 1.35e+83) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * ((z - 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 (z <= (-3.2d+81)) then
tmp = t - ((x * a) / z)
else if (z <= 1.35d+83) then
tmp = x + (y * ((t - x) / a))
else
tmp = t * ((z - 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 (z <= -3.2e+81) {
tmp = t - ((x * a) / z);
} else if (z <= 1.35e+83) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t * ((z - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+81: tmp = t - ((x * a) / z) elif z <= 1.35e+83: tmp = x + (y * ((t - x) / a)) else: tmp = t * ((z - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+81) tmp = Float64(t - Float64(Float64(x * a) / z)); elseif (z <= 1.35e+83) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = Float64(t * Float64(Float64(z - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.2e+81) tmp = t - ((x * a) / z); elseif (z <= 1.35e+83) tmp = x + (y * ((t - x) / a)); else tmp = t * ((z - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+81], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+83], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+81}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+83}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\end{array}
\end{array}
if z < -3.2e81Initial program 39.1%
+-commutative39.1%
*-commutative39.1%
associate-/l*64.5%
fma-define64.5%
Simplified64.5%
Taylor expanded in z around inf 54.0%
associate--l+54.0%
associate-*r/54.0%
associate-*r/54.0%
mul-1-neg54.0%
div-sub54.0%
mul-1-neg54.0%
distribute-lft-out--54.0%
associate-*r/54.0%
mul-1-neg54.0%
unsub-neg54.0%
distribute-rgt-out--54.0%
Simplified54.0%
Taylor expanded in y around 0 38.3%
neg-mul-138.3%
Simplified38.3%
Taylor expanded in t around 0 44.3%
*-commutative44.3%
Simplified44.3%
if -3.2e81 < z < 1.35000000000000003e83Initial program 80.9%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in z around 0 65.4%
associate-/l*66.9%
Simplified66.9%
if 1.35000000000000003e83 < z Initial program 36.7%
+-commutative36.7%
*-commutative36.7%
associate-/l*66.8%
fma-define66.9%
Simplified66.9%
Taylor expanded in x around -inf 44.4%
mul-1-neg44.4%
*-commutative44.4%
distribute-rgt-neg-in44.4%
+-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
times-frac71.6%
+-commutative71.6%
Simplified71.6%
Taylor expanded in a around 0 32.9%
associate-*r*32.9%
neg-mul-132.9%
distribute-lft-out--32.9%
associate-/l*38.4%
Simplified38.4%
Taylor expanded in x around 0 33.3%
mul-1-neg33.3%
associate-/l*61.8%
Simplified61.8%
Final simplification61.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -3e+90) (- t (/ (* x a) z)) (if (<= z 1.75e+83) (+ x (* (/ y (- a z)) t)) (* t (/ (- z y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+90) {
tmp = t - ((x * a) / z);
} else if (z <= 1.75e+83) {
tmp = x + ((y / (a - z)) * t);
} else {
tmp = t * ((z - 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 (z <= (-3d+90)) then
tmp = t - ((x * a) / z)
else if (z <= 1.75d+83) then
tmp = x + ((y / (a - z)) * t)
else
tmp = t * ((z - 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 (z <= -3e+90) {
tmp = t - ((x * a) / z);
} else if (z <= 1.75e+83) {
tmp = x + ((y / (a - z)) * t);
} else {
tmp = t * ((z - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e+90: tmp = t - ((x * a) / z) elif z <= 1.75e+83: tmp = x + ((y / (a - z)) * t) else: tmp = t * ((z - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e+90) tmp = Float64(t - Float64(Float64(x * a) / z)); elseif (z <= 1.75e+83) tmp = Float64(x + Float64(Float64(y / Float64(a - z)) * t)); else tmp = Float64(t * Float64(Float64(z - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3e+90) tmp = t - ((x * a) / z); elseif (z <= 1.75e+83) tmp = x + ((y / (a - z)) * t); else tmp = t * ((z - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e+90], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+83], N[(x + N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+90}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+83}:\\
\;\;\;\;x + \frac{y}{a - z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\end{array}
\end{array}
if z < -2.99999999999999979e90Initial program 38.7%
+-commutative38.7%
*-commutative38.7%
associate-/l*65.1%
fma-define65.1%
Simplified65.1%
Taylor expanded in z around inf 52.1%
associate--l+52.1%
associate-*r/52.1%
associate-*r/52.1%
mul-1-neg52.1%
div-sub52.1%
mul-1-neg52.1%
distribute-lft-out--52.1%
associate-*r/52.1%
mul-1-neg52.1%
unsub-neg52.1%
distribute-rgt-out--52.1%
Simplified52.1%
Taylor expanded in y around 0 39.8%
neg-mul-139.8%
Simplified39.8%
Taylor expanded in t around 0 46.0%
*-commutative46.0%
Simplified46.0%
if -2.99999999999999979e90 < z < 1.74999999999999989e83Initial program 80.5%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in t around inf 66.4%
Taylor expanded in y around inf 56.6%
associate-/l*61.0%
Simplified61.0%
if 1.74999999999999989e83 < z Initial program 36.7%
+-commutative36.7%
*-commutative36.7%
associate-/l*66.8%
fma-define66.9%
Simplified66.9%
Taylor expanded in x around -inf 44.4%
mul-1-neg44.4%
*-commutative44.4%
distribute-rgt-neg-in44.4%
+-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
times-frac71.6%
+-commutative71.6%
Simplified71.6%
Taylor expanded in a around 0 32.9%
associate-*r*32.9%
neg-mul-132.9%
distribute-lft-out--32.9%
associate-/l*38.4%
Simplified38.4%
Taylor expanded in x around 0 33.3%
mul-1-neg33.3%
associate-/l*61.8%
Simplified61.8%
Final simplification58.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.35e-57) (not (<= z 4e+77))) (- t (/ (* x a) z)) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e-57) || !(z <= 4e+77)) {
tmp = t - ((x * a) / z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.35d-57)) .or. (.not. (z <= 4d+77))) then
tmp = t - ((x * a) / z)
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e-57) || !(z <= 4e+77)) {
tmp = t - ((x * a) / z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.35e-57) or not (z <= 4e+77): tmp = t - ((x * a) / z) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.35e-57) || !(z <= 4e+77)) tmp = Float64(t - Float64(Float64(x * a) / z)); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.35e-57) || ~((z <= 4e+77))) tmp = t - ((x * a) / z); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.35e-57], N[Not[LessEqual[z, 4e+77]], $MachinePrecision]], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-57} \lor \neg \left(z \leq 4 \cdot 10^{+77}\right):\\
\;\;\;\;t - \frac{x \cdot a}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.3500000000000001e-57 or 3.99999999999999993e77 < z Initial program 42.2%
+-commutative42.2%
*-commutative42.2%
associate-/l*67.3%
fma-define67.3%
Simplified67.3%
Taylor expanded in z around inf 55.6%
associate--l+55.6%
associate-*r/55.6%
associate-*r/55.6%
mul-1-neg55.6%
div-sub55.5%
mul-1-neg55.5%
distribute-lft-out--55.5%
associate-*r/55.5%
mul-1-neg55.5%
unsub-neg55.5%
distribute-rgt-out--55.6%
Simplified55.6%
Taylor expanded in y around 0 42.7%
neg-mul-142.7%
Simplified42.7%
Taylor expanded in t around 0 45.8%
*-commutative45.8%
Simplified45.8%
if -1.3500000000000001e-57 < z < 3.99999999999999993e77Initial program 90.0%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in t around inf 72.0%
Taylor expanded in z around 0 60.7%
associate-/l*62.9%
Simplified62.9%
Final simplification54.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.35e-57) (- t (/ (* x a) z)) (if (<= z 1.6e+83) (+ x (* t (/ y a))) (* t (/ (- z y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e-57) {
tmp = t - ((x * a) / z);
} else if (z <= 1.6e+83) {
tmp = x + (t * (y / a));
} else {
tmp = t * ((z - 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 (z <= (-1.35d-57)) then
tmp = t - ((x * a) / z)
else if (z <= 1.6d+83) then
tmp = x + (t * (y / a))
else
tmp = t * ((z - 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 (z <= -1.35e-57) {
tmp = t - ((x * a) / z);
} else if (z <= 1.6e+83) {
tmp = x + (t * (y / a));
} else {
tmp = t * ((z - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.35e-57: tmp = t - ((x * a) / z) elif z <= 1.6e+83: tmp = x + (t * (y / a)) else: tmp = t * ((z - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e-57) tmp = Float64(t - Float64(Float64(x * a) / z)); elseif (z <= 1.6e+83) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t * Float64(Float64(z - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.35e-57) tmp = t - ((x * a) / z); elseif (z <= 1.6e+83) tmp = x + (t * (y / a)); else tmp = t * ((z - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e-57], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+83], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-57}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+83}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\end{array}
\end{array}
if z < -1.3500000000000001e-57Initial program 44.7%
+-commutative44.7%
*-commutative44.7%
associate-/l*67.9%
fma-define67.8%
Simplified67.8%
Taylor expanded in z around inf 52.3%
associate--l+52.3%
associate-*r/52.3%
associate-*r/52.3%
mul-1-neg52.3%
div-sub52.3%
mul-1-neg52.3%
distribute-lft-out--52.3%
associate-*r/52.3%
mul-1-neg52.3%
unsub-neg52.3%
distribute-rgt-out--52.4%
Simplified52.4%
Taylor expanded in y around 0 36.6%
neg-mul-136.6%
Simplified36.6%
Taylor expanded in t around 0 41.2%
*-commutative41.2%
Simplified41.2%
if -1.3500000000000001e-57 < z < 1.5999999999999999e83Initial program 89.4%
associate-/l*89.3%
Simplified89.3%
Taylor expanded in t around inf 71.6%
Taylor expanded in z around 0 60.6%
associate-/l*62.7%
Simplified62.7%
if 1.5999999999999999e83 < z Initial program 36.7%
+-commutative36.7%
*-commutative36.7%
associate-/l*66.8%
fma-define66.9%
Simplified66.9%
Taylor expanded in x around -inf 44.4%
mul-1-neg44.4%
*-commutative44.4%
distribute-rgt-neg-in44.4%
+-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
times-frac71.6%
+-commutative71.6%
Simplified71.6%
Taylor expanded in a around 0 32.9%
associate-*r*32.9%
neg-mul-132.9%
distribute-lft-out--32.9%
associate-/l*38.4%
Simplified38.4%
Taylor expanded in x around 0 33.3%
mul-1-neg33.3%
associate-/l*61.8%
Simplified61.8%
Final simplification55.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.2e+81) t (if (<= z 2.35e+83) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+81) {
tmp = t;
} else if (z <= 2.35e+83) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.2d+81)) then
tmp = t
else if (z <= 2.35d+83) then
tmp = x + (t * (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+81) {
tmp = t;
} else if (z <= 2.35e+83) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+81: tmp = t elif z <= 2.35e+83: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+81) tmp = t; elseif (z <= 2.35e+83) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.2e+81) tmp = t; elseif (z <= 2.35e+83) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+81], t, If[LessEqual[z, 2.35e+83], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+81}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{+83}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.2e81 or 2.3499999999999999e83 < z Initial program 38.0%
+-commutative38.0%
*-commutative38.0%
associate-/l*65.6%
fma-define65.6%
Simplified65.6%
Taylor expanded in x around -inf 49.0%
mul-1-neg49.0%
*-commutative49.0%
distribute-rgt-neg-in49.0%
+-commutative49.0%
mul-1-neg49.0%
unsub-neg49.0%
times-frac73.4%
+-commutative73.4%
Simplified73.4%
Taylor expanded in z around inf 45.6%
if -3.2e81 < z < 2.3499999999999999e83Initial program 80.9%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in t around inf 66.6%
Taylor expanded in z around 0 52.5%
associate-/l*55.9%
Simplified55.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.5e+99) x (if (<= a 6.2e-39) (+ t (* a (/ t z))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e+99) {
tmp = x;
} else if (a <= 6.2e-39) {
tmp = t + (a * (t / 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.5d+99)) then
tmp = x
else if (a <= 6.2d-39) then
tmp = t + (a * (t / 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.5e+99) {
tmp = x;
} else if (a <= 6.2e-39) {
tmp = t + (a * (t / z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.5e+99: tmp = x elif a <= 6.2e-39: tmp = t + (a * (t / z)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e+99) tmp = x; elseif (a <= 6.2e-39) tmp = Float64(t + Float64(a * Float64(t / z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.5e+99) tmp = x; elseif (a <= 6.2e-39) tmp = t + (a * (t / z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+99], x, If[LessEqual[a, 6.2e-39], N[(t + N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+99}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-39}:\\
\;\;\;\;t + a \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.50000000000000004e99 or 6.1999999999999994e-39 < a Initial program 71.0%
+-commutative71.0%
*-commutative71.0%
associate-/l*86.6%
fma-define86.6%
Simplified86.6%
Taylor expanded in a around inf 44.1%
if -2.50000000000000004e99 < a < 6.1999999999999994e-39Initial program 60.7%
+-commutative60.7%
*-commutative60.7%
associate-/l*75.4%
fma-define75.4%
Simplified75.4%
Taylor expanded in z around inf 62.9%
associate--l+62.9%
associate-*r/62.9%
associate-*r/62.9%
mul-1-neg62.9%
div-sub63.6%
mul-1-neg63.6%
distribute-lft-out--63.6%
associate-*r/63.6%
mul-1-neg63.6%
unsub-neg63.6%
distribute-rgt-out--63.6%
Simplified63.6%
Taylor expanded in y around 0 38.4%
neg-mul-138.4%
Simplified38.4%
Taylor expanded in x around 0 34.1%
sub-neg34.1%
mul-1-neg34.1%
remove-double-neg34.1%
associate-/l*37.9%
Simplified37.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e+86) t (if (<= z -7.2e-58) (* x (/ (- y a) z)) (if (<= z 1.85e+83) x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+86) {
tmp = t;
} else if (z <= -7.2e-58) {
tmp = x * ((y - a) / z);
} else if (z <= 1.85e+83) {
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 <= (-6.5d+86)) then
tmp = t
else if (z <= (-7.2d-58)) then
tmp = x * ((y - a) / z)
else if (z <= 1.85d+83) 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 <= -6.5e+86) {
tmp = t;
} else if (z <= -7.2e-58) {
tmp = x * ((y - a) / z);
} else if (z <= 1.85e+83) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+86: tmp = t elif z <= -7.2e-58: tmp = x * ((y - a) / z) elif z <= 1.85e+83: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+86) tmp = t; elseif (z <= -7.2e-58) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (z <= 1.85e+83) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+86) tmp = t; elseif (z <= -7.2e-58) tmp = x * ((y - a) / z); elseif (z <= 1.85e+83) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+86], t, If[LessEqual[z, -7.2e-58], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+83], x, t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+86}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-58}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+83}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.49999999999999996e86 or 1.8500000000000001e83 < z Initial program 37.7%
+-commutative37.7%
*-commutative37.7%
associate-/l*65.9%
fma-define65.9%
Simplified65.9%
Taylor expanded in x around -inf 47.9%
mul-1-neg47.9%
*-commutative47.9%
distribute-rgt-neg-in47.9%
+-commutative47.9%
mul-1-neg47.9%
unsub-neg47.9%
times-frac72.8%
+-commutative72.8%
Simplified72.8%
Taylor expanded in z around inf 46.5%
if -6.49999999999999996e86 < z < -7.20000000000000019e-58Initial program 53.2%
+-commutative53.2%
*-commutative53.2%
associate-/l*72.0%
fma-define71.8%
Simplified71.8%
Taylor expanded in z around inf 51.3%
associate--l+51.3%
associate-*r/51.3%
associate-*r/51.3%
mul-1-neg51.3%
div-sub51.3%
mul-1-neg51.3%
distribute-lft-out--51.3%
associate-*r/51.3%
mul-1-neg51.3%
unsub-neg51.3%
distribute-rgt-out--51.5%
Simplified51.5%
Taylor expanded in t around 0 34.2%
associate-/l*36.6%
Simplified36.6%
if -7.20000000000000019e-58 < z < 1.8500000000000001e83Initial program 89.3%
+-commutative89.3%
*-commutative89.3%
associate-/l*93.8%
fma-define93.8%
Simplified93.8%
Taylor expanded in a around inf 39.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.5e+99) x (if (<= a 6.4e-40) (* t (+ 1.0 (/ a z))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e+99) {
tmp = x;
} else if (a <= 6.4e-40) {
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.5d+99)) then
tmp = x
else if (a <= 6.4d-40) 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.5e+99) {
tmp = x;
} else if (a <= 6.4e-40) {
tmp = t * (1.0 + (a / z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.5e+99: tmp = x elif a <= 6.4e-40: tmp = t * (1.0 + (a / z)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e+99) tmp = x; elseif (a <= 6.4e-40) 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.5e+99) tmp = x; elseif (a <= 6.4e-40) tmp = t * (1.0 + (a / z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+99], x, If[LessEqual[a, 6.4e-40], N[(t * N[(1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+99}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{-40}:\\
\;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.50000000000000004e99 or 6.40000000000000004e-40 < a Initial program 71.0%
+-commutative71.0%
*-commutative71.0%
associate-/l*86.6%
fma-define86.6%
Simplified86.6%
Taylor expanded in a around inf 44.1%
if -2.50000000000000004e99 < a < 6.40000000000000004e-40Initial program 60.7%
+-commutative60.7%
*-commutative60.7%
associate-/l*75.4%
fma-define75.4%
Simplified75.4%
Taylor expanded in z around inf 62.9%
associate--l+62.9%
associate-*r/62.9%
associate-*r/62.9%
mul-1-neg62.9%
div-sub63.6%
mul-1-neg63.6%
distribute-lft-out--63.6%
associate-*r/63.6%
mul-1-neg63.6%
unsub-neg63.6%
distribute-rgt-out--63.6%
Simplified63.6%
Taylor expanded in y around 0 38.4%
neg-mul-138.4%
Simplified38.4%
Taylor expanded in t around inf 34.7%
sub-neg34.7%
neg-mul-134.7%
remove-double-neg34.7%
Simplified34.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.4e-57) t (if (<= z 1.8e+83) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.4e-57) {
tmp = t;
} else if (z <= 1.8e+83) {
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 <= (-3.4d-57)) then
tmp = t
else if (z <= 1.8d+83) 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 <= -3.4e-57) {
tmp = t;
} else if (z <= 1.8e+83) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.4e-57: tmp = t elif z <= 1.8e+83: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.4e-57) tmp = t; elseif (z <= 1.8e+83) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.4e-57) tmp = t; elseif (z <= 1.8e+83) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e-57], t, If[LessEqual[z, 1.8e+83], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-57}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+83}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.40000000000000016e-57 or 1.7999999999999999e83 < z Initial program 41.6%
+-commutative41.6%
*-commutative41.6%
associate-/l*67.3%
fma-define67.2%
Simplified67.2%
Taylor expanded in x around -inf 50.3%
mul-1-neg50.3%
*-commutative50.3%
distribute-rgt-neg-in50.3%
+-commutative50.3%
mul-1-neg50.3%
unsub-neg50.3%
times-frac72.7%
+-commutative72.7%
Simplified72.7%
Taylor expanded in z around inf 38.7%
if -3.40000000000000016e-57 < z < 1.7999999999999999e83Initial program 89.4%
+-commutative89.4%
*-commutative89.4%
associate-/l*93.8%
fma-define93.8%
Simplified93.8%
Taylor expanded in a around inf 39.1%
(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 65.3%
+-commutative65.3%
*-commutative65.3%
associate-/l*80.4%
fma-define80.4%
Simplified80.4%
Taylor expanded in x around -inf 67.0%
mul-1-neg67.0%
*-commutative67.0%
distribute-rgt-neg-in67.0%
+-commutative67.0%
mul-1-neg67.0%
unsub-neg67.0%
times-frac79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in z around inf 23.5%
(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 2024132
(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))))