
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-262)
(+ x (/ (/ (- y z) (- a z)) (/ -1.0 (- x t))))
(if (<= t_1 0.0)
(+ t (* (/ (- t x) z) (- a y)))
(+ x (/ -1.0 (/ (/ (- a z) (- y z)) (- x t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-262) {
tmp = x + (((y - z) / (a - z)) / (-1.0 / (x - t)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - 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 - z) * ((t - x) / (a - z)))
if (t_1 <= (-2d-262)) then
tmp = x + (((y - z) / (a - z)) / ((-1.0d0) / (x - t)))
else if (t_1 <= 0.0d0) then
tmp = t + (((t - x) / z) * (a - y))
else
tmp = x + ((-1.0d0) / (((a - z) / (y - z)) / (x - 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 - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-262) {
tmp = x + (((y - z) / (a - z)) / (-1.0 / (x - t)));
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_1 <= -2e-262: tmp = x + (((y - z) / (a - z)) / (-1.0 / (x - t))) elif t_1 <= 0.0: tmp = t + (((t - x) / z) * (a - y)) else: tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -2e-262) tmp = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) / Float64(-1.0 / Float64(x - t)))); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(a - z) / Float64(y - z)) / Float64(x - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (t_1 <= -2e-262) tmp = x + (((y - z) / (a - z)) / (-1.0 / (x - t))); elseif (t_1 <= 0.0) tmp = t + (((t - x) / z) * (a - y)); else tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-262], N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] / N[(-1.0 / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-1.0 / N[(N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-262}:\\
\;\;\;\;x + \frac{\frac{y - z}{a - z}}{\frac{-1}{x - t}}\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{\frac{\frac{a - z}{y - z}}{x - t}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.00000000000000002e-262Initial program 90.7%
clear-num90.5%
un-div-inv90.5%
Applied egg-rr90.5%
add-sqr-sqrt46.6%
div-inv46.6%
times-frac44.3%
Applied egg-rr44.3%
associate-*r/48.2%
*-commutative48.2%
associate-*r/48.2%
rem-square-sqrt93.9%
Simplified93.9%
if -2.00000000000000002e-262 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.5%
+-commutative3.5%
fma-define3.7%
Simplified3.7%
Taylor expanded in z around inf 83.0%
associate--l+83.0%
distribute-lft-out--83.0%
div-sub83.0%
mul-1-neg83.0%
unsub-neg83.0%
div-sub83.0%
associate-/l*85.9%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.4%
associate-*r/76.0%
clear-num75.8%
Applied egg-rr75.8%
associate-/r*93.8%
div-inv93.7%
Applied egg-rr93.7%
un-div-inv93.8%
Applied egg-rr93.8%
Final simplification94.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-262) (not (<= t_1 0.0)))
(+ x (/ -1.0 (/ (/ (- a z) (- y z)) (- x t))))
(+ t (* (/ (- t x) z) (- a y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-262) || !(t_1 <= 0.0)) {
tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t)));
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-262)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((-1.0d0) / (((a - z) / (y - z)) / (x - t)))
else
tmp = t + (((t - x) / z) * (a - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-262) || !(t_1 <= 0.0)) {
tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t)));
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-262) or not (t_1 <= 0.0): tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t))) else: tmp = t + (((t - x) / z) * (a - y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-262) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(-1.0 / Float64(Float64(Float64(a - z) / Float64(y - z)) / Float64(x - t)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-262) || ~((t_1 <= 0.0))) tmp = x + (-1.0 / (((a - z) / (y - z)) / (x - t))); else tmp = t + (((t - x) / z) * (a - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-262], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(-1.0 / N[(N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-262} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{-1}{\frac{\frac{a - z}{y - z}}{x - t}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.00000000000000002e-262 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.5%
associate-*r/75.5%
clear-num75.4%
Applied egg-rr75.4%
associate-/r*93.8%
div-inv93.8%
Applied egg-rr93.8%
un-div-inv93.8%
Applied egg-rr93.8%
if -2.00000000000000002e-262 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.5%
+-commutative3.5%
fma-define3.7%
Simplified3.7%
Taylor expanded in z around inf 83.0%
associate--l+83.0%
distribute-lft-out--83.0%
div-sub83.0%
mul-1-neg83.0%
unsub-neg83.0%
div-sub83.0%
associate-/l*85.9%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification94.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-262) (not (<= t_1 2e-303)))
t_1
(+ t (* (/ (- t x) z) (- a y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-262) || !(t_1 <= 2e-303)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-262)) .or. (.not. (t_1 <= 2d-303))) then
tmp = t_1
else
tmp = t + (((t - x) / z) * (a - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-262) || !(t_1 <= 2e-303)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-262) or not (t_1 <= 2e-303): tmp = t_1 else: tmp = t + (((t - x) / z) * (a - y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-262) || !(t_1 <= 2e-303)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-262) || ~((t_1 <= 2e-303))) tmp = t_1; else tmp = t + (((t - x) / z) * (a - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-262], N[Not[LessEqual[t$95$1, 2e-303]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-262} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-303}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.00000000000000002e-262 or 1.99999999999999986e-303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.3%
if -2.00000000000000002e-262 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.99999999999999986e-303Initial program 3.8%
+-commutative3.8%
fma-define4.0%
Simplified4.0%
Taylor expanded in z around inf 81.2%
associate--l+81.2%
distribute-lft-out--81.2%
div-sub81.3%
mul-1-neg81.3%
unsub-neg81.3%
div-sub81.2%
associate-/l*84.0%
associate-/l*97.1%
distribute-rgt-out--97.1%
Simplified97.1%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-262)
t_1
(if (<= t_1 2e-303)
(+ t (* (/ (- t x) z) (- a y)))
(+ x (/ (- y z) (/ (- a z) (- t x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-262) {
tmp = t_1;
} else if (t_1 <= 2e-303) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + ((y - z) / ((a - z) / (t - 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 = x + ((y - z) * ((t - x) / (a - z)))
if (t_1 <= (-2d-262)) then
tmp = t_1
else if (t_1 <= 2d-303) then
tmp = t + (((t - x) / z) * (a - y))
else
tmp = x + ((y - z) / ((a - z) / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-262) {
tmp = t_1;
} else if (t_1 <= 2e-303) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if t_1 <= -2e-262: tmp = t_1 elif t_1 <= 2e-303: tmp = t + (((t - x) / z) * (a - y)) else: tmp = x + ((y - z) / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -2e-262) tmp = t_1; elseif (t_1 <= 2e-303) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if (t_1 <= -2e-262) tmp = t_1; elseif (t_1 <= 2e-303) tmp = t + (((t - x) / z) * (a - y)); else tmp = x + ((y - z) / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-262], t$95$1, If[LessEqual[t$95$1, 2e-303], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-303}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.00000000000000002e-262Initial program 90.7%
if -2.00000000000000002e-262 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.99999999999999986e-303Initial program 3.8%
+-commutative3.8%
fma-define4.0%
Simplified4.0%
Taylor expanded in z around inf 81.2%
associate--l+81.2%
distribute-lft-out--81.2%
div-sub81.3%
mul-1-neg81.3%
unsub-neg81.3%
div-sub81.2%
associate-/l*84.0%
associate-/l*97.1%
distribute-rgt-out--97.1%
Simplified97.1%
if 1.99999999999999986e-303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.0%
clear-num94.1%
un-div-inv94.2%
Applied egg-rr94.2%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ (* x a) z))))
(if (<= z -1.48e+82)
t_1
(if (<= z 1.35e+17)
(+ x (* t (/ y a)))
(if (<= z 4.5e+229) (* y (/ (- x t) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((x * a) / z);
double tmp;
if (z <= -1.48e+82) {
tmp = t_1;
} else if (z <= 1.35e+17) {
tmp = x + (t * (y / a));
} else if (z <= 4.5e+229) {
tmp = y * ((x - t) / 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 = t - ((x * a) / z)
if (z <= (-1.48d+82)) then
tmp = t_1
else if (z <= 1.35d+17) then
tmp = x + (t * (y / a))
else if (z <= 4.5d+229) then
tmp = y * ((x - t) / 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 = t - ((x * a) / z);
double tmp;
if (z <= -1.48e+82) {
tmp = t_1;
} else if (z <= 1.35e+17) {
tmp = x + (t * (y / a));
} else if (z <= 4.5e+229) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((x * a) / z) tmp = 0 if z <= -1.48e+82: tmp = t_1 elif z <= 1.35e+17: tmp = x + (t * (y / a)) elif z <= 4.5e+229: tmp = y * ((x - t) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(x * a) / z)) tmp = 0.0 if (z <= -1.48e+82) tmp = t_1; elseif (z <= 1.35e+17) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 4.5e+229) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((x * a) / z); tmp = 0.0; if (z <= -1.48e+82) tmp = t_1; elseif (z <= 1.35e+17) tmp = x + (t * (y / a)); elseif (z <= 4.5e+229) tmp = y * ((x - t) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.48e+82], t$95$1, If[LessEqual[z, 1.35e+17], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+229], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{x \cdot a}{z}\\
\mathbf{if}\;z \leq -1.48 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+17}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+229}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.48e82 or 4.50000000000000023e229 < z Initial program 52.0%
+-commutative52.0%
fma-define52.0%
Simplified52.0%
Taylor expanded in z around inf 65.8%
associate--l+65.8%
distribute-lft-out--65.8%
div-sub65.8%
mul-1-neg65.8%
unsub-neg65.8%
div-sub65.8%
associate-/l*74.4%
associate-/l*88.5%
distribute-rgt-out--88.5%
Simplified88.5%
Taylor expanded in y around 0 58.7%
associate-*r/58.7%
associate-*r*58.7%
neg-mul-158.7%
Simplified58.7%
Taylor expanded in t around 0 64.4%
*-commutative64.4%
Simplified64.4%
if -1.48e82 < z < 1.35e17Initial program 90.6%
Taylor expanded in t around inf 65.6%
Taylor expanded in z around 0 53.1%
associate-/l*57.5%
Simplified57.5%
if 1.35e17 < z < 4.50000000000000023e229Initial program 74.3%
+-commutative74.3%
fma-define74.2%
Simplified74.2%
Taylor expanded in z around inf 52.5%
associate--l+52.5%
distribute-lft-out--52.5%
div-sub52.5%
mul-1-neg52.5%
unsub-neg52.5%
div-sub52.5%
associate-/l*59.7%
associate-/l*71.3%
distribute-rgt-out--73.6%
Simplified73.6%
Taylor expanded in y around -inf 33.3%
associate-*r/33.3%
neg-mul-133.3%
distribute-lft-neg-in33.3%
Simplified33.3%
Taylor expanded in y around 0 33.3%
mul-1-neg33.3%
associate-*r/44.9%
distribute-lft-neg-in44.9%
Simplified44.9%
Final simplification56.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.48e+82) (not (<= z 1.06e+80))) (+ t (* (/ (- t x) z) (- a y))) (+ x (/ y (/ (- a z) (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.48e+82) || !(z <= 1.06e+80)) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + (y / ((a - z) / (t - 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 ((z <= (-1.48d+82)) .or. (.not. (z <= 1.06d+80))) then
tmp = t + (((t - x) / z) * (a - y))
else
tmp = x + (y / ((a - z) / (t - x)))
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.48e+82) || !(z <= 1.06e+80)) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + (y / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.48e+82) or not (z <= 1.06e+80): tmp = t + (((t - x) / z) * (a - y)) else: tmp = x + (y / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.48e+82) || !(z <= 1.06e+80)) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.48e+82) || ~((z <= 1.06e+80))) tmp = t + (((t - x) / z) * (a - y)); else tmp = x + (y / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.48e+82], N[Not[LessEqual[z, 1.06e+80]], $MachinePrecision]], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.48 \cdot 10^{+82} \lor \neg \left(z \leq 1.06 \cdot 10^{+80}\right):\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if z < -1.48e82 or 1.05999999999999996e80 < z Initial program 56.3%
+-commutative56.3%
fma-define56.3%
Simplified56.3%
Taylor expanded in z around inf 60.6%
associate--l+60.6%
distribute-lft-out--60.6%
div-sub60.6%
mul-1-neg60.6%
unsub-neg60.6%
div-sub60.6%
associate-/l*68.8%
associate-/l*83.8%
distribute-rgt-out--83.8%
Simplified83.8%
if -1.48e82 < z < 1.05999999999999996e80Initial program 91.2%
clear-num91.1%
un-div-inv91.2%
Applied egg-rr91.2%
Taylor expanded in y around inf 83.9%
Final simplification83.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.15e+82) (not (<= z 2.55e+79))) (+ t (* y (/ (- x t) z))) (+ x (/ y (/ (- a z) (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.15e+82) || !(z <= 2.55e+79)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y / ((a - z) / (t - 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 ((z <= (-2.15d+82)) .or. (.not. (z <= 2.55d+79))) then
tmp = t + (y * ((x - t) / z))
else
tmp = x + (y / ((a - z) / (t - x)))
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.15e+82) || !(z <= 2.55e+79)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.15e+82) or not (z <= 2.55e+79): tmp = t + (y * ((x - t) / z)) else: tmp = x + (y / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.15e+82) || !(z <= 2.55e+79)) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.15e+82) || ~((z <= 2.55e+79))) tmp = t + (y * ((x - t) / z)); else tmp = x + (y / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.15e+82], N[Not[LessEqual[z, 2.55e+79]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{+82} \lor \neg \left(z \leq 2.55 \cdot 10^{+79}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if z < -2.15000000000000007e82 or 2.5500000000000001e79 < z Initial program 56.3%
+-commutative56.3%
fma-define56.3%
Simplified56.3%
Taylor expanded in z around inf 60.6%
associate--l+60.6%
distribute-lft-out--60.6%
div-sub60.6%
mul-1-neg60.6%
unsub-neg60.6%
div-sub60.6%
associate-/l*68.8%
associate-/l*83.8%
distribute-rgt-out--83.8%
Simplified83.8%
Taylor expanded in y around inf 72.7%
if -2.15000000000000007e82 < z < 2.5500000000000001e79Initial program 91.2%
clear-num91.1%
un-div-inv91.2%
Applied egg-rr91.2%
Taylor expanded in y around inf 83.9%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.48e+82) (not (<= z 2.15e+79))) (+ t (* y (/ (- x t) z))) (+ x (* y (/ (- t x) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.48e+82) || !(z <= 2.15e+79)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y * ((t - x) / (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 ((z <= (-1.48d+82)) .or. (.not. (z <= 2.15d+79))) then
tmp = t + (y * ((x - t) / z))
else
tmp = x + (y * ((t - x) / (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 ((z <= -1.48e+82) || !(z <= 2.15e+79)) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = x + (y * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.48e+82) or not (z <= 2.15e+79): tmp = t + (y * ((x - t) / z)) else: tmp = x + (y * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.48e+82) || !(z <= 2.15e+79)) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.48e+82) || ~((z <= 2.15e+79))) tmp = t + (y * ((x - t) / z)); else tmp = x + (y * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.48e+82], N[Not[LessEqual[z, 2.15e+79]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.48 \cdot 10^{+82} \lor \neg \left(z \leq 2.15 \cdot 10^{+79}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -1.48e82 or 2.1500000000000002e79 < z Initial program 56.3%
+-commutative56.3%
fma-define56.3%
Simplified56.3%
Taylor expanded in z around inf 60.6%
associate--l+60.6%
distribute-lft-out--60.6%
div-sub60.6%
mul-1-neg60.6%
unsub-neg60.6%
div-sub60.6%
associate-/l*68.8%
associate-/l*83.8%
distribute-rgt-out--83.8%
Simplified83.8%
Taylor expanded in y around inf 72.7%
if -1.48e82 < z < 2.1500000000000002e79Initial program 91.2%
Taylor expanded in y around inf 83.8%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7e-67) (not (<= a 4.4e-40))) (+ 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 <= -7e-67) || !(a <= 4.4e-40)) {
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 <= (-7d-67)) .or. (.not. (a <= 4.4d-40))) 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 <= -7e-67) || !(a <= 4.4e-40)) {
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 <= -7e-67) or not (a <= 4.4e-40): 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 <= -7e-67) || !(a <= 4.4e-40)) 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 <= -7e-67) || ~((a <= 4.4e-40))) 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, -7e-67], N[Not[LessEqual[a, 4.4e-40]], $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 -7 \cdot 10^{-67} \lor \neg \left(a \leq 4.4 \cdot 10^{-40}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if a < -7.0000000000000001e-67 or 4.40000000000000018e-40 < a Initial program 86.2%
Taylor expanded in t around inf 60.9%
associate-/l*73.9%
Simplified73.9%
if -7.0000000000000001e-67 < a < 4.40000000000000018e-40Initial program 70.8%
+-commutative70.8%
fma-define70.8%
Simplified70.8%
Taylor expanded in z around inf 73.9%
associate--l+73.9%
distribute-lft-out--73.9%
div-sub73.9%
mul-1-neg73.9%
unsub-neg73.9%
div-sub73.9%
associate-/l*77.1%
associate-/l*74.1%
distribute-rgt-out--77.2%
Simplified77.2%
Taylor expanded in y around inf 75.8%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -6e-67) x (if (<= a -7e-295) t (if (<= a 1.28e-55) (* x (/ y z)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6e-67) {
tmp = x;
} else if (a <= -7e-295) {
tmp = t;
} else if (a <= 1.28e-55) {
tmp = x * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-6d-67)) then
tmp = x
else if (a <= (-7d-295)) then
tmp = t
else if (a <= 1.28d-55) then
tmp = x * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6e-67) {
tmp = x;
} else if (a <= -7e-295) {
tmp = t;
} else if (a <= 1.28e-55) {
tmp = x * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6e-67: tmp = x elif a <= -7e-295: tmp = t elif a <= 1.28e-55: tmp = x * (y / z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6e-67) tmp = x; elseif (a <= -7e-295) tmp = t; elseif (a <= 1.28e-55) tmp = Float64(x * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6e-67) tmp = x; elseif (a <= -7e-295) tmp = t; elseif (a <= 1.28e-55) tmp = x * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6e-67], x, If[LessEqual[a, -7e-295], t, If[LessEqual[a, 1.28e-55], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-67}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -7 \cdot 10^{-295}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 1.28 \cdot 10^{-55}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.00000000000000065e-67 or 1.27999999999999994e-55 < a Initial program 85.5%
+-commutative85.5%
fma-define85.6%
Simplified85.6%
Taylor expanded in a around inf 41.1%
if -6.00000000000000065e-67 < a < -6.99999999999999977e-295Initial program 69.1%
Taylor expanded in t around inf 43.7%
Taylor expanded in z around inf 31.4%
Taylor expanded in x around 0 49.2%
if -6.99999999999999977e-295 < a < 1.27999999999999994e-55Initial program 72.5%
+-commutative72.5%
fma-define72.1%
Simplified72.1%
Taylor expanded in t around 0 34.5%
mul-1-neg34.5%
*-rgt-identity34.5%
associate-/l*39.3%
distribute-rgt-neg-in39.3%
mul-1-neg39.3%
distribute-lft-in39.3%
mul-1-neg39.3%
unsub-neg39.3%
Simplified39.3%
Taylor expanded in a around 0 43.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -0.001633) (not (<= a 1.02e-53))) (+ x (* y (/ (- t x) a))) (+ t (* y (/ (- x t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.001633) || !(a <= 1.02e-53)) {
tmp = x + (y * ((t - x) / a));
} 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 <= (-0.001633d0)) .or. (.not. (a <= 1.02d-53))) then
tmp = x + (y * ((t - x) / a))
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 <= -0.001633) || !(a <= 1.02e-53)) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t + (y * ((x - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -0.001633) or not (a <= 1.02e-53): tmp = x + (y * ((t - x) / a)) else: tmp = t + (y * ((x - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -0.001633) || !(a <= 1.02e-53)) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); 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 <= -0.001633) || ~((a <= 1.02e-53))) tmp = x + (y * ((t - x) / a)); else tmp = t + (y * ((x - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -0.001633], N[Not[LessEqual[a, 1.02e-53]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $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 -0.001633 \lor \neg \left(a \leq 1.02 \cdot 10^{-53}\right):\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if a < -0.0016329999999999999 or 1.02000000000000002e-53 < a Initial program 85.2%
Taylor expanded in z around 0 58.2%
associate-/l*69.1%
Simplified69.1%
if -0.0016329999999999999 < a < 1.02000000000000002e-53Initial program 73.4%
+-commutative73.4%
fma-define73.3%
Simplified73.3%
Taylor expanded in z around inf 71.9%
associate--l+71.9%
distribute-lft-out--71.9%
div-sub72.7%
mul-1-neg72.7%
unsub-neg72.7%
div-sub71.9%
associate-/l*75.5%
associate-/l*72.9%
distribute-rgt-out--76.5%
Simplified76.5%
Taylor expanded in y around inf 75.6%
Final simplification72.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.2e+82) (- t (/ (* x a) z)) (if (<= z 1.4e+17) (+ x (* y (/ (- t x) a))) (+ t (* t (/ (- a y) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e+82) {
tmp = t - ((x * a) / z);
} else if (z <= 1.4e+17) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t + (t * ((a - y) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.2d+82)) then
tmp = t - ((x * a) / z)
else if (z <= 1.4d+17) then
tmp = x + (y * ((t - x) / a))
else
tmp = t + (t * ((a - y) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e+82) {
tmp = t - ((x * a) / z);
} else if (z <= 1.4e+17) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t + (t * ((a - y) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.2e+82: tmp = t - ((x * a) / z) elif z <= 1.4e+17: tmp = x + (y * ((t - x) / a)) else: tmp = t + (t * ((a - y) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.2e+82) tmp = Float64(t - Float64(Float64(x * a) / z)); elseif (z <= 1.4e+17) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = Float64(t + Float64(t * Float64(Float64(a - y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.2e+82) tmp = t - ((x * a) / z); elseif (z <= 1.4e+17) tmp = x + (y * ((t - x) / a)); else tmp = t + (t * ((a - y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e+82], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+17], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(t * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+82}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t + t \cdot \frac{a - y}{z}\\
\end{array}
\end{array}
if z < -2.2000000000000001e82Initial program 55.1%
+-commutative55.1%
fma-define55.4%
Simplified55.4%
Taylor expanded in z around inf 66.6%
associate--l+66.6%
distribute-lft-out--66.6%
div-sub66.6%
mul-1-neg66.6%
unsub-neg66.6%
div-sub66.6%
associate-/l*75.0%
associate-/l*88.9%
distribute-rgt-out--88.9%
Simplified88.9%
Taylor expanded in y around 0 57.9%
associate-*r/57.9%
associate-*r*57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in t around 0 64.9%
*-commutative64.9%
Simplified64.9%
if -2.2000000000000001e82 < z < 1.4e17Initial program 90.6%
Taylor expanded in z around 0 64.7%
associate-/l*70.6%
Simplified70.6%
if 1.4e17 < z Initial program 67.5%
+-commutative67.5%
fma-define67.2%
Simplified67.2%
Taylor expanded in z around inf 54.4%
associate--l+54.4%
distribute-lft-out--54.4%
div-sub54.4%
mul-1-neg54.4%
unsub-neg54.4%
div-sub54.4%
associate-/l*62.0%
associate-/l*74.1%
distribute-rgt-out--76.0%
Simplified76.0%
Taylor expanded in t around inf 43.9%
associate-/l*47.3%
Simplified47.3%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.48e+82) (- t (/ (* x a) z)) (if (<= z 2.6e+81) (+ x (* y (/ (- t x) a))) (* x (/ (- y a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.48e+82) {
tmp = t - ((x * a) / z);
} else if (z <= 2.6e+81) {
tmp = x + (y * ((t - x) / a));
} 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 (z <= (-1.48d+82)) then
tmp = t - ((x * a) / z)
else if (z <= 2.6d+81) then
tmp = x + (y * ((t - x) / a))
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 (z <= -1.48e+82) {
tmp = t - ((x * a) / z);
} else if (z <= 2.6e+81) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = x * ((y - a) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.48e+82: tmp = t - ((x * a) / z) elif z <= 2.6e+81: tmp = x + (y * ((t - x) / a)) else: tmp = x * ((y - a) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.48e+82) tmp = Float64(t - Float64(Float64(x * a) / z)); elseif (z <= 2.6e+81) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = Float64(x * Float64(Float64(y - a) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.48e+82) tmp = t - ((x * a) / z); elseif (z <= 2.6e+81) tmp = x + (y * ((t - x) / a)); else tmp = x * ((y - a) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.48e+82], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+81], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.48 \cdot 10^{+82}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+81}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if z < -1.48e82Initial program 55.1%
+-commutative55.1%
fma-define55.4%
Simplified55.4%
Taylor expanded in z around inf 66.6%
associate--l+66.6%
distribute-lft-out--66.6%
div-sub66.6%
mul-1-neg66.6%
unsub-neg66.6%
div-sub66.6%
associate-/l*75.0%
associate-/l*88.9%
distribute-rgt-out--88.9%
Simplified88.9%
Taylor expanded in y around 0 57.9%
associate-*r/57.9%
associate-*r*57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in t around 0 64.9%
*-commutative64.9%
Simplified64.9%
if -1.48e82 < z < 2.59999999999999992e81Initial program 91.2%
Taylor expanded in z around 0 62.9%
associate-/l*68.9%
Simplified68.9%
if 2.59999999999999992e81 < z Initial program 57.5%
+-commutative57.5%
fma-define57.2%
Simplified57.2%
Taylor expanded in z around inf 54.2%
associate--l+54.2%
distribute-lft-out--54.2%
div-sub54.2%
mul-1-neg54.2%
unsub-neg54.2%
div-sub54.2%
associate-/l*62.1%
associate-/l*78.2%
distribute-rgt-out--78.2%
Simplified78.2%
Taylor expanded in t around 0 23.3%
associate-/l*41.0%
Simplified41.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.35e+82) (- t (/ (* x a) z)) (if (<= z 1.1e+101) (+ x (* t (/ y (- a z)))) (* x (/ (- y a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.35e+82) {
tmp = t - ((x * a) / z);
} else if (z <= 1.1e+101) {
tmp = x + (t * (y / (a - z)));
} 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 (z <= (-2.35d+82)) then
tmp = t - ((x * a) / z)
else if (z <= 1.1d+101) then
tmp = x + (t * (y / (a - z)))
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 (z <= -2.35e+82) {
tmp = t - ((x * a) / z);
} else if (z <= 1.1e+101) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x * ((y - a) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.35e+82: tmp = t - ((x * a) / z) elif z <= 1.1e+101: tmp = x + (t * (y / (a - z))) else: tmp = x * ((y - a) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.35e+82) tmp = Float64(t - Float64(Float64(x * a) / z)); elseif (z <= 1.1e+101) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x * Float64(Float64(y - a) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.35e+82) tmp = t - ((x * a) / z); elseif (z <= 1.1e+101) tmp = x + (t * (y / (a - z))); else tmp = x * ((y - a) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.35e+82], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+101], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+82}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+101}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if z < -2.35e82Initial program 55.1%
+-commutative55.1%
fma-define55.4%
Simplified55.4%
Taylor expanded in z around inf 66.6%
associate--l+66.6%
distribute-lft-out--66.6%
div-sub66.6%
mul-1-neg66.6%
unsub-neg66.6%
div-sub66.6%
associate-/l*75.0%
associate-/l*88.9%
distribute-rgt-out--88.9%
Simplified88.9%
Taylor expanded in y around 0 57.9%
associate-*r/57.9%
associate-*r*57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in t around 0 64.9%
*-commutative64.9%
Simplified64.9%
if -2.35e82 < z < 1.1e101Initial program 91.3%
Taylor expanded in t around inf 65.4%
Taylor expanded in y around inf 58.8%
associate-/l*63.8%
Simplified63.8%
if 1.1e101 < z Initial program 54.0%
+-commutative54.0%
fma-define53.8%
Simplified53.8%
Taylor expanded in z around inf 50.5%
associate--l+50.5%
distribute-lft-out--50.5%
div-sub50.5%
mul-1-neg50.5%
unsub-neg50.5%
div-sub50.5%
associate-/l*59.0%
associate-/l*76.4%
distribute-rgt-out--76.4%
Simplified76.4%
Taylor expanded in t around 0 24.8%
associate-/l*44.0%
Simplified44.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.8e+82) (- t (/ (* x a) z)) (if (<= z 2.8e+99) (+ x (* t (/ y a))) (* x (/ (- y a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.8e+82) {
tmp = t - ((x * a) / z);
} else if (z <= 2.8e+99) {
tmp = x + (t * (y / a));
} 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 (z <= (-1.8d+82)) then
tmp = t - ((x * a) / z)
else if (z <= 2.8d+99) then
tmp = x + (t * (y / a))
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 (z <= -1.8e+82) {
tmp = t - ((x * a) / z);
} else if (z <= 2.8e+99) {
tmp = x + (t * (y / a));
} else {
tmp = x * ((y - a) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.8e+82: tmp = t - ((x * a) / z) elif z <= 2.8e+99: tmp = x + (t * (y / a)) else: tmp = x * ((y - a) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.8e+82) tmp = Float64(t - Float64(Float64(x * a) / z)); elseif (z <= 2.8e+99) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x * Float64(Float64(y - a) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.8e+82) tmp = t - ((x * a) / z); elseif (z <= 2.8e+99) tmp = x + (t * (y / a)); else tmp = x * ((y - a) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.8e+82], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+99], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+82}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+99}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if z < -1.80000000000000007e82Initial program 55.1%
+-commutative55.1%
fma-define55.4%
Simplified55.4%
Taylor expanded in z around inf 66.6%
associate--l+66.6%
distribute-lft-out--66.6%
div-sub66.6%
mul-1-neg66.6%
unsub-neg66.6%
div-sub66.6%
associate-/l*75.0%
associate-/l*88.9%
distribute-rgt-out--88.9%
Simplified88.9%
Taylor expanded in y around 0 57.9%
associate-*r/57.9%
associate-*r*57.9%
neg-mul-157.9%
Simplified57.9%
Taylor expanded in t around 0 64.9%
*-commutative64.9%
Simplified64.9%
if -1.80000000000000007e82 < z < 2.8e99Initial program 91.3%
Taylor expanded in t around inf 65.2%
Taylor expanded in z around 0 50.4%
associate-/l*55.0%
Simplified55.0%
if 2.8e99 < z Initial program 55.3%
+-commutative55.3%
fma-define55.0%
Simplified55.0%
Taylor expanded in z around inf 51.8%
associate--l+51.8%
distribute-lft-out--51.8%
div-sub51.8%
mul-1-neg51.8%
unsub-neg51.8%
div-sub51.8%
associate-/l*60.1%
associate-/l*77.1%
distribute-rgt-out--77.1%
Simplified77.1%
Taylor expanded in t around 0 24.4%
associate-/l*43.1%
Simplified43.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.7e+82) t (if (<= z 8.2e+94) (+ x (* t (/ y a))) (* x (/ (- y a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e+82) {
tmp = t;
} else if (z <= 8.2e+94) {
tmp = x + (t * (y / a));
} 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 (z <= (-1.7d+82)) then
tmp = t
else if (z <= 8.2d+94) then
tmp = x + (t * (y / a))
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 (z <= -1.7e+82) {
tmp = t;
} else if (z <= 8.2e+94) {
tmp = x + (t * (y / a));
} else {
tmp = x * ((y - a) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e+82: tmp = t elif z <= 8.2e+94: tmp = x + (t * (y / a)) else: tmp = x * ((y - a) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e+82) tmp = t; elseif (z <= 8.2e+94) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x * Float64(Float64(y - a) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.7e+82) tmp = t; elseif (z <= 8.2e+94) tmp = x + (t * (y / a)); else tmp = x * ((y - a) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+82], t, If[LessEqual[z, 8.2e+94], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+82}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+94}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if z < -1.69999999999999997e82Initial program 55.1%
Taylor expanded in t around inf 20.5%
Taylor expanded in z around inf 42.2%
Taylor expanded in x around 0 57.3%
if -1.69999999999999997e82 < z < 8.20000000000000061e94Initial program 91.3%
Taylor expanded in t around inf 65.2%
Taylor expanded in z around 0 50.4%
associate-/l*55.0%
Simplified55.0%
if 8.20000000000000061e94 < z Initial program 55.3%
+-commutative55.3%
fma-define55.0%
Simplified55.0%
Taylor expanded in z around inf 51.8%
associate--l+51.8%
distribute-lft-out--51.8%
div-sub51.8%
mul-1-neg51.8%
unsub-neg51.8%
div-sub51.8%
associate-/l*60.1%
associate-/l*77.1%
distribute-rgt-out--77.1%
Simplified77.1%
Taylor expanded in t around 0 24.4%
associate-/l*43.1%
Simplified43.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.95e+82) t (if (<= z 2.9e+96) (* x (- 1.0 (/ y a))) (* x (/ (- y a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e+82) {
tmp = t;
} else if (z <= 2.9e+96) {
tmp = x * (1.0 - (y / a));
} 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 (z <= (-1.95d+82)) then
tmp = t
else if (z <= 2.9d+96) then
tmp = x * (1.0d0 - (y / a))
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 (z <= -1.95e+82) {
tmp = t;
} else if (z <= 2.9e+96) {
tmp = x * (1.0 - (y / a));
} else {
tmp = x * ((y - a) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.95e+82: tmp = t elif z <= 2.9e+96: tmp = x * (1.0 - (y / a)) else: tmp = x * ((y - a) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.95e+82) tmp = t; elseif (z <= 2.9e+96) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = Float64(x * Float64(Float64(y - a) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.95e+82) tmp = t; elseif (z <= 2.9e+96) tmp = x * (1.0 - (y / a)); else tmp = x * ((y - a) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e+82], t, If[LessEqual[z, 2.9e+96], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+82}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+96}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if z < -1.94999999999999988e82Initial program 55.1%
Taylor expanded in t around inf 20.5%
Taylor expanded in z around inf 42.2%
Taylor expanded in x around 0 57.3%
if -1.94999999999999988e82 < z < 2.89999999999999978e96Initial program 91.3%
+-commutative91.3%
fma-define91.3%
Simplified91.3%
Taylor expanded in t around 0 58.2%
mul-1-neg58.2%
*-rgt-identity58.2%
associate-/l*62.4%
distribute-rgt-neg-in62.4%
mul-1-neg62.4%
distribute-lft-in62.4%
mul-1-neg62.4%
unsub-neg62.4%
Simplified62.4%
Taylor expanded in z around 0 53.1%
if 2.89999999999999978e96 < z Initial program 55.3%
+-commutative55.3%
fma-define55.0%
Simplified55.0%
Taylor expanded in z around inf 51.8%
associate--l+51.8%
distribute-lft-out--51.8%
div-sub51.8%
mul-1-neg51.8%
unsub-neg51.8%
div-sub51.8%
associate-/l*60.1%
associate-/l*77.1%
distribute-rgt-out--77.1%
Simplified77.1%
Taylor expanded in t around 0 24.4%
associate-/l*43.1%
Simplified43.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.7e+82) t (if (<= z 1.25e+17) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e+82) {
tmp = t;
} else if (z <= 1.25e+17) {
tmp = x * (1.0 - (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 <= (-1.7d+82)) then
tmp = t
else if (z <= 1.25d+17) then
tmp = x * (1.0d0 - (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 <= -1.7e+82) {
tmp = t;
} else if (z <= 1.25e+17) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e+82: tmp = t elif z <= 1.25e+17: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e+82) tmp = t; elseif (z <= 1.25e+17) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.7e+82) tmp = t; elseif (z <= 1.25e+17) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+82], t, If[LessEqual[z, 1.25e+17], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+82}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+17}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.69999999999999997e82 or 1.25e17 < z Initial program 62.0%
Taylor expanded in t around inf 30.6%
Taylor expanded in z around inf 34.0%
Taylor expanded in x around 0 44.0%
if -1.69999999999999997e82 < z < 1.25e17Initial program 90.6%
+-commutative90.6%
fma-define90.6%
Simplified90.6%
Taylor expanded in t around 0 61.0%
mul-1-neg61.0%
*-rgt-identity61.0%
associate-/l*65.6%
distribute-rgt-neg-in65.6%
mul-1-neg65.6%
distribute-lft-in65.6%
mul-1-neg65.6%
unsub-neg65.6%
Simplified65.6%
Taylor expanded in z around 0 55.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.65e+82) t (if (<= z 7.6e+16) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+82) {
tmp = t;
} else if (z <= 7.6e+16) {
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 <= (-1.65d+82)) then
tmp = t
else if (z <= 7.6d+16) 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 <= -1.65e+82) {
tmp = t;
} else if (z <= 7.6e+16) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.65e+82: tmp = t elif z <= 7.6e+16: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.65e+82) tmp = t; elseif (z <= 7.6e+16) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.65e+82) tmp = t; elseif (z <= 7.6e+16) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.65e+82], t, If[LessEqual[z, 7.6e+16], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+82}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+16}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.6499999999999999e82 or 7.6e16 < z Initial program 62.0%
Taylor expanded in t around inf 30.6%
Taylor expanded in z around inf 34.0%
Taylor expanded in x around 0 44.0%
if -1.6499999999999999e82 < z < 7.6e16Initial program 90.6%
+-commutative90.6%
fma-define90.6%
Simplified90.6%
Taylor expanded in a around inf 38.7%
(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 79.8%
Taylor expanded in t around inf 52.5%
Taylor expanded in z around inf 31.8%
Taylor expanded in x around 0 21.7%
herbie shell --seed 2024170
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))