
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -2e-260) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(+ t (* x (/ (- y a) z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -2e-260) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t + (x * ((y - a) / z));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -2e-260) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-260], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-260} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999992e-260 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.9%
+-commutative75.9%
*-commutative75.9%
associate-/l*90.8%
fma-define90.8%
Simplified90.8%
if -1.99999999999999992e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.6%
+-commutative4.6%
*-commutative4.6%
associate-/l*4.6%
fma-define4.6%
Simplified4.6%
Taylor expanded in z around inf 99.7%
associate--l+99.7%
associate-*r/99.7%
associate-*r/99.7%
mul-1-neg99.7%
div-sub99.7%
mul-1-neg99.7%
distribute-lft-out--99.7%
associate-*r/99.7%
mul-1-neg99.7%
unsub-neg99.7%
distribute-rgt-out--99.7%
Simplified99.7%
Taylor expanded in t around 0 99.7%
mul-1-neg99.7%
associate-/l*99.8%
distribute-lft-neg-in99.8%
Simplified99.8%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -2e-260) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (* x (/ (- y a) z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -2e-260) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (x * ((y - a) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if ((t_1 <= (-2d-260)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + (x * ((y - a) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -2e-260) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (x * ((y - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if (t_1 <= -2e-260) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + (x * ((y - a) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -2e-260) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if ((t_1 <= -2e-260) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + (x * ((y - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-260], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-260} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.99999999999999992e-260 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.9%
associate-/l*88.2%
Simplified88.2%
Taylor expanded in y around 0 76.8%
mul-1-neg76.8%
associate-/l*83.9%
distribute-lft-neg-out83.9%
+-commutative83.9%
div-sub84.8%
distribute-rgt-out88.2%
sub-neg88.2%
associate-/r/90.7%
Simplified90.7%
if -1.99999999999999992e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.6%
+-commutative4.6%
*-commutative4.6%
associate-/l*4.6%
fma-define4.6%
Simplified4.6%
Taylor expanded in z around inf 99.7%
associate--l+99.7%
associate-*r/99.7%
associate-*r/99.7%
mul-1-neg99.7%
div-sub99.7%
mul-1-neg99.7%
distribute-lft-out--99.7%
associate-*r/99.7%
mul-1-neg99.7%
unsub-neg99.7%
distribute-rgt-out--99.7%
Simplified99.7%
Taylor expanded in t around 0 99.7%
mul-1-neg99.7%
associate-/l*99.8%
distribute-lft-neg-in99.8%
Simplified99.8%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ y z))))
(if (<= a -2.2e+198)
x
(if (<= a -1.8e-146)
(+ x t)
(if (<= a -1.8e-175)
t_1
(if (<= a -1.25e-277) t (if (<= a 1.6e+107) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (y / z);
double tmp;
if (a <= -2.2e+198) {
tmp = x;
} else if (a <= -1.8e-146) {
tmp = x + t;
} else if (a <= -1.8e-175) {
tmp = t_1;
} else if (a <= -1.25e-277) {
tmp = t;
} else if (a <= 1.6e+107) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (y / z)
if (a <= (-2.2d+198)) then
tmp = x
else if (a <= (-1.8d-146)) then
tmp = x + t
else if (a <= (-1.8d-175)) then
tmp = t_1
else if (a <= (-1.25d-277)) then
tmp = t
else if (a <= 1.6d+107) then
tmp = t_1
else
tmp = 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);
double tmp;
if (a <= -2.2e+198) {
tmp = x;
} else if (a <= -1.8e-146) {
tmp = x + t;
} else if (a <= -1.8e-175) {
tmp = t_1;
} else if (a <= -1.25e-277) {
tmp = t;
} else if (a <= 1.6e+107) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (y / z) tmp = 0 if a <= -2.2e+198: tmp = x elif a <= -1.8e-146: tmp = x + t elif a <= -1.8e-175: tmp = t_1 elif a <= -1.25e-277: tmp = t elif a <= 1.6e+107: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(y / z)) tmp = 0.0 if (a <= -2.2e+198) tmp = x; elseif (a <= -1.8e-146) tmp = Float64(x + t); elseif (a <= -1.8e-175) tmp = t_1; elseif (a <= -1.25e-277) tmp = t; elseif (a <= 1.6e+107) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (y / z); tmp = 0.0; if (a <= -2.2e+198) tmp = x; elseif (a <= -1.8e-146) tmp = x + t; elseif (a <= -1.8e-175) tmp = t_1; elseif (a <= -1.25e-277) tmp = t; elseif (a <= 1.6e+107) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e+198], x, If[LessEqual[a, -1.8e-146], N[(x + t), $MachinePrecision], If[LessEqual[a, -1.8e-175], t$95$1, If[LessEqual[a, -1.25e-277], t, If[LessEqual[a, 1.6e+107], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{+198}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-146}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.25 \cdot 10^{-277}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.2e198 or 1.60000000000000015e107 < a Initial program 70.7%
+-commutative70.7%
*-commutative70.7%
associate-/l*95.8%
fma-define95.8%
Simplified95.8%
Taylor expanded in a around inf 53.7%
if -2.2e198 < a < -1.79999999999999989e-146Initial program 73.2%
associate-/l*88.2%
Simplified88.2%
Taylor expanded in t around inf 60.0%
associate-/l*73.3%
Simplified73.3%
Taylor expanded in z around inf 30.8%
if -1.79999999999999989e-146 < a < -1.8e-175 or -1.25e-277 < a < 1.60000000000000015e107Initial program 69.2%
+-commutative69.2%
*-commutative69.2%
associate-/l*77.1%
fma-define77.1%
Simplified77.1%
Taylor expanded in z around inf 67.1%
associate--l+67.1%
associate-*r/67.1%
associate-*r/67.1%
mul-1-neg67.1%
div-sub69.0%
mul-1-neg69.0%
distribute-lft-out--69.0%
associate-*r/69.0%
mul-1-neg69.0%
unsub-neg69.0%
distribute-rgt-out--70.0%
Simplified70.0%
Taylor expanded in y around -inf 47.4%
associate-*r/47.4%
mul-1-neg47.4%
*-commutative47.4%
Simplified47.4%
Taylor expanded in t around 0 30.7%
associate-/l*36.8%
Simplified36.8%
if -1.8e-175 < a < -1.25e-277Initial program 73.4%
associate-/l*78.6%
Simplified78.6%
clear-num78.3%
un-div-inv78.6%
Applied egg-rr78.6%
Taylor expanded in z around inf 69.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ (- y z) a)))))
(if (<= a -8.5e-129)
t_1
(if (<= a -8.8e-179)
(* x (- 1.0 (/ y (- a z))))
(if (<= a -4.8e-271) t (if (<= a 6.2e-25) (* y (/ (- x t) z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * ((y - z) / a));
double tmp;
if (a <= -8.5e-129) {
tmp = t_1;
} else if (a <= -8.8e-179) {
tmp = x * (1.0 - (y / (a - z)));
} else if (a <= -4.8e-271) {
tmp = t;
} else if (a <= 6.2e-25) {
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 = x + (t * ((y - z) / a))
if (a <= (-8.5d-129)) then
tmp = t_1
else if (a <= (-8.8d-179)) then
tmp = x * (1.0d0 - (y / (a - z)))
else if (a <= (-4.8d-271)) then
tmp = t
else if (a <= 6.2d-25) 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 = x + (t * ((y - z) / a));
double tmp;
if (a <= -8.5e-129) {
tmp = t_1;
} else if (a <= -8.8e-179) {
tmp = x * (1.0 - (y / (a - z)));
} else if (a <= -4.8e-271) {
tmp = t;
} else if (a <= 6.2e-25) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * ((y - z) / a)) tmp = 0 if a <= -8.5e-129: tmp = t_1 elif a <= -8.8e-179: tmp = x * (1.0 - (y / (a - z))) elif a <= -4.8e-271: tmp = t elif a <= 6.2e-25: tmp = y * ((x - t) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(Float64(y - z) / a))) tmp = 0.0 if (a <= -8.5e-129) tmp = t_1; elseif (a <= -8.8e-179) tmp = Float64(x * Float64(1.0 - Float64(y / Float64(a - z)))); elseif (a <= -4.8e-271) tmp = t; elseif (a <= 6.2e-25) 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 = x + (t * ((y - z) / a)); tmp = 0.0; if (a <= -8.5e-129) tmp = t_1; elseif (a <= -8.8e-179) tmp = x * (1.0 - (y / (a - z))); elseif (a <= -4.8e-271) tmp = t; elseif (a <= 6.2e-25) 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[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.5e-129], t$95$1, If[LessEqual[a, -8.8e-179], N[(x * N[(1.0 - N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4.8e-271], t, If[LessEqual[a, 6.2e-25], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y - z}{a}\\
\mathbf{if}\;a \leq -8.5 \cdot 10^{-129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -8.8 \cdot 10^{-179}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a - z}\right)\\
\mathbf{elif}\;a \leq -4.8 \cdot 10^{-271}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-25}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.49999999999999937e-129 or 6.19999999999999989e-25 < a Initial program 71.1%
associate-/l*87.7%
Simplified87.7%
Taylor expanded in t around inf 63.4%
associate-/l*76.8%
Simplified76.8%
Taylor expanded in a around inf 55.6%
associate-/l*62.2%
Simplified62.2%
if -8.49999999999999937e-129 < a < -8.80000000000000018e-179Initial program 71.6%
associate-/l*70.8%
Simplified70.8%
clear-num70.6%
un-div-inv70.8%
Applied egg-rr70.8%
Taylor expanded in y around inf 61.6%
Taylor expanded in x around inf 70.9%
mul-1-neg70.9%
unsub-neg70.9%
Simplified70.9%
if -8.80000000000000018e-179 < a < -4.8000000000000005e-271Initial program 73.4%
associate-/l*78.6%
Simplified78.6%
clear-num78.3%
un-div-inv78.6%
Applied egg-rr78.6%
Taylor expanded in z around inf 69.9%
if -4.8000000000000005e-271 < a < 6.19999999999999989e-25Initial program 69.9%
+-commutative69.9%
*-commutative69.9%
associate-/l*74.3%
fma-define74.3%
Simplified74.3%
Taylor expanded in z around inf 83.1%
associate--l+83.1%
associate-*r/83.1%
associate-*r/83.1%
mul-1-neg83.1%
div-sub85.9%
mul-1-neg85.9%
distribute-lft-out--85.9%
associate-*r/85.9%
mul-1-neg85.9%
unsub-neg85.9%
distribute-rgt-out--85.9%
Simplified85.9%
Taylor expanded in y around -inf 55.4%
mul-1-neg55.4%
associate-/l*61.7%
distribute-lft-neg-in61.7%
Simplified61.7%
Final simplification62.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= a -1.02e-127)
t_1
(if (<= a -1e-186)
(* x (- 1.0 (/ y (- a z))))
(if (<= a -1.75e-270) t (if (<= a 2.7e-25) (* y (/ (- x t) z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (a <= -1.02e-127) {
tmp = t_1;
} else if (a <= -1e-186) {
tmp = x * (1.0 - (y / (a - z)));
} else if (a <= -1.75e-270) {
tmp = t;
} else if (a <= 2.7e-25) {
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 = x + (t * (y / a))
if (a <= (-1.02d-127)) then
tmp = t_1
else if (a <= (-1d-186)) then
tmp = x * (1.0d0 - (y / (a - z)))
else if (a <= (-1.75d-270)) then
tmp = t
else if (a <= 2.7d-25) 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 = x + (t * (y / a));
double tmp;
if (a <= -1.02e-127) {
tmp = t_1;
} else if (a <= -1e-186) {
tmp = x * (1.0 - (y / (a - z)));
} else if (a <= -1.75e-270) {
tmp = t;
} else if (a <= 2.7e-25) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if a <= -1.02e-127: tmp = t_1 elif a <= -1e-186: tmp = x * (1.0 - (y / (a - z))) elif a <= -1.75e-270: tmp = t elif a <= 2.7e-25: tmp = y * ((x - t) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (a <= -1.02e-127) tmp = t_1; elseif (a <= -1e-186) tmp = Float64(x * Float64(1.0 - Float64(y / Float64(a - z)))); elseif (a <= -1.75e-270) tmp = t; elseif (a <= 2.7e-25) 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 = x + (t * (y / a)); tmp = 0.0; if (a <= -1.02e-127) tmp = t_1; elseif (a <= -1e-186) tmp = x * (1.0 - (y / (a - z))); elseif (a <= -1.75e-270) tmp = t; elseif (a <= 2.7e-25) 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[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.02e-127], t$95$1, If[LessEqual[a, -1e-186], N[(x * N[(1.0 - N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.75e-270], t, If[LessEqual[a, 2.7e-25], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -1.02 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-186}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a - z}\right)\\
\mathbf{elif}\;a \leq -1.75 \cdot 10^{-270}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-25}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.02000000000000008e-127 or 2.70000000000000016e-25 < a Initial program 71.1%
associate-/l*87.7%
Simplified87.7%
Taylor expanded in t around inf 63.4%
associate-/l*76.8%
Simplified76.8%
Taylor expanded in z around 0 54.0%
if -1.02000000000000008e-127 < a < -9.9999999999999991e-187Initial program 71.6%
associate-/l*70.8%
Simplified70.8%
clear-num70.6%
un-div-inv70.8%
Applied egg-rr70.8%
Taylor expanded in y around inf 61.6%
Taylor expanded in x around inf 70.9%
mul-1-neg70.9%
unsub-neg70.9%
Simplified70.9%
if -9.9999999999999991e-187 < a < -1.74999999999999997e-270Initial program 73.4%
associate-/l*78.6%
Simplified78.6%
clear-num78.3%
un-div-inv78.6%
Applied egg-rr78.6%
Taylor expanded in z around inf 69.9%
if -1.74999999999999997e-270 < a < 2.70000000000000016e-25Initial program 69.9%
+-commutative69.9%
*-commutative69.9%
associate-/l*74.3%
fma-define74.3%
Simplified74.3%
Taylor expanded in z around inf 83.1%
associate--l+83.1%
associate-*r/83.1%
associate-*r/83.1%
mul-1-neg83.1%
div-sub85.9%
mul-1-neg85.9%
distribute-lft-out--85.9%
associate-*r/85.9%
mul-1-neg85.9%
unsub-neg85.9%
distribute-rgt-out--85.9%
Simplified85.9%
Taylor expanded in y around -inf 55.4%
mul-1-neg55.4%
associate-/l*61.7%
distribute-lft-neg-in61.7%
Simplified61.7%
Final simplification58.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* x (/ (- y a) z)))))
(if (<= z -6.5e+73)
t_1
(if (<= z 3.1e-143)
(+ x (/ y (/ (- a z) (- t x))))
(if (<= z 3.5e+151) (+ x (* t (/ (- y z) (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x * ((y - a) / z));
double tmp;
if (z <= -6.5e+73) {
tmp = t_1;
} else if (z <= 3.1e-143) {
tmp = x + (y / ((a - z) / (t - x)));
} else if (z <= 3.5e+151) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (x * ((y - a) / z))
if (z <= (-6.5d+73)) then
tmp = t_1
else if (z <= 3.1d-143) then
tmp = x + (y / ((a - z) / (t - x)))
else if (z <= 3.5d+151) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x * ((y - a) / z));
double tmp;
if (z <= -6.5e+73) {
tmp = t_1;
} else if (z <= 3.1e-143) {
tmp = x + (y / ((a - z) / (t - x)));
} else if (z <= 3.5e+151) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x * ((y - a) / z)) tmp = 0 if z <= -6.5e+73: tmp = t_1 elif z <= 3.1e-143: tmp = x + (y / ((a - z) / (t - x))) elif z <= 3.5e+151: tmp = x + (t * ((y - z) / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x * Float64(Float64(y - a) / z))) tmp = 0.0 if (z <= -6.5e+73) tmp = t_1; elseif (z <= 3.1e-143) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x)))); elseif (z <= 3.5e+151) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x * ((y - a) / z)); tmp = 0.0; if (z <= -6.5e+73) tmp = t_1; elseif (z <= 3.1e-143) tmp = x + (y / ((a - z) / (t - x))); elseif (z <= 3.5e+151) tmp = x + (t * ((y - z) / (a - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+73], t$95$1, If[LessEqual[z, 3.1e-143], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+151], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + x \cdot \frac{y - a}{z}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-143}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+151}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.5000000000000001e73 or 3.5000000000000003e151 < z Initial program 35.1%
+-commutative35.1%
*-commutative35.1%
associate-/l*63.3%
fma-define63.3%
Simplified63.3%
Taylor expanded in z around inf 66.2%
associate--l+66.2%
associate-*r/66.2%
associate-*r/66.2%
mul-1-neg66.2%
div-sub66.2%
mul-1-neg66.2%
distribute-lft-out--66.2%
associate-*r/66.2%
mul-1-neg66.2%
unsub-neg66.2%
distribute-rgt-out--66.4%
Simplified66.4%
Taylor expanded in t around 0 71.8%
mul-1-neg71.8%
associate-/l*81.1%
distribute-lft-neg-in81.1%
Simplified81.1%
if -6.5000000000000001e73 < z < 3.10000000000000007e-143Initial program 87.6%
associate-/l*94.4%
Simplified94.4%
clear-num94.5%
un-div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in y around inf 88.0%
if 3.10000000000000007e-143 < z < 3.5000000000000003e151Initial program 80.4%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in t around inf 76.4%
associate-/l*82.2%
Simplified82.2%
Final simplification84.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.45e+61)
t
(if (<= z 5.2e-143)
(+ x (* y (/ (- t x) a)))
(if (<= z 2.1e+151) (+ x (* t (/ (- y z) a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.45e+61) {
tmp = t;
} else if (z <= 5.2e-143) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 2.1e+151) {
tmp = x + (t * ((y - z) / 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 <= (-2.45d+61)) then
tmp = t
else if (z <= 5.2d-143) then
tmp = x + (y * ((t - x) / a))
else if (z <= 2.1d+151) then
tmp = x + (t * ((y - z) / 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 <= -2.45e+61) {
tmp = t;
} else if (z <= 5.2e-143) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 2.1e+151) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.45e+61: tmp = t elif z <= 5.2e-143: tmp = x + (y * ((t - x) / a)) elif z <= 2.1e+151: tmp = x + (t * ((y - z) / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.45e+61) tmp = t; elseif (z <= 5.2e-143) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (z <= 2.1e+151) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.45e+61) tmp = t; elseif (z <= 5.2e-143) tmp = x + (y * ((t - x) / a)); elseif (z <= 2.1e+151) tmp = x + (t * ((y - z) / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.45e+61], t, If[LessEqual[z, 5.2e-143], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+151], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+61}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-143}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+151}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.45000000000000013e61 or 2.1000000000000001e151 < z Initial program 37.7%
associate-/l*57.5%
Simplified57.5%
clear-num57.5%
un-div-inv57.8%
Applied egg-rr57.8%
Taylor expanded in z around inf 55.4%
if -2.45000000000000013e61 < z < 5.19999999999999974e-143Initial program 87.3%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in z around 0 68.8%
associate-/l*74.9%
Simplified74.9%
if 5.19999999999999974e-143 < z < 2.1000000000000001e151Initial program 80.4%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in t around inf 76.4%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in a around inf 49.3%
associate-/l*54.4%
Simplified54.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.9e+74) (not (<= z 4.8e+209))) (+ t (* x (/ (- y a) z))) (+ x (* (- y z) (/ (- t x) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+74) || !(z <= 4.8e+209)) {
tmp = t + (x * ((y - a) / z));
} else {
tmp = x + ((y - z) * ((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.9d+74)) .or. (.not. (z <= 4.8d+209))) then
tmp = t + (x * ((y - a) / z))
else
tmp = x + ((y - z) * ((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.9e+74) || !(z <= 4.8e+209)) {
tmp = t + (x * ((y - a) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e+74) or not (z <= 4.8e+209): tmp = t + (x * ((y - a) / z)) else: tmp = x + ((y - z) * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e+74) || !(z <= 4.8e+209)) tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z))); else tmp = Float64(x + Float64(Float64(y - z) * 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.9e+74) || ~((z <= 4.8e+209))) tmp = t + (x * ((y - a) / z)); else tmp = x + ((y - z) * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e+74], N[Not[LessEqual[z, 4.8e+209]], $MachinePrecision]], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+74} \lor \neg \left(z \leq 4.8 \cdot 10^{+209}\right):\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -1.8999999999999999e74 or 4.79999999999999991e209 < z Initial program 32.3%
+-commutative32.3%
*-commutative32.3%
associate-/l*59.6%
fma-define59.6%
Simplified59.6%
Taylor expanded in z around inf 64.2%
associate--l+64.2%
associate-*r/64.2%
associate-*r/64.2%
mul-1-neg64.2%
div-sub64.2%
mul-1-neg64.2%
distribute-lft-out--64.2%
associate-*r/64.2%
mul-1-neg64.2%
unsub-neg64.2%
distribute-rgt-out--64.3%
Simplified64.3%
Taylor expanded in t around 0 72.9%
mul-1-neg72.9%
associate-/l*84.5%
distribute-lft-neg-in84.5%
Simplified84.5%
if -1.8999999999999999e74 < z < 4.79999999999999991e209Initial program 82.0%
associate-/l*91.1%
Simplified91.1%
Final simplification89.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.2e-142) (not (<= a 8.4e-45))) (+ x (* t (/ (- y z) (- a z)))) (- t (/ (* y (- t x)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.2e-142) || !(a <= 8.4e-45)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t - ((y * (t - x)) / 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 <= (-7.2d-142)) .or. (.not. (a <= 8.4d-45))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t - ((y * (t - x)) / 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 <= -7.2e-142) || !(a <= 8.4e-45)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t - ((y * (t - x)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.2e-142) or not (a <= 8.4e-45): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t - ((y * (t - x)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.2e-142) || !(a <= 8.4e-45)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t - Float64(Float64(y * Float64(t - x)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.2e-142) || ~((a <= 8.4e-45))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t - ((y * (t - x)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.2e-142], N[Not[LessEqual[a, 8.4e-45]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{-142} \lor \neg \left(a \leq 8.4 \cdot 10^{-45}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\
\end{array}
\end{array}
if a < -7.20000000000000001e-142 or 8.3999999999999998e-45 < a Initial program 72.0%
associate-/l*88.1%
Simplified88.1%
Taylor expanded in t around inf 63.3%
associate-/l*76.3%
Simplified76.3%
if -7.20000000000000001e-142 < a < 8.3999999999999998e-45Initial program 69.2%
+-commutative69.2%
*-commutative69.2%
associate-/l*75.4%
fma-define75.4%
Simplified75.4%
Taylor expanded in z around inf 84.3%
associate--l+84.3%
associate-*r/84.3%
associate-*r/84.3%
mul-1-neg84.3%
div-sub86.4%
mul-1-neg86.4%
distribute-lft-out--86.4%
associate-*r/86.4%
mul-1-neg86.4%
unsub-neg86.4%
distribute-rgt-out--86.4%
Simplified86.4%
Taylor expanded in y around inf 86.3%
*-commutative86.3%
Simplified86.3%
Final simplification80.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.4e-141)
(+ x (* (- y z) (/ t (- a z))))
(if (<= a 3.8e-45)
(- t (/ (* y (- t x)) z))
(+ x (* t (/ (- y z) (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.4e-141) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (a <= 3.8e-45) {
tmp = t - ((y * (t - x)) / z);
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.4d-141)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (a <= 3.8d-45) then
tmp = t - ((y * (t - x)) / z)
else
tmp = x + (t * ((y - z) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.4e-141) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (a <= 3.8e-45) {
tmp = t - ((y * (t - x)) / z);
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.4e-141: tmp = x + ((y - z) * (t / (a - z))) elif a <= 3.8e-45: tmp = t - ((y * (t - x)) / z) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.4e-141) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (a <= 3.8e-45) tmp = Float64(t - Float64(Float64(y * Float64(t - x)) / z)); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.4e-141) tmp = x + ((y - z) * (t / (a - z))); elseif (a <= 3.8e-45) tmp = t - ((y * (t - x)) / z); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.4e-141], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e-45], N[(t - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{-141}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-45}:\\
\;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -2.4000000000000001e-141Initial program 75.0%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in t around inf 77.6%
if -2.4000000000000001e-141 < a < 3.79999999999999997e-45Initial program 69.2%
+-commutative69.2%
*-commutative69.2%
associate-/l*75.4%
fma-define75.4%
Simplified75.4%
Taylor expanded in z around inf 84.3%
associate--l+84.3%
associate-*r/84.3%
associate-*r/84.3%
mul-1-neg84.3%
div-sub86.4%
mul-1-neg86.4%
distribute-lft-out--86.4%
associate-*r/86.4%
mul-1-neg86.4%
unsub-neg86.4%
distribute-rgt-out--86.4%
Simplified86.4%
Taylor expanded in y around inf 86.3%
*-commutative86.3%
Simplified86.3%
if 3.79999999999999997e-45 < a Initial program 68.3%
associate-/l*85.6%
Simplified85.6%
Taylor expanded in t around inf 61.2%
associate-/l*76.1%
Simplified76.1%
Final simplification80.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.85e-65) (+ x (* t (/ (- y z) a))) (if (<= a 2.8e-25) (- t (/ (* y (- t x)) z)) (+ x (/ (- t x) (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.85e-65) {
tmp = x + (t * ((y - z) / a));
} else if (a <= 2.8e-25) {
tmp = t - ((y * (t - x)) / z);
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.85d-65)) then
tmp = x + (t * ((y - z) / a))
else if (a <= 2.8d-25) then
tmp = t - ((y * (t - x)) / z)
else
tmp = x + ((t - x) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.85e-65) {
tmp = x + (t * ((y - z) / a));
} else if (a <= 2.8e-25) {
tmp = t - ((y * (t - x)) / z);
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.85e-65: tmp = x + (t * ((y - z) / a)) elif a <= 2.8e-25: tmp = t - ((y * (t - x)) / z) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.85e-65) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); elseif (a <= 2.8e-25) tmp = Float64(t - Float64(Float64(y * Float64(t - x)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.85e-65) tmp = x + (t * ((y - z) / a)); elseif (a <= 2.8e-25) tmp = t - ((y * (t - x)) / z); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.85e-65], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e-25], N[(t - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{-65}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-25}:\\
\;\;\;\;t - \frac{y \cdot \left(t - x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -1.85e-65Initial program 74.3%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in t around inf 66.0%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in a around inf 60.6%
associate-/l*63.2%
Simplified63.2%
if -1.85e-65 < a < 2.79999999999999988e-25Initial program 71.3%
+-commutative71.3%
*-commutative71.3%
associate-/l*78.8%
fma-define78.8%
Simplified78.8%
Taylor expanded in z around inf 79.4%
associate--l+79.4%
associate-*r/79.4%
associate-*r/79.4%
mul-1-neg79.4%
div-sub81.2%
mul-1-neg81.2%
distribute-lft-out--81.2%
associate-*r/81.2%
mul-1-neg81.2%
unsub-neg81.2%
distribute-rgt-out--81.2%
Simplified81.2%
Taylor expanded in y around inf 80.3%
*-commutative80.3%
Simplified80.3%
if 2.79999999999999988e-25 < a Initial program 66.9%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in y around 0 73.4%
mul-1-neg73.4%
associate-/l*85.0%
distribute-lft-neg-out85.0%
+-commutative85.0%
div-sub85.0%
distribute-rgt-out85.0%
sub-neg85.0%
associate-/r/90.2%
Simplified90.2%
Taylor expanded in z around 0 68.8%
Final simplification72.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.3e-66) (+ x (* t (/ (- y z) a))) (if (<= a 1.15e-45) (+ t (* t (/ (- a y) z))) (+ x (/ (- t x) (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.3e-66) {
tmp = x + (t * ((y - z) / a));
} else if (a <= 1.15e-45) {
tmp = t + (t * ((a - y) / z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.3d-66)) then
tmp = x + (t * ((y - z) / a))
else if (a <= 1.15d-45) then
tmp = t + (t * ((a - y) / z))
else
tmp = x + ((t - x) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.3e-66) {
tmp = x + (t * ((y - z) / a));
} else if (a <= 1.15e-45) {
tmp = t + (t * ((a - y) / z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.3e-66: tmp = x + (t * ((y - z) / a)) elif a <= 1.15e-45: tmp = t + (t * ((a - y) / z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.3e-66) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); elseif (a <= 1.15e-45) tmp = Float64(t + Float64(t * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.3e-66) tmp = x + (t * ((y - z) / a)); elseif (a <= 1.15e-45) tmp = t + (t * ((a - y) / z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.3e-66], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e-45], N[(t + N[(t * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{-66}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-45}:\\
\;\;\;\;t + t \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -1.2999999999999999e-66Initial program 74.3%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in t around inf 66.0%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in a around inf 60.6%
associate-/l*63.2%
Simplified63.2%
if -1.2999999999999999e-66 < a < 1.14999999999999996e-45Initial program 70.5%
+-commutative70.5%
*-commutative70.5%
associate-/l*78.2%
fma-define78.3%
Simplified78.3%
Taylor expanded in z around inf 79.7%
associate--l+79.7%
associate-*r/79.7%
associate-*r/79.7%
mul-1-neg79.7%
div-sub81.6%
mul-1-neg81.6%
distribute-lft-out--81.6%
associate-*r/81.6%
mul-1-neg81.6%
unsub-neg81.6%
distribute-rgt-out--81.6%
Simplified81.6%
Taylor expanded in t around inf 62.6%
associate-/l*65.2%
Simplified65.2%
if 1.14999999999999996e-45 < a Initial program 68.3%
associate-/l*85.6%
Simplified85.6%
Taylor expanded in y around 0 74.5%
mul-1-neg74.5%
associate-/l*84.2%
distribute-lft-neg-out84.2%
+-commutative84.2%
div-sub84.2%
distribute-rgt-out85.6%
sub-neg85.6%
associate-/r/90.6%
Simplified90.6%
Taylor expanded in z around 0 67.6%
Final simplification65.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1e+74) t (if (<= z 2.2e+151) (+ x (* t (/ y (- a z)))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+74) {
tmp = t;
} else if (z <= 2.2e+151) {
tmp = x + (t * (y / (a - z)));
} 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 <= (-1d+74)) then
tmp = t
else if (z <= 2.2d+151) then
tmp = x + (t * (y / (a - z)))
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 <= -1e+74) {
tmp = t;
} else if (z <= 2.2e+151) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1e+74: tmp = t elif z <= 2.2e+151: tmp = x + (t * (y / (a - z))) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e+74) tmp = t; elseif (z <= 2.2e+151) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1e+74) tmp = t; elseif (z <= 2.2e+151) tmp = x + (t * (y / (a - z))); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e+74], t, If[LessEqual[z, 2.2e+151], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+74}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+151}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.99999999999999952e73 or 2.20000000000000007e151 < z Initial program 35.1%
associate-/l*56.4%
Simplified56.4%
clear-num56.4%
un-div-inv56.7%
Applied egg-rr56.7%
Taylor expanded in z around inf 56.1%
if -9.99999999999999952e73 < z < 2.20000000000000007e151Initial program 85.0%
associate-/l*92.3%
Simplified92.3%
Taylor expanded in t around inf 69.3%
associate-/l*73.1%
Simplified73.1%
Taylor expanded in y around inf 55.6%
associate-/l*57.8%
Simplified57.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.92e+56) t (if (<= z 1.25e-88) (* x (- 1.0 (/ y a))) (if (<= z 2.2e+151) (+ x t) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.92e+56) {
tmp = t;
} else if (z <= 1.25e-88) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.2e+151) {
tmp = x + t;
} 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.92d+56)) then
tmp = t
else if (z <= 1.25d-88) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 2.2d+151) then
tmp = x + t
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.92e+56) {
tmp = t;
} else if (z <= 1.25e-88) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.2e+151) {
tmp = x + t;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.92e+56: tmp = t elif z <= 1.25e-88: tmp = x * (1.0 - (y / a)) elif z <= 2.2e+151: tmp = x + t else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.92e+56) tmp = t; elseif (z <= 1.25e-88) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 2.2e+151) tmp = Float64(x + t); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.92e+56) tmp = t; elseif (z <= 1.25e-88) tmp = x * (1.0 - (y / a)); elseif (z <= 2.2e+151) tmp = x + t; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.92e+56], t, If[LessEqual[z, 1.25e-88], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+151], N[(x + t), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.92 \cdot 10^{+56}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-88}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+151}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.9199999999999999e56 or 2.20000000000000007e151 < z Initial program 40.1%
associate-/l*59.2%
Simplified59.2%
clear-num59.1%
un-div-inv59.4%
Applied egg-rr59.4%
Taylor expanded in z around inf 54.6%
if -1.9199999999999999e56 < z < 1.25000000000000002e-88Initial program 87.8%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in y around 0 92.3%
mul-1-neg92.3%
associate-/l*86.4%
distribute-lft-neg-out86.4%
+-commutative86.4%
div-sub88.1%
distribute-rgt-out94.9%
sub-neg94.9%
associate-/r/94.2%
Simplified94.2%
Taylor expanded in z around 0 73.1%
Taylor expanded in x around inf 49.1%
mul-1-neg49.1%
unsub-neg49.1%
Simplified49.1%
if 1.25000000000000002e-88 < z < 2.20000000000000007e151Initial program 77.8%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in t around inf 74.9%
associate-/l*79.8%
Simplified79.8%
Taylor expanded in z around inf 29.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.25e-64) (not (<= a 1.5e-24))) (+ x (* t (/ y a))) (* y (/ (- x t) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.25e-64) || !(a <= 1.5e-24)) {
tmp = x + (t * (y / a));
} else {
tmp = 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 <= (-2.25d-64)) .or. (.not. (a <= 1.5d-24))) then
tmp = x + (t * (y / a))
else
tmp = 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 <= -2.25e-64) || !(a <= 1.5e-24)) {
tmp = x + (t * (y / a));
} else {
tmp = y * ((x - t) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.25e-64) or not (a <= 1.5e-24): tmp = x + (t * (y / a)) else: tmp = y * ((x - t) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.25e-64) || !(a <= 1.5e-24)) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = 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 <= -2.25e-64) || ~((a <= 1.5e-24))) tmp = x + (t * (y / a)); else tmp = y * ((x - t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.25e-64], N[Not[LessEqual[a, 1.5e-24]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.25 \cdot 10^{-64} \lor \neg \left(a \leq 1.5 \cdot 10^{-24}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\end{array}
\end{array}
if a < -2.25000000000000005e-64 or 1.49999999999999998e-24 < a Initial program 70.9%
associate-/l*87.6%
Simplified87.6%
Taylor expanded in t around inf 63.7%
associate-/l*76.9%
Simplified76.9%
Taylor expanded in z around 0 56.7%
if -2.25000000000000005e-64 < a < 1.49999999999999998e-24Initial program 70.9%
+-commutative70.9%
*-commutative70.9%
associate-/l*78.4%
fma-define78.4%
Simplified78.4%
Taylor expanded in z around inf 78.9%
associate--l+78.9%
associate-*r/78.9%
associate-*r/78.9%
mul-1-neg78.9%
div-sub80.7%
mul-1-neg80.7%
distribute-lft-out--80.7%
associate-*r/80.7%
mul-1-neg80.7%
unsub-neg80.7%
distribute-rgt-out--80.7%
Simplified80.7%
Taylor expanded in y around -inf 47.3%
mul-1-neg47.3%
associate-/l*52.7%
distribute-lft-neg-in52.7%
Simplified52.7%
Final simplification54.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.4e+65) t (if (<= z 2.1e+151) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+65) {
tmp = t;
} else if (z <= 2.1e+151) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.4d+65)) then
tmp = t
else if (z <= 2.1d+151) then
tmp = x + (t * (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+65) {
tmp = t;
} else if (z <= 2.1e+151) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e+65: tmp = t elif z <= 2.1e+151: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+65) tmp = t; elseif (z <= 2.1e+151) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.4e+65) tmp = t; elseif (z <= 2.1e+151) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+65], t, If[LessEqual[z, 2.1e+151], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+65}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+151}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.4000000000000002e65 or 2.1000000000000001e151 < z Initial program 37.7%
associate-/l*57.5%
Simplified57.5%
clear-num57.5%
un-div-inv57.8%
Applied egg-rr57.8%
Taylor expanded in z around inf 55.4%
if -2.4000000000000002e65 < z < 2.1000000000000001e151Initial program 84.7%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in t around inf 68.8%
associate-/l*72.6%
Simplified72.6%
Taylor expanded in z around 0 50.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -700000000.0) x (if (<= a 2.25e-44) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -700000000.0) {
tmp = x;
} else if (a <= 2.25e-44) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-700000000.0d0)) then
tmp = x
else if (a <= 2.25d-44) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -700000000.0) {
tmp = x;
} else if (a <= 2.25e-44) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -700000000.0: tmp = x elif a <= 2.25e-44: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -700000000.0) tmp = x; elseif (a <= 2.25e-44) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -700000000.0) tmp = x; elseif (a <= 2.25e-44) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -700000000.0], x, If[LessEqual[a, 2.25e-44], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -700000000:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-44}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7e8 or 2.2499999999999999e-44 < a Initial program 70.6%
+-commutative70.6%
*-commutative70.6%
associate-/l*90.0%
fma-define90.0%
Simplified90.0%
Taylor expanded in a around inf 35.0%
if -7e8 < a < 2.2499999999999999e-44Initial program 71.2%
associate-/l*77.6%
Simplified77.6%
clear-num77.7%
un-div-inv77.7%
Applied egg-rr77.7%
Taylor expanded in z around inf 35.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 70.9%
associate-/l*82.2%
Simplified82.2%
clear-num82.2%
un-div-inv82.3%
Applied egg-rr82.3%
Taylor expanded in z around inf 24.1%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 70.9%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in t around 0 33.1%
associate-*r/33.1%
mul-1-neg33.1%
distribute-lft-neg-out33.1%
*-commutative33.1%
Simplified33.1%
Taylor expanded in z around inf 2.7%
distribute-rgt1-in2.7%
metadata-eval2.7%
mul0-lft2.7%
Simplified2.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024172
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))