
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_1 (- INFINITY))
(+ x (/ (- z t) (/ (- a t) (- y x))))
(if (<= t_1 -2e-301)
t_1
(if (<= t_1 0.0)
(+ y (/ (* (- y x) (- a z)) t))
(if (<= t_1 2e+296) t_1 (+ x (* (- z t) (/ (- y x) (- a t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + ((z - t) / ((a - t) / (y - x)));
} else if (t_1 <= -2e-301) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else if (t_1 <= 2e+296) {
tmp = t_1;
} else {
tmp = x + ((z - t) * ((y - x) / (a - t)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + ((z - t) / ((a - t) / (y - x)));
} else if (t_1 <= -2e-301) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else if (t_1 <= 2e+296) {
tmp = t_1;
} else {
tmp = x + ((z - t) * ((y - x) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_1 <= -math.inf: tmp = x + ((z - t) / ((a - t) / (y - x))) elif t_1 <= -2e-301: tmp = t_1 elif t_1 <= 0.0: tmp = y + (((y - x) * (a - z)) / t) elif t_1 <= 2e+296: tmp = t_1 else: tmp = x + ((z - t) * ((y - x) / (a - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(a - t) / Float64(y - x)))); elseif (t_1 <= -2e-301) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); elseif (t_1 <= 2e+296) tmp = t_1; else tmp = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_1 <= -Inf) tmp = x + ((z - t) / ((a - t) / (y - x))); elseif (t_1 <= -2e-301) tmp = t_1; elseif (t_1 <= 0.0) tmp = y + (((y - x) * (a - z)) / t); elseif (t_1 <= 2e+296) tmp = t_1; else tmp = x + ((z - t) * ((y - x) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-301], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+296], t$95$1, N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + \frac{z - t}{\frac{a - t}{y - x}}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+296}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0Initial program 40.3%
associate-*l/91.5%
Simplified91.5%
*-commutative91.5%
clear-num91.8%
un-div-inv92.0%
Applied egg-rr92.0%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000013e-301 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1.99999999999999996e296Initial program 96.2%
if -2.00000000000000013e-301 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.8%
+-commutative4.8%
associate-*l/4.7%
fma-def5.4%
Simplified5.4%
fma-udef4.7%
associate-/r/4.8%
div-inv4.8%
clear-num4.8%
Applied egg-rr4.8%
Taylor expanded in t around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
associate-*r*99.9%
neg-mul-199.9%
*-commutative99.9%
associate-*r/99.9%
div-sub99.9%
*-commutative99.9%
neg-mul-199.9%
associate-*r*99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
unsub-neg99.9%
Simplified99.9%
if 1.99999999999999996e296 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 50.0%
associate-*l/94.2%
Simplified94.2%
Final simplification95.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_1 -2e-301)
(+ x (* (- x y) (/ (- t z) (- a t))))
(if (<= t_1 0.0)
(- y (/ (* (- y x) (- z a)) t))
(fma (/ (- z t) (- a t)) (- y x) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -2e-301) {
tmp = x + ((x - y) * ((t - z) / (a - t)));
} else if (t_1 <= 0.0) {
tmp = y - (((y - x) * (z - a)) / t);
} else {
tmp = fma(((z - t) / (a - t)), (y - x), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -2e-301) tmp = Float64(x + Float64(Float64(x - y) * Float64(Float64(t - z) / Float64(a - t)))); elseif (t_1 <= 0.0) tmp = Float64(y - Float64(Float64(Float64(y - x) * Float64(z - a)) / t)); else tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-301], N[(x + N[(N[(x - y), $MachinePrecision] * N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(y - N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-301}:\\
\;\;\;\;x + \left(x - y\right) \cdot \frac{t - z}{a - t}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000013e-301Initial program 80.0%
+-commutative80.0%
associate-*l/86.9%
fma-def87.0%
Simplified87.0%
fma-udef86.9%
associate-/r/94.0%
div-inv93.9%
clear-num94.0%
Applied egg-rr94.0%
if -2.00000000000000013e-301 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.8%
+-commutative4.8%
associate-*l/4.7%
fma-def5.4%
Simplified5.4%
fma-udef4.7%
associate-/r/4.8%
div-inv4.8%
clear-num4.8%
Applied egg-rr4.8%
Taylor expanded in t around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
associate-*r*99.9%
neg-mul-199.9%
*-commutative99.9%
associate-*r/99.9%
div-sub99.9%
*-commutative99.9%
neg-mul-199.9%
associate-*r*99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
unsub-neg99.9%
Simplified99.9%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 82.2%
+-commutative82.2%
*-commutative82.2%
associate-/l*85.6%
associate-/r/94.1%
fma-def94.2%
Simplified94.2%
Final simplification94.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z t) (/ (- y x) (- a t)))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-301)
t_2
(if (<= t_2 0.0)
(+ y (/ (* (- y x) (- a z)) t))
(if (<= t_2 2e+296) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - t) * ((y - x) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -2e-301) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else if (t_2 <= 2e+296) {
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 + ((z - t) * ((y - x) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -2e-301) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else if (t_2 <= 2e+296) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - t) * ((y - x) / (a - t))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -2e-301: tmp = t_2 elif t_2 <= 0.0: tmp = y + (((y - x) * (a - z)) / t) elif t_2 <= 2e+296: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t)))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -2e-301) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); elseif (t_2 <= 2e+296) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - t) * ((y - x) / (a - t))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -2e-301) tmp = t_2; elseif (t_2 <= 0.0) tmp = y + (((y - x) * (a - z)) / t); elseif (t_2 <= 2e+296) 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[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-301], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+296], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-301}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+296}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 1.99999999999999996e296 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 45.0%
associate-*l/92.8%
Simplified92.8%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000013e-301 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1.99999999999999996e296Initial program 96.2%
if -2.00000000000000013e-301 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.8%
+-commutative4.8%
associate-*l/4.7%
fma-def5.4%
Simplified5.4%
fma-udef4.7%
associate-/r/4.8%
div-inv4.8%
clear-num4.8%
Applied egg-rr4.8%
Taylor expanded in t around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
associate-*r*99.9%
neg-mul-199.9%
*-commutative99.9%
associate-*r/99.9%
div-sub99.9%
*-commutative99.9%
neg-mul-199.9%
associate-*r*99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
unsub-neg99.9%
Simplified99.9%
Final simplification95.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (or (<= t_1 -2e-301) (not (<= t_1 0.0)))
(+ x (* (- x y) (/ (- t z) (- a t))))
(- y (/ (* (- y x) (- z a)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if ((t_1 <= -2e-301) || !(t_1 <= 0.0)) {
tmp = x + ((x - y) * ((t - z) / (a - t)));
} else {
tmp = y - (((y - x) * (z - a)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - x) * (z - t)) / (a - t))
if ((t_1 <= (-2d-301)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((x - y) * ((t - z) / (a - t)))
else
tmp = y - (((y - x) * (z - a)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if ((t_1 <= -2e-301) || !(t_1 <= 0.0)) {
tmp = x + ((x - y) * ((t - z) / (a - t)));
} else {
tmp = y - (((y - x) * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if (t_1 <= -2e-301) or not (t_1 <= 0.0): tmp = x + ((x - y) * ((t - z) / (a - t))) else: tmp = y - (((y - x) * (z - a)) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -2e-301) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(x - y) * Float64(Float64(t - z) / Float64(a - t)))); else tmp = Float64(y - Float64(Float64(Float64(y - x) * Float64(z - a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if ((t_1 <= -2e-301) || ~((t_1 <= 0.0))) tmp = x + ((x - y) * ((t - z) / (a - t))); else tmp = y - (((y - x) * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-301], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(x - y), $MachinePrecision] * N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-301} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \left(x - y\right) \cdot \frac{t - z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.00000000000000013e-301 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 81.0%
+-commutative81.0%
associate-*l/86.2%
fma-def86.3%
Simplified86.3%
fma-udef86.2%
associate-/r/94.0%
div-inv94.0%
clear-num94.1%
Applied egg-rr94.1%
if -2.00000000000000013e-301 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.8%
+-commutative4.8%
associate-*l/4.7%
fma-def5.4%
Simplified5.4%
fma-udef4.7%
associate-/r/4.8%
div-inv4.8%
clear-num4.8%
Applied egg-rr4.8%
Taylor expanded in t around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
associate-*r*99.9%
neg-mul-199.9%
*-commutative99.9%
associate-*r/99.9%
div-sub99.9%
*-commutative99.9%
neg-mul-199.9%
associate-*r*99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
unsub-neg99.9%
Simplified99.9%
Final simplification94.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= a -1.6e+24)
(- x (/ (- x y) (/ a (- z t))))
(if (<= a -4.9e-111)
t_1
(if (<= a 9.2e-200)
(- y (/ (* (- y x) (- z a)) t))
(if (<= a 1.5e-119) t_1 (+ x (* (- z t) (/ y (- a t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (a <= -1.6e+24) {
tmp = x - ((x - y) / (a / (z - t)));
} else if (a <= -4.9e-111) {
tmp = t_1;
} else if (a <= 9.2e-200) {
tmp = y - (((y - x) * (z - a)) / t);
} else if (a <= 1.5e-119) {
tmp = t_1;
} else {
tmp = x + ((z - t) * (y / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / (a - t))
if (a <= (-1.6d+24)) then
tmp = x - ((x - y) / (a / (z - t)))
else if (a <= (-4.9d-111)) then
tmp = t_1
else if (a <= 9.2d-200) then
tmp = y - (((y - x) * (z - a)) / t)
else if (a <= 1.5d-119) then
tmp = t_1
else
tmp = x + ((z - t) * (y / (a - 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 - t) / (a - t));
double tmp;
if (a <= -1.6e+24) {
tmp = x - ((x - y) / (a / (z - t)));
} else if (a <= -4.9e-111) {
tmp = t_1;
} else if (a <= 9.2e-200) {
tmp = y - (((y - x) * (z - a)) / t);
} else if (a <= 1.5e-119) {
tmp = t_1;
} else {
tmp = x + ((z - t) * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if a <= -1.6e+24: tmp = x - ((x - y) / (a / (z - t))) elif a <= -4.9e-111: tmp = t_1 elif a <= 9.2e-200: tmp = y - (((y - x) * (z - a)) / t) elif a <= 1.5e-119: tmp = t_1 else: tmp = x + ((z - t) * (y / (a - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (a <= -1.6e+24) tmp = Float64(x - Float64(Float64(x - y) / Float64(a / Float64(z - t)))); elseif (a <= -4.9e-111) tmp = t_1; elseif (a <= 9.2e-200) tmp = Float64(y - Float64(Float64(Float64(y - x) * Float64(z - a)) / t)); elseif (a <= 1.5e-119) tmp = t_1; else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (a <= -1.6e+24) tmp = x - ((x - y) / (a / (z - t))); elseif (a <= -4.9e-111) tmp = t_1; elseif (a <= 9.2e-200) tmp = y - (((y - x) * (z - a)) / t); elseif (a <= 1.5e-119) tmp = t_1; else tmp = x + ((z - t) * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.6e+24], N[(x - N[(N[(x - y), $MachinePrecision] / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.9e-111], t$95$1, If[LessEqual[a, 9.2e-200], N[(y - N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e-119], t$95$1, N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a \leq -1.6 \cdot 10^{+24}:\\
\;\;\;\;x - \frac{x - y}{\frac{a}{z - t}}\\
\mathbf{elif}\;a \leq -4.9 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{-200}:\\
\;\;\;\;y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-119}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -1.5999999999999999e24Initial program 81.9%
associate-*l/92.6%
Simplified92.6%
Taylor expanded in a around inf 74.3%
associate-/l*85.2%
Simplified85.2%
if -1.5999999999999999e24 < a < -4.90000000000000019e-111 or 9.2000000000000003e-200 < a < 1.5000000000000001e-119Initial program 67.3%
+-commutative67.3%
associate-*l/77.1%
fma-def77.2%
Simplified77.2%
fma-udef77.1%
associate-/r/85.3%
div-inv85.3%
clear-num85.5%
Applied egg-rr85.5%
Taylor expanded in y around -inf 58.1%
expm1-log1p-u40.8%
expm1-udef19.0%
associate-/l*24.4%
Applied egg-rr24.4%
expm1-def46.2%
expm1-log1p78.3%
associate-/r/61.9%
*-commutative61.9%
associate-*r/58.1%
*-commutative58.1%
associate-*r/78.4%
Simplified78.4%
if -4.90000000000000019e-111 < a < 9.2000000000000003e-200Initial program 72.5%
+-commutative72.5%
associate-*l/61.4%
fma-def61.4%
Simplified61.4%
fma-udef61.4%
associate-/r/75.3%
div-inv75.4%
clear-num75.4%
Applied egg-rr75.4%
Taylor expanded in t around inf 85.5%
associate--l+85.5%
associate-*r/85.5%
associate-*r*85.5%
neg-mul-185.5%
*-commutative85.5%
associate-*r/85.5%
div-sub85.5%
*-commutative85.5%
neg-mul-185.5%
associate-*r*85.5%
distribute-lft-out--85.5%
associate-*r/85.5%
mul-1-neg85.5%
unsub-neg85.5%
Simplified85.5%
if 1.5000000000000001e-119 < a Initial program 76.9%
associate-*l/87.5%
Simplified87.5%
Taylor expanded in y around inf 67.3%
associate-/l*79.6%
associate-/r/77.3%
Simplified77.3%
Final simplification81.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z t) (/ y (- a t)))))
(t_2 (+ y (/ (- x y) (/ t (- z a))))))
(if (<= t -3.7e+47)
t_2
(if (<= t -3.8e-159)
t_1
(if (<= t 6e-68)
(- x (/ (* z (- x y)) (- a t)))
(if (<= t 3.4e+137) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - t) * (y / (a - t)));
double t_2 = y + ((x - y) / (t / (z - a)));
double tmp;
if (t <= -3.7e+47) {
tmp = t_2;
} else if (t <= -3.8e-159) {
tmp = t_1;
} else if (t <= 6e-68) {
tmp = x - ((z * (x - y)) / (a - t));
} else if (t <= 3.4e+137) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z - t) * (y / (a - t)))
t_2 = y + ((x - y) / (t / (z - a)))
if (t <= (-3.7d+47)) then
tmp = t_2
else if (t <= (-3.8d-159)) then
tmp = t_1
else if (t <= 6d-68) then
tmp = x - ((z * (x - y)) / (a - t))
else if (t <= 3.4d+137) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - t) * (y / (a - t)));
double t_2 = y + ((x - y) / (t / (z - a)));
double tmp;
if (t <= -3.7e+47) {
tmp = t_2;
} else if (t <= -3.8e-159) {
tmp = t_1;
} else if (t <= 6e-68) {
tmp = x - ((z * (x - y)) / (a - t));
} else if (t <= 3.4e+137) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - t) * (y / (a - t))) t_2 = y + ((x - y) / (t / (z - a))) tmp = 0 if t <= -3.7e+47: tmp = t_2 elif t <= -3.8e-159: tmp = t_1 elif t <= 6e-68: tmp = x - ((z * (x - y)) / (a - t)) elif t <= 3.4e+137: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))) t_2 = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a)))) tmp = 0.0 if (t <= -3.7e+47) tmp = t_2; elseif (t <= -3.8e-159) tmp = t_1; elseif (t <= 6e-68) tmp = Float64(x - Float64(Float64(z * Float64(x - y)) / Float64(a - t))); elseif (t <= 3.4e+137) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - t) * (y / (a - t))); t_2 = y + ((x - y) / (t / (z - a))); tmp = 0.0; if (t <= -3.7e+47) tmp = t_2; elseif (t <= -3.8e-159) tmp = t_1; elseif (t <= 6e-68) tmp = x - ((z * (x - y)) / (a - t)); elseif (t <= 3.4e+137) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+47], t$95$2, If[LessEqual[t, -3.8e-159], t$95$1, If[LessEqual[t, 6e-68], N[(x - N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+137], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - t\right) \cdot \frac{y}{a - t}\\
t_2 := y + \frac{x - y}{\frac{t}{z - a}}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-68}:\\
\;\;\;\;x - \frac{z \cdot \left(x - y\right)}{a - t}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.70000000000000041e47 or 3.39999999999999986e137 < t Initial program 44.9%
associate-*l/60.4%
Simplified60.4%
Taylor expanded in t around inf 72.2%
associate--l+72.2%
associate-*r/72.2%
associate-*r/72.2%
div-sub72.2%
distribute-lft-out--72.2%
mul-1-neg72.2%
distribute-neg-frac72.2%
unsub-neg72.2%
distribute-rgt-out--72.3%
associate-/l*87.8%
Simplified87.8%
if -3.70000000000000041e47 < t < -3.8000000000000001e-159 or 6e-68 < t < 3.39999999999999986e137Initial program 83.9%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in y around inf 69.4%
associate-/l*77.6%
associate-/r/74.5%
Simplified74.5%
if -3.8000000000000001e-159 < t < 6e-68Initial program 94.1%
associate-*l/87.5%
Simplified87.5%
Taylor expanded in z around inf 89.7%
Final simplification83.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= t -3.9e+115)
t_1
(if (<= t -4.2e+64)
(* (- y x) (/ z (- a t)))
(if (or (<= t -4.8e-123) (not (<= t 2.9e-60)))
t_1
(+ x (/ z (/ a (- y x)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -3.9e+115) {
tmp = t_1;
} else if (t <= -4.2e+64) {
tmp = (y - x) * (z / (a - t));
} else if ((t <= -4.8e-123) || !(t <= 2.9e-60)) {
tmp = t_1;
} else {
tmp = x + (z / (a / (y - 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) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / (a - t))
if (t <= (-3.9d+115)) then
tmp = t_1
else if (t <= (-4.2d+64)) then
tmp = (y - x) * (z / (a - t))
else if ((t <= (-4.8d-123)) .or. (.not. (t <= 2.9d-60))) then
tmp = t_1
else
tmp = x + (z / (a / (y - x)))
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 - t) / (a - t));
double tmp;
if (t <= -3.9e+115) {
tmp = t_1;
} else if (t <= -4.2e+64) {
tmp = (y - x) * (z / (a - t));
} else if ((t <= -4.8e-123) || !(t <= 2.9e-60)) {
tmp = t_1;
} else {
tmp = x + (z / (a / (y - x)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if t <= -3.9e+115: tmp = t_1 elif t <= -4.2e+64: tmp = (y - x) * (z / (a - t)) elif (t <= -4.8e-123) or not (t <= 2.9e-60): tmp = t_1 else: tmp = x + (z / (a / (y - x))) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -3.9e+115) tmp = t_1; elseif (t <= -4.2e+64) tmp = Float64(Float64(y - x) * Float64(z / Float64(a - t))); elseif ((t <= -4.8e-123) || !(t <= 2.9e-60)) tmp = t_1; else tmp = Float64(x + Float64(z / Float64(a / Float64(y - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (t <= -3.9e+115) tmp = t_1; elseif (t <= -4.2e+64) tmp = (y - x) * (z / (a - t)); elseif ((t <= -4.8e-123) || ~((t <= 2.9e-60))) tmp = t_1; else tmp = x + (z / (a / (y - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.9e+115], t$95$1, If[LessEqual[t, -4.2e+64], N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -4.8e-123], N[Not[LessEqual[t, 2.9e-60]], $MachinePrecision]], t$95$1, N[(x + N[(z / N[(a / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -3.9 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{+64}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-123} \lor \neg \left(t \leq 2.9 \cdot 10^{-60}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y - x}}\\
\end{array}
\end{array}
if t < -3.90000000000000006e115 or -4.2000000000000001e64 < t < -4.8e-123 or 2.8999999999999999e-60 < t Initial program 62.6%
+-commutative62.6%
associate-*l/74.0%
fma-def74.2%
Simplified74.2%
fma-udef74.0%
associate-/r/81.9%
div-inv81.8%
clear-num81.9%
Applied egg-rr81.9%
Taylor expanded in y around -inf 51.2%
expm1-log1p-u39.0%
expm1-udef15.3%
associate-/l*20.8%
Applied egg-rr20.8%
expm1-def44.5%
expm1-log1p67.9%
associate-/r/54.5%
*-commutative54.5%
associate-*r/51.2%
*-commutative51.2%
associate-*r/67.9%
Simplified67.9%
if -3.90000000000000006e115 < t < -4.2000000000000001e64Initial program 83.1%
+-commutative83.1%
associate-*l/82.5%
fma-def82.3%
Simplified82.3%
fma-udef82.5%
associate-/r/91.1%
div-inv90.9%
clear-num91.2%
Applied egg-rr91.2%
Taylor expanded in z around inf 55.8%
div-sub55.9%
associate-*r/56.9%
*-commutative56.9%
associate-*r/64.7%
*-commutative64.7%
Simplified64.7%
if -4.8e-123 < t < 2.8999999999999999e-60Initial program 93.8%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in t around 0 80.6%
associate-/l*79.7%
Simplified79.7%
Final simplification72.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= t -1.36e+116)
t_1
(if (<= t -2.1e+64)
(* (- y x) (/ z (- a t)))
(if (or (<= t -2.3e-125) (not (<= t 1.75e-60)))
t_1
(- x (/ (* z (- x y)) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -1.36e+116) {
tmp = t_1;
} else if (t <= -2.1e+64) {
tmp = (y - x) * (z / (a - t));
} else if ((t <= -2.3e-125) || !(t <= 1.75e-60)) {
tmp = t_1;
} else {
tmp = x - ((z * (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) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / (a - t))
if (t <= (-1.36d+116)) then
tmp = t_1
else if (t <= (-2.1d+64)) then
tmp = (y - x) * (z / (a - t))
else if ((t <= (-2.3d-125)) .or. (.not. (t <= 1.75d-60))) then
tmp = t_1
else
tmp = x - ((z * (x - y)) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -1.36e+116) {
tmp = t_1;
} else if (t <= -2.1e+64) {
tmp = (y - x) * (z / (a - t));
} else if ((t <= -2.3e-125) || !(t <= 1.75e-60)) {
tmp = t_1;
} else {
tmp = x - ((z * (x - y)) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if t <= -1.36e+116: tmp = t_1 elif t <= -2.1e+64: tmp = (y - x) * (z / (a - t)) elif (t <= -2.3e-125) or not (t <= 1.75e-60): tmp = t_1 else: tmp = x - ((z * (x - y)) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -1.36e+116) tmp = t_1; elseif (t <= -2.1e+64) tmp = Float64(Float64(y - x) * Float64(z / Float64(a - t))); elseif ((t <= -2.3e-125) || !(t <= 1.75e-60)) tmp = t_1; else tmp = Float64(x - Float64(Float64(z * Float64(x - y)) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (t <= -1.36e+116) tmp = t_1; elseif (t <= -2.1e+64) tmp = (y - x) * (z / (a - t)); elseif ((t <= -2.3e-125) || ~((t <= 1.75e-60))) tmp = t_1; else tmp = x - ((z * (x - y)) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.36e+116], t$95$1, If[LessEqual[t, -2.1e+64], N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.3e-125], N[Not[LessEqual[t, 1.75e-60]], $MachinePrecision]], t$95$1, N[(x - N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -1.36 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{+64}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-125} \lor \neg \left(t \leq 1.75 \cdot 10^{-60}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot \left(x - y\right)}{a}\\
\end{array}
\end{array}
if t < -1.36e116 or -2.1e64 < t < -2.2999999999999999e-125 or 1.74999999999999988e-60 < t Initial program 62.6%
+-commutative62.6%
associate-*l/74.0%
fma-def74.2%
Simplified74.2%
fma-udef74.0%
associate-/r/81.9%
div-inv81.8%
clear-num81.9%
Applied egg-rr81.9%
Taylor expanded in y around -inf 51.2%
expm1-log1p-u39.0%
expm1-udef15.3%
associate-/l*20.8%
Applied egg-rr20.8%
expm1-def44.5%
expm1-log1p67.9%
associate-/r/54.5%
*-commutative54.5%
associate-*r/51.2%
*-commutative51.2%
associate-*r/67.9%
Simplified67.9%
if -1.36e116 < t < -2.1e64Initial program 83.1%
+-commutative83.1%
associate-*l/82.5%
fma-def82.3%
Simplified82.3%
fma-udef82.5%
associate-/r/91.1%
div-inv90.9%
clear-num91.2%
Applied egg-rr91.2%
Taylor expanded in z around inf 55.8%
div-sub55.9%
associate-*r/56.9%
*-commutative56.9%
associate-*r/64.7%
*-commutative64.7%
Simplified64.7%
if -2.2999999999999999e-125 < t < 1.74999999999999988e-60Initial program 93.8%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in t around 0 80.6%
Final simplification72.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= t -2.4e+116)
t_1
(if (<= t -2.1e+64)
(- x (/ z (/ t (- y x))))
(if (or (<= t -1.3e-123) (not (<= t 5.1e-61)))
t_1
(- x (/ (* z (- x y)) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -2.4e+116) {
tmp = t_1;
} else if (t <= -2.1e+64) {
tmp = x - (z / (t / (y - x)));
} else if ((t <= -1.3e-123) || !(t <= 5.1e-61)) {
tmp = t_1;
} else {
tmp = x - ((z * (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) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / (a - t))
if (t <= (-2.4d+116)) then
tmp = t_1
else if (t <= (-2.1d+64)) then
tmp = x - (z / (t / (y - x)))
else if ((t <= (-1.3d-123)) .or. (.not. (t <= 5.1d-61))) then
tmp = t_1
else
tmp = x - ((z * (x - y)) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -2.4e+116) {
tmp = t_1;
} else if (t <= -2.1e+64) {
tmp = x - (z / (t / (y - x)));
} else if ((t <= -1.3e-123) || !(t <= 5.1e-61)) {
tmp = t_1;
} else {
tmp = x - ((z * (x - y)) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if t <= -2.4e+116: tmp = t_1 elif t <= -2.1e+64: tmp = x - (z / (t / (y - x))) elif (t <= -1.3e-123) or not (t <= 5.1e-61): tmp = t_1 else: tmp = x - ((z * (x - y)) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -2.4e+116) tmp = t_1; elseif (t <= -2.1e+64) tmp = Float64(x - Float64(z / Float64(t / Float64(y - x)))); elseif ((t <= -1.3e-123) || !(t <= 5.1e-61)) tmp = t_1; else tmp = Float64(x - Float64(Float64(z * Float64(x - y)) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (t <= -2.4e+116) tmp = t_1; elseif (t <= -2.1e+64) tmp = x - (z / (t / (y - x))); elseif ((t <= -1.3e-123) || ~((t <= 5.1e-61))) tmp = t_1; else tmp = x - ((z * (x - y)) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e+116], t$95$1, If[LessEqual[t, -2.1e+64], N[(x - N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.3e-123], N[Not[LessEqual[t, 5.1e-61]], $MachinePrecision]], t$95$1, N[(x - N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{+64}:\\
\;\;\;\;x - \frac{z}{\frac{t}{y - x}}\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-123} \lor \neg \left(t \leq 5.1 \cdot 10^{-61}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot \left(x - y\right)}{a}\\
\end{array}
\end{array}
if t < -2.4e116 or -2.1e64 < t < -1.29999999999999998e-123 or 5.09999999999999968e-61 < t Initial program 62.6%
+-commutative62.6%
associate-*l/74.0%
fma-def74.2%
Simplified74.2%
fma-udef74.0%
associate-/r/81.9%
div-inv81.8%
clear-num81.9%
Applied egg-rr81.9%
Taylor expanded in y around -inf 51.2%
expm1-log1p-u39.0%
expm1-udef15.3%
associate-/l*20.8%
Applied egg-rr20.8%
expm1-def44.5%
expm1-log1p67.9%
associate-/r/54.5%
*-commutative54.5%
associate-*r/51.2%
*-commutative51.2%
associate-*r/67.9%
Simplified67.9%
if -2.4e116 < t < -2.1e64Initial program 83.1%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in z around inf 73.7%
Taylor expanded in a around 0 65.1%
mul-1-neg65.1%
unsub-neg65.1%
associate-/l*72.9%
Simplified72.9%
if -1.29999999999999998e-123 < t < 5.09999999999999968e-61Initial program 93.8%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in t around 0 80.6%
Final simplification72.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (* x (- 1.0 (/ z a)))))
(if (<= a -1.9e+25)
t_2
(if (<= a 7e-72)
t_1
(if (<= a 320000.0)
t_2
(if (<= a 9.5e+161) t_1 (+ x (/ y (/ a z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double t_2 = x * (1.0 - (z / a));
double tmp;
if (a <= -1.9e+25) {
tmp = t_2;
} else if (a <= 7e-72) {
tmp = t_1;
} else if (a <= 320000.0) {
tmp = t_2;
} else if (a <= 9.5e+161) {
tmp = t_1;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * ((z - t) / (a - t))
t_2 = x * (1.0d0 - (z / a))
if (a <= (-1.9d+25)) then
tmp = t_2
else if (a <= 7d-72) then
tmp = t_1
else if (a <= 320000.0d0) then
tmp = t_2
else if (a <= 9.5d+161) then
tmp = t_1
else
tmp = x + (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double t_2 = x * (1.0 - (z / a));
double tmp;
if (a <= -1.9e+25) {
tmp = t_2;
} else if (a <= 7e-72) {
tmp = t_1;
} else if (a <= 320000.0) {
tmp = t_2;
} else if (a <= 9.5e+161) {
tmp = t_1;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) t_2 = x * (1.0 - (z / a)) tmp = 0 if a <= -1.9e+25: tmp = t_2 elif a <= 7e-72: tmp = t_1 elif a <= 320000.0: tmp = t_2 elif a <= 9.5e+161: tmp = t_1 else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) t_2 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (a <= -1.9e+25) tmp = t_2; elseif (a <= 7e-72) tmp = t_1; elseif (a <= 320000.0) tmp = t_2; elseif (a <= 9.5e+161) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); t_2 = x * (1.0 - (z / a)); tmp = 0.0; if (a <= -1.9e+25) tmp = t_2; elseif (a <= 7e-72) tmp = t_1; elseif (a <= 320000.0) tmp = t_2; elseif (a <= 9.5e+161) tmp = t_1; else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.9e+25], t$95$2, If[LessEqual[a, 7e-72], t$95$1, If[LessEqual[a, 320000.0], t$95$2, If[LessEqual[a, 9.5e+161], t$95$1, N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
t_2 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;a \leq -1.9 \cdot 10^{+25}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 320000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+161}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if a < -1.9e25 or 7.00000000000000001e-72 < a < 3.2e5Initial program 78.9%
associate-*l/88.5%
Simplified88.5%
Taylor expanded in t around 0 65.4%
Taylor expanded in x around inf 67.4%
mul-1-neg67.4%
unsub-neg67.4%
Simplified67.4%
if -1.9e25 < a < 7.00000000000000001e-72 or 3.2e5 < a < 9.50000000000000061e161Initial program 73.6%
+-commutative73.6%
associate-*l/73.9%
fma-def73.9%
Simplified73.9%
fma-udef73.9%
associate-/r/83.6%
div-inv83.6%
clear-num83.7%
Applied egg-rr83.7%
Taylor expanded in y around -inf 56.6%
expm1-log1p-u40.2%
expm1-udef20.0%
associate-/l*23.1%
Applied egg-rr23.1%
expm1-def43.3%
expm1-log1p67.2%
associate-/r/52.1%
*-commutative52.1%
associate-*r/56.6%
*-commutative56.6%
associate-*r/67.3%
Simplified67.3%
if 9.50000000000000061e161 < a Initial program 74.0%
associate-*l/90.9%
Simplified90.9%
Taylor expanded in t around 0 68.1%
Taylor expanded in y around inf 68.4%
associate-/l*78.5%
Simplified78.5%
Final simplification68.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (/ z (/ t (- y x))))) (t_2 (* y (/ (- z t) (- a t)))))
(if (<= t -2.9e+119)
t_2
(if (<= t -48.0)
t_1
(if (<= t -1.55e-124)
t_2
(if (<= t 1e+34) (- x (/ (* z (- x y)) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - (z / (t / (y - x)));
double t_2 = y * ((z - t) / (a - t));
double tmp;
if (t <= -2.9e+119) {
tmp = t_2;
} else if (t <= -48.0) {
tmp = t_1;
} else if (t <= -1.55e-124) {
tmp = t_2;
} else if (t <= 1e+34) {
tmp = x - ((z * (x - y)) / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y - (z / (t / (y - x)))
t_2 = y * ((z - t) / (a - t))
if (t <= (-2.9d+119)) then
tmp = t_2
else if (t <= (-48.0d0)) then
tmp = t_1
else if (t <= (-1.55d-124)) then
tmp = t_2
else if (t <= 1d+34) then
tmp = x - ((z * (x - y)) / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (z / (t / (y - x)));
double t_2 = y * ((z - t) / (a - t));
double tmp;
if (t <= -2.9e+119) {
tmp = t_2;
} else if (t <= -48.0) {
tmp = t_1;
} else if (t <= -1.55e-124) {
tmp = t_2;
} else if (t <= 1e+34) {
tmp = x - ((z * (x - y)) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (z / (t / (y - x))) t_2 = y * ((z - t) / (a - t)) tmp = 0 if t <= -2.9e+119: tmp = t_2 elif t <= -48.0: tmp = t_1 elif t <= -1.55e-124: tmp = t_2 elif t <= 1e+34: tmp = x - ((z * (x - y)) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(z / Float64(t / Float64(y - x)))) t_2 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -2.9e+119) tmp = t_2; elseif (t <= -48.0) tmp = t_1; elseif (t <= -1.55e-124) tmp = t_2; elseif (t <= 1e+34) tmp = Float64(x - Float64(Float64(z * Float64(x - y)) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (z / (t / (y - x))); t_2 = y * ((z - t) / (a - t)); tmp = 0.0; if (t <= -2.9e+119) tmp = t_2; elseif (t <= -48.0) tmp = t_1; elseif (t <= -1.55e-124) tmp = t_2; elseif (t <= 1e+34) tmp = x - ((z * (x - y)) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+119], t$95$2, If[LessEqual[t, -48.0], t$95$1, If[LessEqual[t, -1.55e-124], t$95$2, If[LessEqual[t, 1e+34], N[(x - N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{z}{\frac{t}{y - x}}\\
t_2 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+119}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -48:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{-124}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 10^{+34}:\\
\;\;\;\;x - \frac{z \cdot \left(x - y\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.90000000000000007e119 or -48 < t < -1.5499999999999999e-124Initial program 63.1%
+-commutative63.1%
associate-*l/77.0%
fma-def77.2%
Simplified77.2%
fma-udef77.0%
associate-/r/87.9%
div-inv87.8%
clear-num87.8%
Applied egg-rr87.8%
Taylor expanded in y around -inf 57.7%
expm1-log1p-u39.7%
expm1-udef14.9%
associate-/l*21.8%
Applied egg-rr21.8%
expm1-def46.6%
expm1-log1p77.7%
associate-/r/63.7%
*-commutative63.7%
associate-*r/57.7%
*-commutative57.7%
associate-*r/77.6%
Simplified77.6%
if -2.90000000000000007e119 < t < -48 or 9.99999999999999946e33 < t Initial program 54.3%
associate-*l/68.7%
Simplified68.7%
Taylor expanded in t around inf 61.9%
associate--l+61.9%
associate-*r/61.9%
associate-*r/61.9%
div-sub61.9%
distribute-lft-out--61.9%
mul-1-neg61.9%
distribute-neg-frac61.9%
unsub-neg61.9%
distribute-rgt-out--61.9%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in z around inf 59.6%
associate-/l*68.5%
Simplified68.5%
if -1.5499999999999999e-124 < t < 9.99999999999999946e33Initial program 93.8%
associate-*l/88.2%
Simplified88.2%
Taylor expanded in t around 0 74.6%
Final simplification73.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a z)))))
(if (<= t -5.5e+49)
y
(if (<= t -2.7e-247)
t_1
(if (<= t 1.25e-230)
(* x (- 1.0 (/ z a)))
(if (<= t 1.08e+136) t_1 y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / z));
double tmp;
if (t <= -5.5e+49) {
tmp = y;
} else if (t <= -2.7e-247) {
tmp = t_1;
} else if (t <= 1.25e-230) {
tmp = x * (1.0 - (z / a));
} else if (t <= 1.08e+136) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y / (a / z))
if (t <= (-5.5d+49)) then
tmp = y
else if (t <= (-2.7d-247)) then
tmp = t_1
else if (t <= 1.25d-230) then
tmp = x * (1.0d0 - (z / a))
else if (t <= 1.08d+136) then
tmp = t_1
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / z));
double tmp;
if (t <= -5.5e+49) {
tmp = y;
} else if (t <= -2.7e-247) {
tmp = t_1;
} else if (t <= 1.25e-230) {
tmp = x * (1.0 - (z / a));
} else if (t <= 1.08e+136) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / z)) tmp = 0 if t <= -5.5e+49: tmp = y elif t <= -2.7e-247: tmp = t_1 elif t <= 1.25e-230: tmp = x * (1.0 - (z / a)) elif t <= 1.08e+136: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / z))) tmp = 0.0 if (t <= -5.5e+49) tmp = y; elseif (t <= -2.7e-247) tmp = t_1; elseif (t <= 1.25e-230) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif (t <= 1.08e+136) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / z)); tmp = 0.0; if (t <= -5.5e+49) tmp = y; elseif (t <= -2.7e-247) tmp = t_1; elseif (t <= 1.25e-230) tmp = x * (1.0 - (z / a)); elseif (t <= 1.08e+136) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+49], y, If[LessEqual[t, -2.7e-247], t$95$1, If[LessEqual[t, 1.25e-230], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.08e+136], t$95$1, y]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+49}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-230}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -5.50000000000000042e49 or 1.07999999999999994e136 < t Initial program 45.4%
associate-*l/61.1%
Simplified61.1%
Taylor expanded in t around inf 59.6%
if -5.50000000000000042e49 < t < -2.70000000000000008e-247 or 1.25000000000000009e-230 < t < 1.07999999999999994e136Initial program 87.0%
associate-*l/88.8%
Simplified88.8%
Taylor expanded in t around 0 57.1%
Taylor expanded in y around inf 50.6%
associate-/l*54.5%
Simplified54.5%
if -2.70000000000000008e-247 < t < 1.25000000000000009e-230Initial program 93.9%
associate-*l/85.7%
Simplified85.7%
Taylor expanded in t around 0 84.8%
Taylor expanded in x around inf 73.6%
mul-1-neg73.6%
unsub-neg73.6%
Simplified73.6%
Final simplification58.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (/ (- x y) (/ t z)))))
(if (<= t -43.0)
t_1
(if (<= t -2.5e-124)
(* y (/ (- z t) (- a t)))
(if (<= t 3.2e+38) (- x (/ (* z (- x y)) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + ((x - y) / (t / z));
double tmp;
if (t <= -43.0) {
tmp = t_1;
} else if (t <= -2.5e-124) {
tmp = y * ((z - t) / (a - t));
} else if (t <= 3.2e+38) {
tmp = x - ((z * (x - y)) / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y + ((x - y) / (t / z))
if (t <= (-43.0d0)) then
tmp = t_1
else if (t <= (-2.5d-124)) then
tmp = y * ((z - t) / (a - t))
else if (t <= 3.2d+38) then
tmp = x - ((z * (x - y)) / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y + ((x - y) / (t / z));
double tmp;
if (t <= -43.0) {
tmp = t_1;
} else if (t <= -2.5e-124) {
tmp = y * ((z - t) / (a - t));
} else if (t <= 3.2e+38) {
tmp = x - ((z * (x - y)) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + ((x - y) / (t / z)) tmp = 0 if t <= -43.0: tmp = t_1 elif t <= -2.5e-124: tmp = y * ((z - t) / (a - t)) elif t <= 3.2e+38: tmp = x - ((z * (x - y)) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(x - y) / Float64(t / z))) tmp = 0.0 if (t <= -43.0) tmp = t_1; elseif (t <= -2.5e-124) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (t <= 3.2e+38) tmp = Float64(x - Float64(Float64(z * Float64(x - y)) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + ((x - y) / (t / z)); tmp = 0.0; if (t <= -43.0) tmp = t_1; elseif (t <= -2.5e-124) tmp = y * ((z - t) / (a - t)); elseif (t <= 3.2e+38) tmp = x - ((z * (x - y)) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -43.0], t$95$1, If[LessEqual[t, -2.5e-124], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+38], N[(x - N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \frac{x - y}{\frac{t}{z}}\\
\mathbf{if}\;t \leq -43:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-124}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+38}:\\
\;\;\;\;x - \frac{z \cdot \left(x - y\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -43 or 3.19999999999999985e38 < t Initial program 52.3%
associate-*l/67.8%
Simplified67.8%
Taylor expanded in t around inf 64.6%
associate--l+64.6%
associate-*r/64.6%
associate-*r/64.6%
div-sub64.6%
distribute-lft-out--64.6%
mul-1-neg64.6%
distribute-neg-frac64.6%
unsub-neg64.6%
distribute-rgt-out--64.7%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in z around inf 72.5%
if -43 < t < -2.5000000000000001e-124Initial program 84.5%
+-commutative84.5%
associate-*l/92.7%
fma-def92.7%
Simplified92.7%
fma-udef92.7%
associate-/r/96.1%
div-inv96.0%
clear-num95.9%
Applied egg-rr95.9%
Taylor expanded in y around -inf 65.1%
expm1-log1p-u31.5%
expm1-udef23.1%
associate-/l*23.1%
Applied egg-rr23.1%
expm1-def31.6%
expm1-log1p68.9%
associate-/r/65.0%
*-commutative65.0%
associate-*r/65.1%
*-commutative65.1%
associate-*r/68.8%
Simplified68.8%
if -2.5000000000000001e-124 < t < 3.19999999999999985e38Initial program 93.8%
associate-*l/88.2%
Simplified88.2%
Taylor expanded in t around 0 74.6%
Final simplification73.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (/ (- x y) (/ t z)))))
(if (<= t -102.0)
t_1
(if (<= t -4.8e-123)
(/ y (/ (- a t) (- z t)))
(if (<= t 2.7e+28) (- x (/ (* z (- x y)) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + ((x - y) / (t / z));
double tmp;
if (t <= -102.0) {
tmp = t_1;
} else if (t <= -4.8e-123) {
tmp = y / ((a - t) / (z - t));
} else if (t <= 2.7e+28) {
tmp = x - ((z * (x - y)) / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y + ((x - y) / (t / z))
if (t <= (-102.0d0)) then
tmp = t_1
else if (t <= (-4.8d-123)) then
tmp = y / ((a - t) / (z - t))
else if (t <= 2.7d+28) then
tmp = x - ((z * (x - y)) / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y + ((x - y) / (t / z));
double tmp;
if (t <= -102.0) {
tmp = t_1;
} else if (t <= -4.8e-123) {
tmp = y / ((a - t) / (z - t));
} else if (t <= 2.7e+28) {
tmp = x - ((z * (x - y)) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + ((x - y) / (t / z)) tmp = 0 if t <= -102.0: tmp = t_1 elif t <= -4.8e-123: tmp = y / ((a - t) / (z - t)) elif t <= 2.7e+28: tmp = x - ((z * (x - y)) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(x - y) / Float64(t / z))) tmp = 0.0 if (t <= -102.0) tmp = t_1; elseif (t <= -4.8e-123) tmp = Float64(y / Float64(Float64(a - t) / Float64(z - t))); elseif (t <= 2.7e+28) tmp = Float64(x - Float64(Float64(z * Float64(x - y)) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + ((x - y) / (t / z)); tmp = 0.0; if (t <= -102.0) tmp = t_1; elseif (t <= -4.8e-123) tmp = y / ((a - t) / (z - t)); elseif (t <= 2.7e+28) tmp = x - ((z * (x - y)) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -102.0], t$95$1, If[LessEqual[t, -4.8e-123], N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+28], N[(x - N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \frac{x - y}{\frac{t}{z}}\\
\mathbf{if}\;t \leq -102:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-123}:\\
\;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+28}:\\
\;\;\;\;x - \frac{z \cdot \left(x - y\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -102 or 2.7000000000000002e28 < t Initial program 52.3%
associate-*l/67.8%
Simplified67.8%
Taylor expanded in t around inf 64.6%
associate--l+64.6%
associate-*r/64.6%
associate-*r/64.6%
div-sub64.6%
distribute-lft-out--64.6%
mul-1-neg64.6%
distribute-neg-frac64.6%
unsub-neg64.6%
distribute-rgt-out--64.7%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in z around inf 72.5%
if -102 < t < -4.8e-123Initial program 84.5%
+-commutative84.5%
associate-*l/92.7%
fma-def92.7%
Simplified92.7%
fma-udef92.7%
associate-/r/96.1%
div-inv96.0%
clear-num95.9%
Applied egg-rr95.9%
Taylor expanded in y around inf 68.8%
div-sub68.8%
associate-*r/65.1%
associate-/l*68.9%
Simplified68.9%
if -4.8e-123 < t < 2.7000000000000002e28Initial program 93.8%
associate-*l/88.2%
Simplified88.2%
Taylor expanded in t around 0 74.6%
Final simplification73.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.8e+197) (not (<= t 2.4e+146))) (+ y (/ (- x y) (/ t (- z a)))) (+ x (* (- z t) (/ (- y x) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.8e+197) || !(t <= 2.4e+146)) {
tmp = y + ((x - y) / (t / (z - a)));
} else {
tmp = x + ((z - t) * ((y - x) / (a - 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 ((t <= (-3.8d+197)) .or. (.not. (t <= 2.4d+146))) then
tmp = y + ((x - y) / (t / (z - a)))
else
tmp = x + ((z - t) * ((y - x) / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.8e+197) || !(t <= 2.4e+146)) {
tmp = y + ((x - y) / (t / (z - a)));
} else {
tmp = x + ((z - t) * ((y - x) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.8e+197) or not (t <= 2.4e+146): tmp = y + ((x - y) / (t / (z - a))) else: tmp = x + ((z - t) * ((y - x) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.8e+197) || !(t <= 2.4e+146)) tmp = Float64(y + Float64(Float64(x - y) / Float64(t / Float64(z - a)))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.8e+197) || ~((t <= 2.4e+146))) tmp = y + ((x - y) / (t / (z - a))); else tmp = x + ((z - t) * ((y - x) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.8e+197], N[Not[LessEqual[t, 2.4e+146]], $MachinePrecision]], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+197} \lor \neg \left(t \leq 2.4 \cdot 10^{+146}\right):\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\
\end{array}
\end{array}
if t < -3.8000000000000001e197 or 2.4000000000000002e146 < t Initial program 36.8%
associate-*l/52.5%
Simplified52.5%
Taylor expanded in t around inf 79.1%
associate--l+79.1%
associate-*r/79.1%
associate-*r/79.1%
div-sub79.1%
distribute-lft-out--79.1%
mul-1-neg79.1%
distribute-neg-frac79.1%
unsub-neg79.1%
distribute-rgt-out--79.1%
associate-/l*96.1%
Simplified96.1%
if -3.8000000000000001e197 < t < 2.4000000000000002e146Initial program 84.6%
associate-*l/86.7%
Simplified86.7%
Final simplification88.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.1e+49) (not (<= t 8e+136))) (+ y (/ (- x y) (/ t z))) (- x (* z (/ (- x y) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.1e+49) || !(t <= 8e+136)) {
tmp = y + ((x - y) / (t / z));
} else {
tmp = x - (z * ((x - y) / (a - 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 ((t <= (-2.1d+49)) .or. (.not. (t <= 8d+136))) then
tmp = y + ((x - y) / (t / z))
else
tmp = x - (z * ((x - y) / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.1e+49) || !(t <= 8e+136)) {
tmp = y + ((x - y) / (t / z));
} else {
tmp = x - (z * ((x - y) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.1e+49) or not (t <= 8e+136): tmp = y + ((x - y) / (t / z)) else: tmp = x - (z * ((x - y) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.1e+49) || !(t <= 8e+136)) tmp = Float64(y + Float64(Float64(x - y) / Float64(t / z))); else tmp = Float64(x - Float64(z * Float64(Float64(x - y) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.1e+49) || ~((t <= 8e+136))) tmp = y + ((x - y) / (t / z)); else tmp = x - (z * ((x - y) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.1e+49], N[Not[LessEqual[t, 8e+136]], $MachinePrecision]], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+49} \lor \neg \left(t \leq 8 \cdot 10^{+136}\right):\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{x - y}{a - t}\\
\end{array}
\end{array}
if t < -2.10000000000000011e49 or 8.00000000000000047e136 < t Initial program 45.4%
associate-*l/61.1%
Simplified61.1%
Taylor expanded in t around inf 71.9%
associate--l+71.9%
associate-*r/71.9%
associate-*r/71.9%
div-sub71.9%
distribute-lft-out--71.9%
mul-1-neg71.9%
distribute-neg-frac71.9%
unsub-neg71.9%
distribute-rgt-out--71.9%
associate-/l*87.7%
Simplified87.7%
Taylor expanded in z around inf 80.6%
if -2.10000000000000011e49 < t < 8.00000000000000047e136Initial program 88.3%
associate-*l/88.2%
Simplified88.2%
Taylor expanded in z around inf 73.1%
associate-*r/75.9%
Simplified75.9%
Final simplification77.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.2e-17) (not (<= a 1.95e-84))) (+ x (* (- z t) (/ y (- a t)))) (+ y (/ (- x y) (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.2e-17) || !(a <= 1.95e-84)) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = y + ((x - y) / (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.2d-17)) .or. (.not. (a <= 1.95d-84))) then
tmp = x + ((z - t) * (y / (a - t)))
else
tmp = y + ((x - y) / (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.2e-17) || !(a <= 1.95e-84)) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = y + ((x - y) / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.2e-17) or not (a <= 1.95e-84): tmp = x + ((z - t) * (y / (a - t))) else: tmp = y + ((x - y) / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.2e-17) || !(a <= 1.95e-84)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(y + Float64(Float64(x - y) / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.2e-17) || ~((a <= 1.95e-84))) tmp = x + ((z - t) * (y / (a - t))); else tmp = y + ((x - y) / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.2e-17], N[Not[LessEqual[a, 1.95e-84]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{-17} \lor \neg \left(a \leq 1.95 \cdot 10^{-84}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -3.2000000000000002e-17 or 1.95000000000000011e-84 < a Initial program 77.9%
associate-*l/89.0%
Simplified89.0%
Taylor expanded in y around inf 69.6%
associate-/l*81.1%
associate-/r/79.0%
Simplified79.0%
if -3.2000000000000002e-17 < a < 1.95000000000000011e-84Initial program 71.4%
associate-*l/67.8%
Simplified67.8%
Taylor expanded in t around inf 71.8%
associate--l+71.8%
associate-*r/71.8%
associate-*r/71.8%
div-sub72.8%
distribute-lft-out--72.8%
mul-1-neg72.8%
distribute-neg-frac72.8%
unsub-neg72.8%
distribute-rgt-out--72.8%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in z around inf 77.2%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.05e+21)
(- x (/ (- x y) (/ a (- z t))))
(if (<= a 2.9e-84)
(+ y (/ (- x y) (/ t z)))
(+ x (* (- z t) (/ y (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.05e+21) {
tmp = x - ((x - y) / (a / (z - t)));
} else if (a <= 2.9e-84) {
tmp = y + ((x - y) / (t / z));
} else {
tmp = x + ((z - t) * (y / (a - 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 (a <= (-2.05d+21)) then
tmp = x - ((x - y) / (a / (z - t)))
else if (a <= 2.9d-84) then
tmp = y + ((x - y) / (t / z))
else
tmp = x + ((z - t) * (y / (a - t)))
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+21) {
tmp = x - ((x - y) / (a / (z - t)));
} else if (a <= 2.9e-84) {
tmp = y + ((x - y) / (t / z));
} else {
tmp = x + ((z - t) * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.05e+21: tmp = x - ((x - y) / (a / (z - t))) elif a <= 2.9e-84: tmp = y + ((x - y) / (t / z)) else: tmp = x + ((z - t) * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.05e+21) tmp = Float64(x - Float64(Float64(x - y) / Float64(a / Float64(z - t)))); elseif (a <= 2.9e-84) tmp = Float64(y + Float64(Float64(x - y) / Float64(t / z))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.05e+21) tmp = x - ((x - y) / (a / (z - t))); elseif (a <= 2.9e-84) tmp = y + ((x - y) / (t / z)); else tmp = x + ((z - t) * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.05e+21], N[(x - N[(N[(x - y), $MachinePrecision] / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.9e-84], N[(y + N[(N[(x - y), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{+21}:\\
\;\;\;\;x - \frac{x - y}{\frac{a}{z - t}}\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-84}:\\
\;\;\;\;y + \frac{x - y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -2.05e21Initial program 82.2%
associate-*l/92.8%
Simplified92.8%
Taylor expanded in a around inf 74.8%
associate-/l*85.5%
Simplified85.5%
if -2.05e21 < a < 2.90000000000000019e-84Initial program 69.9%
associate-*l/68.9%
Simplified68.9%
Taylor expanded in t around inf 71.0%
associate--l+71.0%
associate-*r/71.0%
associate-*r/71.0%
div-sub71.9%
distribute-lft-out--71.9%
mul-1-neg71.9%
distribute-neg-frac71.9%
unsub-neg71.9%
distribute-rgt-out--71.9%
associate-/l*77.4%
Simplified77.4%
Taylor expanded in z around inf 76.9%
if 2.90000000000000019e-84 < a Initial program 77.7%
associate-*l/86.8%
Simplified86.8%
Taylor expanded in y around inf 68.7%
associate-/l*80.6%
associate-/r/78.2%
Simplified78.2%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.05e+21) (* x (- 1.0 (/ z a))) (if (<= a 1.25e-73) (/ (- y) (/ t (- z t))) (+ x (/ y (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.05e+21) {
tmp = x * (1.0 - (z / a));
} else if (a <= 1.25e-73) {
tmp = -y / (t / (z - t));
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.05d+21)) then
tmp = x * (1.0d0 - (z / a))
else if (a <= 1.25d-73) then
tmp = -y / (t / (z - t))
else
tmp = x + (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.05e+21) {
tmp = x * (1.0 - (z / a));
} else if (a <= 1.25e-73) {
tmp = -y / (t / (z - t));
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.05e+21: tmp = x * (1.0 - (z / a)) elif a <= 1.25e-73: tmp = -y / (t / (z - t)) else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.05e+21) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif (a <= 1.25e-73) tmp = Float64(Float64(-y) / Float64(t / Float64(z - t))); else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.05e+21) tmp = x * (1.0 - (z / a)); elseif (a <= 1.25e-73) tmp = -y / (t / (z - t)); else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.05e+21], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-73], N[((-y) / N[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{+21}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-73}:\\
\;\;\;\;\frac{-y}{\frac{t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if a < -2.05e21Initial program 82.2%
associate-*l/92.8%
Simplified92.8%
Taylor expanded in t around 0 66.1%
Taylor expanded in x around inf 68.5%
mul-1-neg68.5%
unsub-neg68.5%
Simplified68.5%
if -2.05e21 < a < 1.25e-73Initial program 70.9%
+-commutative70.9%
associate-*l/69.9%
fma-def70.0%
Simplified70.0%
fma-udef69.9%
associate-/r/80.7%
div-inv80.7%
clear-num80.8%
Applied egg-rr80.8%
Taylor expanded in y around -inf 56.6%
Taylor expanded in a around 0 47.2%
mul-1-neg47.2%
associate-/l*58.0%
distribute-neg-frac58.0%
Simplified58.0%
if 1.25e-73 < a Initial program 76.6%
associate-*l/86.2%
Simplified86.2%
Taylor expanded in t around 0 60.8%
Taylor expanded in y around inf 55.0%
associate-/l*60.2%
Simplified60.2%
Final simplification60.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.6e+49) y (if (<= t 7e+135) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e+49) {
tmp = y;
} else if (t <= 7e+135) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-5.6d+49)) then
tmp = y
else if (t <= 7d+135) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.6e+49) {
tmp = y;
} else if (t <= 7e+135) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.6e+49: tmp = y elif t <= 7e+135: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.6e+49) tmp = y; elseif (t <= 7e+135) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.6e+49) tmp = y; elseif (t <= 7e+135) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.6e+49], y, If[LessEqual[t, 7e+135], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+49}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+135}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -5.5999999999999996e49 or 7.0000000000000005e135 < t Initial program 45.4%
associate-*l/61.1%
Simplified61.1%
Taylor expanded in t around inf 59.6%
if -5.5999999999999996e49 < t < 7.0000000000000005e135Initial program 88.3%
associate-*l/88.2%
Simplified88.2%
Taylor expanded in t around 0 62.3%
Taylor expanded in x around inf 50.4%
mul-1-neg50.4%
unsub-neg50.4%
Simplified50.4%
Final simplification53.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -2e+21) (* x (- 1.0 (/ z a))) (if (<= a 1.2e-73) (- y (* z (/ y t))) (+ x (/ y (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e+21) {
tmp = x * (1.0 - (z / a));
} else if (a <= 1.2e-73) {
tmp = y - (z * (y / t));
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2d+21)) then
tmp = x * (1.0d0 - (z / a))
else if (a <= 1.2d-73) then
tmp = y - (z * (y / t))
else
tmp = x + (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e+21) {
tmp = x * (1.0 - (z / a));
} else if (a <= 1.2e-73) {
tmp = y - (z * (y / t));
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e+21: tmp = x * (1.0 - (z / a)) elif a <= 1.2e-73: tmp = y - (z * (y / t)) else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e+21) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif (a <= 1.2e-73) tmp = Float64(y - Float64(z * Float64(y / t))); else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2e+21) tmp = x * (1.0 - (z / a)); elseif (a <= 1.2e-73) tmp = y - (z * (y / t)); else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e+21], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e-73], N[(y - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{+21}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-73}:\\
\;\;\;\;y - z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if a < -2e21Initial program 82.2%
associate-*l/92.8%
Simplified92.8%
Taylor expanded in t around 0 66.1%
Taylor expanded in x around inf 68.5%
mul-1-neg68.5%
unsub-neg68.5%
Simplified68.5%
if -2e21 < a < 1.20000000000000003e-73Initial program 70.9%
+-commutative70.9%
associate-*l/69.9%
fma-def70.0%
Simplified70.0%
fma-udef69.9%
associate-/r/80.7%
div-inv80.7%
clear-num80.8%
Applied egg-rr80.8%
Taylor expanded in y around -inf 56.6%
Taylor expanded in a around 0 47.2%
associate-*r/47.2%
neg-mul-147.2%
distribute-lft-neg-in47.2%
Simplified47.2%
Taylor expanded in z around 0 53.4%
mul-1-neg53.4%
unsub-neg53.4%
associate-/l*58.0%
associate-/r/54.1%
Simplified54.1%
if 1.20000000000000003e-73 < a Initial program 76.6%
associate-*l/86.2%
Simplified86.2%
Taylor expanded in t around 0 60.8%
Taylor expanded in y around inf 55.0%
associate-/l*60.2%
Simplified60.2%
Final simplification59.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -4e-96) y (if (<= t 1.3e+138) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4e-96) {
tmp = y;
} else if (t <= 1.3e+138) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-4d-96)) then
tmp = y
else if (t <= 1.3d+138) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4e-96) {
tmp = y;
} else if (t <= 1.3e+138) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4e-96: tmp = y elif t <= 1.3e+138: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4e-96) tmp = y; elseif (t <= 1.3e+138) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4e-96) tmp = y; elseif (t <= 1.3e+138) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4e-96], y, If[LessEqual[t, 1.3e+138], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{-96}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+138}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.9999999999999996e-96 or 1.3e138 < t Initial program 53.9%
associate-*l/67.7%
Simplified67.7%
Taylor expanded in t around inf 50.7%
if -3.9999999999999996e-96 < t < 1.3e138Initial program 89.6%
associate-*l/88.2%
Simplified88.2%
Taylor expanded in a around inf 37.2%
Final simplification42.6%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 75.1%
associate-*l/79.9%
Simplified79.9%
Taylor expanded in a around inf 26.8%
Final simplification26.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024031
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))