
(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 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(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 -5e-278) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (/ 1.0 (/ z (* (- y a) (+ 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 <= -5e-278) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (1.0 / (z / ((y - a) * (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 <= (-5d-278)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + (1.0d0 / (z / ((y - a) * (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 <= -5e-278) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (1.0 / (z / ((y - a) * (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 <= -5e-278) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + (1.0 / (z / ((y - a) * (x + t)))) 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 <= -5e-278) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(1.0 / Float64(z / Float64(Float64(y - a) * 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 <= -5e-278) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + (1.0 / (z / ((y - a) * (x + t)))); 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, -5e-278], 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[(1.0 / N[(z / N[(N[(y - a), $MachinePrecision] * N[(x + t), $MachinePrecision]), $MachinePrecision]), $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 -5 \cdot 10^{-278} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{1}{\frac{z}{\left(y - a\right) \cdot \left(x + t\right)}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999985e-278 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 73.4%
associate-/l*86.0%
Simplified86.0%
Taylor expanded in y around 0 74.9%
mul-1-neg74.9%
associate-/l*82.0%
distribute-lft-neg-out82.0%
+-commutative82.0%
div-sub82.0%
distribute-rgt-out86.0%
sub-neg86.0%
associate-/r/92.9%
Simplified92.9%
if -4.99999999999999985e-278 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.5%
+-commutative4.5%
*-commutative4.5%
associate-/l*4.5%
fma-define4.5%
Simplified4.5%
Taylor expanded in z around -inf 99.7%
add-sqr-sqrt55.3%
sqrt-unprod57.0%
mul-1-neg57.0%
mul-1-neg57.0%
sqr-neg57.0%
sqrt-unprod23.1%
add-sqr-sqrt34.5%
clear-num34.5%
distribute-rgt-out--34.5%
Applied egg-rr99.9%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-278)
t_2
(if (<= t_2 0.0)
(+ t (/ 1.0 (/ z (* (- y a) (+ x t)))))
(if (<= t_2 5e+292) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-278) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (1.0 / (z / ((y - a) * (x + t))));
} else if (t_2 <= 5e+292) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -5e-278) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t + (1.0 / (z / ((y - a) * (x + t))));
} else if (t_2 <= 5e+292) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -5e-278: tmp = t_2 elif t_2 <= 0.0: tmp = t + (1.0 / (z / ((y - a) * (x + t)))) elif t_2 <= 5e+292: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-278) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(1.0 / Float64(z / Float64(Float64(y - a) * Float64(x + t))))); elseif (t_2 <= 5e+292) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -5e-278) tmp = t_2; elseif (t_2 <= 0.0) tmp = t + (1.0 / (z / ((y - a) * (x + t)))); elseif (t_2 <= 5e+292) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-278], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(1.0 / N[(z / N[(N[(y - a), $MachinePrecision] * N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+292], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-278}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{1}{\frac{z}{\left(y - a\right) \cdot \left(x + t\right)}}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+292}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 4.9999999999999996e292 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 39.1%
associate-/l*86.6%
Simplified86.6%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999985e-278 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 4.9999999999999996e292Initial program 96.7%
if -4.99999999999999985e-278 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.5%
+-commutative4.5%
*-commutative4.5%
associate-/l*4.5%
fma-define4.5%
Simplified4.5%
Taylor expanded in z around -inf 99.7%
add-sqr-sqrt55.3%
sqrt-unprod57.0%
mul-1-neg57.0%
mul-1-neg57.0%
sqr-neg57.0%
sqrt-unprod23.1%
add-sqr-sqrt34.5%
clear-num34.5%
distribute-rgt-out--34.5%
Applied egg-rr99.9%
Final simplification93.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ (- y z) (- a z))))) (t_2 (+ t (* x (/ (- y a) z)))))
(if (<= z -2.9e+111)
t_2
(if (<= z -7.6e-188)
t_1
(if (<= z 9.4e-138)
(+ x (/ (- t x) (/ a y)))
(if (<= z 4.8e+157) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * ((y - z) / (a - z)));
double t_2 = t + (x * ((y - a) / z));
double tmp;
if (z <= -2.9e+111) {
tmp = t_2;
} else if (z <= -7.6e-188) {
tmp = t_1;
} else if (z <= 9.4e-138) {
tmp = x + ((t - x) / (a / y));
} else if (z <= 4.8e+157) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (t * ((y - z) / (a - z)))
t_2 = t + (x * ((y - a) / z))
if (z <= (-2.9d+111)) then
tmp = t_2
else if (z <= (-7.6d-188)) then
tmp = t_1
else if (z <= 9.4d-138) then
tmp = x + ((t - x) / (a / y))
else if (z <= 4.8d+157) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * ((y - z) / (a - z)));
double t_2 = t + (x * ((y - a) / z));
double tmp;
if (z <= -2.9e+111) {
tmp = t_2;
} else if (z <= -7.6e-188) {
tmp = t_1;
} else if (z <= 9.4e-138) {
tmp = x + ((t - x) / (a / y));
} else if (z <= 4.8e+157) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * ((y - z) / (a - z))) t_2 = t + (x * ((y - a) / z)) tmp = 0 if z <= -2.9e+111: tmp = t_2 elif z <= -7.6e-188: tmp = t_1 elif z <= 9.4e-138: tmp = x + ((t - x) / (a / y)) elif z <= 4.8e+157: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))) t_2 = Float64(t + Float64(x * Float64(Float64(y - a) / z))) tmp = 0.0 if (z <= -2.9e+111) tmp = t_2; elseif (z <= -7.6e-188) tmp = t_1; elseif (z <= 9.4e-138) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); elseif (z <= 4.8e+157) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * ((y - z) / (a - z))); t_2 = t + (x * ((y - a) / z)); tmp = 0.0; if (z <= -2.9e+111) tmp = t_2; elseif (z <= -7.6e-188) tmp = t_1; elseif (z <= 9.4e-138) tmp = x + ((t - x) / (a / y)); elseif (z <= 4.8e+157) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+111], t$95$2, If[LessEqual[z, -7.6e-188], t$95$1, If[LessEqual[z, 9.4e-138], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e+157], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y - z}{a - z}\\
t_2 := t + x \cdot \frac{y - a}{z}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.4 \cdot 10^{-138}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.9e111 or 4.7999999999999999e157 < z Initial program 39.6%
+-commutative39.6%
*-commutative39.6%
associate-/l*68.3%
fma-define68.4%
Simplified68.4%
Taylor expanded in z around -inf 70.0%
Taylor expanded in x around -inf 76.3%
associate-/l*87.6%
Simplified87.6%
if -2.9e111 < z < -7.599999999999999e-188 or 9.4000000000000002e-138 < z < 4.7999999999999999e157Initial program 75.8%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in t around inf 59.8%
associate-/l*72.5%
Simplified72.5%
if -7.599999999999999e-188 < z < 9.4000000000000002e-138Initial program 88.9%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in y around 0 92.9%
mul-1-neg92.9%
associate-/l*80.7%
distribute-lft-neg-out80.7%
+-commutative80.7%
div-sub80.7%
distribute-rgt-out92.9%
sub-neg92.9%
associate-/r/98.4%
Simplified98.4%
Taylor expanded in z around 0 91.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* x (/ (- y a) z)))))
(if (<= z -3.2e+106)
t_1
(if (<= z -2.7e-84)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 1.35e+91) (+ x (/ (- t x) (/ a (- y 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 <= -3.2e+106) {
tmp = t_1;
} else if (z <= -2.7e-84) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 1.35e+91) {
tmp = x + ((t - x) / (a / (y - z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (x * ((y - a) / z))
if (z <= (-3.2d+106)) then
tmp = t_1
else if (z <= (-2.7d-84)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 1.35d+91) then
tmp = x + ((t - x) / (a / (y - z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x * ((y - a) / z));
double tmp;
if (z <= -3.2e+106) {
tmp = t_1;
} else if (z <= -2.7e-84) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 1.35e+91) {
tmp = x + ((t - x) / (a / (y - 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 <= -3.2e+106: tmp = t_1 elif z <= -2.7e-84: tmp = x + ((y - z) * (t / (a - z))) elif z <= 1.35e+91: tmp = x + ((t - x) / (a / (y - 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 <= -3.2e+106) tmp = t_1; elseif (z <= -2.7e-84) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 1.35e+91) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - 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 <= -3.2e+106) tmp = t_1; elseif (z <= -2.7e-84) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 1.35e+91) tmp = x + ((t - x) / (a / (y - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+106], t$95$1, If[LessEqual[z, -2.7e-84], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+91], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - 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 -3.2 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-84}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+91}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.1999999999999998e106 or 1.35e91 < z Initial program 41.8%
+-commutative41.8%
*-commutative41.8%
associate-/l*72.4%
fma-define72.4%
Simplified72.4%
Taylor expanded in z around -inf 70.5%
Taylor expanded in x around -inf 76.0%
associate-/l*85.8%
Simplified85.8%
if -3.1999999999999998e106 < z < -2.6999999999999999e-84Initial program 65.3%
associate-/l*84.6%
Simplified84.6%
Taylor expanded in t around inf 63.8%
if -2.6999999999999999e-84 < z < 1.35e91Initial program 86.9%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in y around 0 88.0%
mul-1-neg88.0%
associate-/l*83.3%
distribute-lft-neg-out83.3%
+-commutative83.3%
div-sub83.3%
distribute-rgt-out90.4%
sub-neg90.4%
associate-/r/96.8%
Simplified96.8%
Taylor expanded in a around inf 83.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (- a z))) (t_2 (+ t (* x (/ (- y a) z)))))
(if (<= z -1.9e+23)
t_2
(if (<= z -1.3e-291)
(* x (- 1.0 t_1))
(if (<= z 1.25e+49) (+ x (* t t_1)) t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a - z);
double t_2 = t + (x * ((y - a) / z));
double tmp;
if (z <= -1.9e+23) {
tmp = t_2;
} else if (z <= -1.3e-291) {
tmp = x * (1.0 - t_1);
} else if (z <= 1.25e+49) {
tmp = x + (t * t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y / (a - z)
t_2 = t + (x * ((y - a) / z))
if (z <= (-1.9d+23)) then
tmp = t_2
else if (z <= (-1.3d-291)) then
tmp = x * (1.0d0 - t_1)
else if (z <= 1.25d+49) then
tmp = x + (t * t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a - z);
double t_2 = t + (x * ((y - a) / z));
double tmp;
if (z <= -1.9e+23) {
tmp = t_2;
} else if (z <= -1.3e-291) {
tmp = x * (1.0 - t_1);
} else if (z <= 1.25e+49) {
tmp = x + (t * t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a - z) t_2 = t + (x * ((y - a) / z)) tmp = 0 if z <= -1.9e+23: tmp = t_2 elif z <= -1.3e-291: tmp = x * (1.0 - t_1) elif z <= 1.25e+49: tmp = x + (t * t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a - z)) t_2 = Float64(t + Float64(x * Float64(Float64(y - a) / z))) tmp = 0.0 if (z <= -1.9e+23) tmp = t_2; elseif (z <= -1.3e-291) tmp = Float64(x * Float64(1.0 - t_1)); elseif (z <= 1.25e+49) tmp = Float64(x + Float64(t * t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a - z); t_2 = t + (x * ((y - a) / z)); tmp = 0.0; if (z <= -1.9e+23) tmp = t_2; elseif (z <= -1.3e-291) tmp = x * (1.0 - t_1); elseif (z <= 1.25e+49) tmp = x + (t * t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+23], t$95$2, If[LessEqual[z, -1.3e-291], N[(x * N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+49], N[(x + N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a - z}\\
t_2 := t + x \cdot \frac{y - a}{z}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+23}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-291}:\\
\;\;\;\;x \cdot \left(1 - t\_1\right)\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+49}:\\
\;\;\;\;x + t \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.89999999999999987e23 or 1.2500000000000001e49 < z Initial program 46.0%
+-commutative46.0%
*-commutative46.0%
associate-/l*74.9%
fma-define74.9%
Simplified74.9%
Taylor expanded in z around -inf 65.0%
Taylor expanded in x around -inf 67.2%
associate-/l*75.4%
Simplified75.4%
if -1.89999999999999987e23 < z < -1.2999999999999999e-291Initial program 84.8%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in t around 0 58.7%
associate-*r/58.7%
mul-1-neg58.7%
distribute-lft-neg-out58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in y around inf 57.7%
Taylor expanded in x around 0 62.1%
mul-1-neg62.1%
unsub-neg62.1%
Simplified62.1%
if -1.2999999999999999e-291 < z < 1.2500000000000001e49Initial program 88.2%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in t around inf 73.1%
Taylor expanded in y around inf 62.1%
associate-/l*69.2%
Simplified69.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* x (/ (- y a) z)))))
(if (<= z -1.02e+20)
t_1
(if (<= z 8.5e-197)
(* x (- 1.0 (/ y (- a z))))
(if (<= z 9.5e+49) (+ x (* t (/ y a))) 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 <= -1.02e+20) {
tmp = t_1;
} else if (z <= 8.5e-197) {
tmp = x * (1.0 - (y / (a - z)));
} else if (z <= 9.5e+49) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (x * ((y - a) / z))
if (z <= (-1.02d+20)) then
tmp = t_1
else if (z <= 8.5d-197) then
tmp = x * (1.0d0 - (y / (a - z)))
else if (z <= 9.5d+49) then
tmp = x + (t * (y / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x * ((y - a) / z));
double tmp;
if (z <= -1.02e+20) {
tmp = t_1;
} else if (z <= 8.5e-197) {
tmp = x * (1.0 - (y / (a - z)));
} else if (z <= 9.5e+49) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x * ((y - a) / z)) tmp = 0 if z <= -1.02e+20: tmp = t_1 elif z <= 8.5e-197: tmp = x * (1.0 - (y / (a - z))) elif z <= 9.5e+49: tmp = x + (t * (y / a)) 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 <= -1.02e+20) tmp = t_1; elseif (z <= 8.5e-197) tmp = Float64(x * Float64(1.0 - Float64(y / Float64(a - z)))); elseif (z <= 9.5e+49) tmp = Float64(x + Float64(t * Float64(y / a))); 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 <= -1.02e+20) tmp = t_1; elseif (z <= 8.5e-197) tmp = x * (1.0 - (y / (a - z))); elseif (z <= 9.5e+49) tmp = x + (t * (y / a)); 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, -1.02e+20], t$95$1, If[LessEqual[z, 8.5e-197], N[(x * N[(1.0 - N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+49], N[(x + N[(t * N[(y / a), $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 -1.02 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-197}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a - z}\right)\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+49}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.02e20 or 9.49999999999999969e49 < z Initial program 46.0%
+-commutative46.0%
*-commutative46.0%
associate-/l*74.9%
fma-define74.9%
Simplified74.9%
Taylor expanded in z around -inf 65.0%
Taylor expanded in x around -inf 67.2%
associate-/l*75.4%
Simplified75.4%
if -1.02e20 < z < 8.5e-197Initial program 87.5%
associate-/l*90.0%
Simplified90.0%
Taylor expanded in t around 0 61.6%
associate-*r/61.6%
mul-1-neg61.6%
distribute-lft-neg-out61.6%
*-commutative61.6%
Simplified61.6%
Taylor expanded in y around inf 61.0%
Taylor expanded in x around 0 64.5%
mul-1-neg64.5%
unsub-neg64.5%
Simplified64.5%
if 8.5e-197 < z < 9.49999999999999969e49Initial program 84.8%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in t around inf 71.3%
Taylor expanded in a around inf 67.1%
Taylor expanded in y around inf 51.9%
associate-/l*66.5%
Simplified66.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1e+106) (not (<= z 3.7e+206))) (+ 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 <= -1e+106) || !(z <= 3.7e+206)) {
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 <= (-1d+106)) .or. (.not. (z <= 3.7d+206))) 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 <= -1e+106) || !(z <= 3.7e+206)) {
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 <= -1e+106) or not (z <= 3.7e+206): 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 <= -1e+106) || !(z <= 3.7e+206)) 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 <= -1e+106) || ~((z <= 3.7e+206))) 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, -1e+106], N[Not[LessEqual[z, 3.7e+206]], $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 \cdot 10^{+106} \lor \neg \left(z \leq 3.7 \cdot 10^{+206}\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.00000000000000009e106 or 3.6999999999999997e206 < z Initial program 37.6%
+-commutative37.6%
*-commutative37.6%
associate-/l*68.0%
fma-define68.0%
Simplified68.0%
Taylor expanded in z around -inf 71.0%
Taylor expanded in x around -inf 77.6%
associate-/l*89.6%
Simplified89.6%
if -1.00000000000000009e106 < z < 3.6999999999999997e206Initial program 80.4%
associate-/l*88.4%
Simplified88.4%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* a (/ x z)))))
(if (<= z -2.8e+52)
t_1
(if (<= z 1.5e-196)
(* x (- 1.0 (/ y (- a z))))
(if (<= z 1.4e+55) (+ x (* t (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * (x / z));
double tmp;
if (z <= -2.8e+52) {
tmp = t_1;
} else if (z <= 1.5e-196) {
tmp = x * (1.0 - (y / (a - z)));
} else if (z <= 1.4e+55) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - (a * (x / z))
if (z <= (-2.8d+52)) then
tmp = t_1
else if (z <= 1.5d-196) then
tmp = x * (1.0d0 - (y / (a - z)))
else if (z <= 1.4d+55) then
tmp = x + (t * (y / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * (x / z));
double tmp;
if (z <= -2.8e+52) {
tmp = t_1;
} else if (z <= 1.5e-196) {
tmp = x * (1.0 - (y / (a - z)));
} else if (z <= 1.4e+55) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (a * (x / z)) tmp = 0 if z <= -2.8e+52: tmp = t_1 elif z <= 1.5e-196: tmp = x * (1.0 - (y / (a - z))) elif z <= 1.4e+55: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(a * Float64(x / z))) tmp = 0.0 if (z <= -2.8e+52) tmp = t_1; elseif (z <= 1.5e-196) tmp = Float64(x * Float64(1.0 - Float64(y / Float64(a - z)))); elseif (z <= 1.4e+55) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (a * (x / z)); tmp = 0.0; if (z <= -2.8e+52) tmp = t_1; elseif (z <= 1.5e-196) tmp = x * (1.0 - (y / (a - z))); elseif (z <= 1.4e+55) tmp = x + (t * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+52], t$95$1, If[LessEqual[z, 1.5e-196], N[(x * N[(1.0 - N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+55], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - a \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-196}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a - z}\right)\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+55}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.8e52 or 1.4e55 < z Initial program 47.0%
+-commutative47.0%
*-commutative47.0%
associate-/l*74.6%
fma-define74.6%
Simplified74.6%
Taylor expanded in z around -inf 67.0%
Taylor expanded in y around 0 52.1%
Taylor expanded in t around 0 55.7%
mul-1-neg55.7%
associate-/l*55.5%
distribute-rgt-neg-in55.5%
distribute-neg-frac55.5%
Simplified55.5%
if -2.8e52 < z < 1.5e-196Initial program 84.5%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in t around 0 58.8%
associate-*r/58.8%
mul-1-neg58.8%
distribute-lft-neg-out58.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in y around inf 58.2%
Taylor expanded in x around 0 62.5%
mul-1-neg62.5%
unsub-neg62.5%
Simplified62.5%
if 1.5e-196 < z < 1.4e55Initial program 84.8%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in t around inf 71.3%
Taylor expanded in a around inf 67.1%
Taylor expanded in y around inf 51.9%
associate-/l*66.5%
Simplified66.5%
Final simplification60.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* a (/ x z)))))
(if (<= z -3.5e+26)
t_1
(if (<= z -1.35e-293)
(- x (* x (/ y a)))
(if (<= z 5.2e+55) (+ x (* t (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * (x / z));
double tmp;
if (z <= -3.5e+26) {
tmp = t_1;
} else if (z <= -1.35e-293) {
tmp = x - (x * (y / a));
} else if (z <= 5.2e+55) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - (a * (x / z))
if (z <= (-3.5d+26)) then
tmp = t_1
else if (z <= (-1.35d-293)) then
tmp = x - (x * (y / a))
else if (z <= 5.2d+55) then
tmp = x + (t * (y / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * (x / z));
double tmp;
if (z <= -3.5e+26) {
tmp = t_1;
} else if (z <= -1.35e-293) {
tmp = x - (x * (y / a));
} else if (z <= 5.2e+55) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (a * (x / z)) tmp = 0 if z <= -3.5e+26: tmp = t_1 elif z <= -1.35e-293: tmp = x - (x * (y / a)) elif z <= 5.2e+55: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(a * Float64(x / z))) tmp = 0.0 if (z <= -3.5e+26) tmp = t_1; elseif (z <= -1.35e-293) tmp = Float64(x - Float64(x * Float64(y / a))); elseif (z <= 5.2e+55) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (a * (x / z)); tmp = 0.0; if (z <= -3.5e+26) tmp = t_1; elseif (z <= -1.35e-293) tmp = x - (x * (y / a)); elseif (z <= 5.2e+55) tmp = x + (t * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+26], t$95$1, If[LessEqual[z, -1.35e-293], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+55], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - a \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-293}:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+55}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.4999999999999999e26 or 5.2e55 < z Initial program 46.0%
+-commutative46.0%
*-commutative46.0%
associate-/l*74.9%
fma-define74.9%
Simplified74.9%
Taylor expanded in z around -inf 65.0%
Taylor expanded in y around 0 50.8%
Taylor expanded in t around 0 54.3%
mul-1-neg54.3%
associate-/l*54.1%
distribute-rgt-neg-in54.1%
distribute-neg-frac54.1%
Simplified54.1%
if -3.4999999999999999e26 < z < -1.35000000000000001e-293Initial program 84.8%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in t around 0 58.7%
associate-*r/58.7%
mul-1-neg58.7%
distribute-lft-neg-out58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in y around inf 57.7%
Taylor expanded in a around inf 54.7%
mul-1-neg54.7%
unsub-neg54.7%
associate-/l*59.0%
Simplified59.0%
if -1.35000000000000001e-293 < z < 5.2e55Initial program 88.2%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in t around inf 73.1%
Taylor expanded in a around inf 69.5%
Taylor expanded in y around inf 59.1%
associate-/l*67.5%
Simplified67.5%
Final simplification59.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.2e+54)
(+ t (* a (/ t z)))
(if (<= z -1e-297)
(- x (* x (/ y a)))
(if (<= z 8.2e+50) (+ x (* t (/ y a))) (* t (+ (/ a z) 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+54) {
tmp = t + (a * (t / z));
} else if (z <= -1e-297) {
tmp = x - (x * (y / a));
} else if (z <= 8.2e+50) {
tmp = x + (t * (y / a));
} else {
tmp = t * ((a / z) + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.2d+54)) then
tmp = t + (a * (t / z))
else if (z <= (-1d-297)) then
tmp = x - (x * (y / a))
else if (z <= 8.2d+50) then
tmp = x + (t * (y / a))
else
tmp = t * ((a / z) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+54) {
tmp = t + (a * (t / z));
} else if (z <= -1e-297) {
tmp = x - (x * (y / a));
} else if (z <= 8.2e+50) {
tmp = x + (t * (y / a));
} else {
tmp = t * ((a / z) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+54: tmp = t + (a * (t / z)) elif z <= -1e-297: tmp = x - (x * (y / a)) elif z <= 8.2e+50: tmp = x + (t * (y / a)) else: tmp = t * ((a / z) + 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+54) tmp = Float64(t + Float64(a * Float64(t / z))); elseif (z <= -1e-297) tmp = Float64(x - Float64(x * Float64(y / a))); elseif (z <= 8.2e+50) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t * Float64(Float64(a / z) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.2e+54) tmp = t + (a * (t / z)); elseif (z <= -1e-297) tmp = x - (x * (y / a)); elseif (z <= 8.2e+50) tmp = x + (t * (y / a)); else tmp = t * ((a / z) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+54], N[(t + N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1e-297], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+50], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(a / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+54}:\\
\;\;\;\;t + a \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-297}:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+50}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{a}{z} + 1\right)\\
\end{array}
\end{array}
if z < -3.2e54Initial program 44.3%
+-commutative44.3%
*-commutative44.3%
associate-/l*74.0%
fma-define74.1%
Simplified74.1%
Taylor expanded in z around -inf 62.6%
Taylor expanded in y around 0 45.4%
Taylor expanded in t around inf 40.4%
associate-/l*48.1%
Simplified48.1%
if -3.2e54 < z < -1.00000000000000004e-297Initial program 79.4%
associate-/l*87.2%
Simplified87.2%
Taylor expanded in t around 0 54.0%
associate-*r/54.0%
mul-1-neg54.0%
distribute-lft-neg-out54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in y around inf 53.2%
Taylor expanded in a around inf 50.4%
mul-1-neg50.4%
unsub-neg50.4%
associate-/l*54.4%
Simplified54.4%
if -1.00000000000000004e-297 < z < 8.2000000000000002e50Initial program 88.2%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in t around inf 73.1%
Taylor expanded in a around inf 69.5%
Taylor expanded in y around inf 59.1%
associate-/l*67.5%
Simplified67.5%
if 8.2000000000000002e50 < z Initial program 51.8%
+-commutative51.8%
*-commutative51.8%
associate-/l*77.0%
fma-define77.0%
Simplified77.0%
Taylor expanded in z around -inf 72.3%
Taylor expanded in y around 0 60.5%
Taylor expanded in t around inf 48.2%
Final simplification55.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.3e+39) (not (<= z 2.7e+53))) (+ t (* x (/ (- y a) z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.3e+39) || !(z <= 2.7e+53)) {
tmp = t + (x * ((y - a) / 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 ((z <= (-2.3d+39)) .or. (.not. (z <= 2.7d+53))) then
tmp = t + (x * ((y - a) / 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 ((z <= -2.3e+39) || !(z <= 2.7e+53)) {
tmp = t + (x * ((y - a) / z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.3e+39) or not (z <= 2.7e+53): tmp = t + (x * ((y - a) / z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.3e+39) || !(z <= 2.7e+53)) tmp = Float64(t + Float64(x * Float64(Float64(y - a) / 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 ((z <= -2.3e+39) || ~((z <= 2.7e+53))) tmp = t + (x * ((y - a) / z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.3e+39], N[Not[LessEqual[z, 2.7e+53]], $MachinePrecision]], N[(t + N[(x * N[(N[(y - a), $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}\;z \leq -2.3 \cdot 10^{+39} \lor \neg \left(z \leq 2.7 \cdot 10^{+53}\right):\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -2.30000000000000012e39 or 2.70000000000000019e53 < z Initial program 46.6%
+-commutative46.6%
*-commutative46.6%
associate-/l*74.8%
fma-define74.9%
Simplified74.9%
Taylor expanded in z around -inf 66.4%
Taylor expanded in x around -inf 68.7%
associate-/l*77.2%
Simplified77.2%
if -2.30000000000000012e39 < z < 2.70000000000000019e53Initial program 85.1%
associate-/l*90.0%
Simplified90.0%
Taylor expanded in y around 0 88.6%
mul-1-neg88.6%
associate-/l*83.5%
distribute-lft-neg-out83.5%
+-commutative83.5%
div-sub83.5%
distribute-rgt-out90.0%
sub-neg90.0%
associate-/r/95.7%
Simplified95.7%
Taylor expanded in z around 0 77.0%
Final simplification77.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.12e+40) (not (<= z 9e+50))) (+ t (* x (/ (- y a) z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.12e+40) || !(z <= 9e+50)) {
tmp = t + (x * ((y - a) / z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.12d+40)) .or. (.not. (z <= 9d+50))) then
tmp = t + (x * ((y - a) / z))
else
tmp = x + (y * ((t - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.12e+40) || !(z <= 9e+50)) {
tmp = t + (x * ((y - a) / z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.12e+40) or not (z <= 9e+50): tmp = t + (x * ((y - a) / z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.12e+40) || !(z <= 9e+50)) tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.12e+40) || ~((z <= 9e+50))) tmp = t + (x * ((y - a) / z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.12e+40], N[Not[LessEqual[z, 9e+50]], $MachinePrecision]], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.12 \cdot 10^{+40} \lor \neg \left(z \leq 9 \cdot 10^{+50}\right):\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -2.11999999999999991e40 or 9.00000000000000027e50 < z Initial program 46.6%
+-commutative46.6%
*-commutative46.6%
associate-/l*74.8%
fma-define74.9%
Simplified74.9%
Taylor expanded in z around -inf 66.4%
Taylor expanded in x around -inf 68.7%
associate-/l*77.2%
Simplified77.2%
if -2.11999999999999991e40 < z < 9.00000000000000027e50Initial program 85.1%
associate-/l*90.0%
Simplified90.0%
Taylor expanded in z around 0 67.0%
associate-/l*74.9%
Simplified74.9%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.6e-7) (not (<= a 4.9e+45))) (+ x (* t (/ (- y z) a))) (+ t (* x (/ (- y a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.6e-7) || !(a <= 4.9e+45)) {
tmp = x + (t * ((y - z) / a));
} 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) :: tmp
if ((a <= (-5.6d-7)) .or. (.not. (a <= 4.9d+45))) then
tmp = x + (t * ((y - z) / a))
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 tmp;
if ((a <= -5.6e-7) || !(a <= 4.9e+45)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t + (x * ((y - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.6e-7) or not (a <= 4.9e+45): tmp = x + (t * ((y - z) / a)) else: tmp = t + (x * ((y - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.6e-7) || !(a <= 4.9e+45)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.6e-7) || ~((a <= 4.9e+45))) tmp = x + (t * ((y - z) / a)); else tmp = t + (x * ((y - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.6e-7], N[Not[LessEqual[a, 4.9e+45]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{-7} \lor \neg \left(a \leq 4.9 \cdot 10^{+45}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if a < -5.60000000000000038e-7 or 4.9000000000000002e45 < a Initial program 69.8%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in t around inf 77.2%
Taylor expanded in a around inf 59.7%
associate-/l*69.9%
Simplified69.9%
if -5.60000000000000038e-7 < a < 4.9000000000000002e45Initial program 67.4%
+-commutative67.4%
*-commutative67.4%
associate-/l*79.6%
fma-define79.7%
Simplified79.7%
Taylor expanded in z around -inf 71.6%
Taylor expanded in x around -inf 66.3%
associate-/l*70.4%
Simplified70.4%
Final simplification70.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.1e+43) (+ t (* a (/ t z))) (if (<= z 6.2e+51) (+ x (* t (/ y a))) (* t (+ (/ a z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.1e+43) {
tmp = t + (a * (t / z));
} else if (z <= 6.2e+51) {
tmp = x + (t * (y / a));
} else {
tmp = t * ((a / z) + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.1d+43)) then
tmp = t + (a * (t / z))
else if (z <= 6.2d+51) then
tmp = x + (t * (y / a))
else
tmp = t * ((a / z) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.1e+43) {
tmp = t + (a * (t / z));
} else if (z <= 6.2e+51) {
tmp = x + (t * (y / a));
} else {
tmp = t * ((a / z) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.1e+43: tmp = t + (a * (t / z)) elif z <= 6.2e+51: tmp = x + (t * (y / a)) else: tmp = t * ((a / z) + 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.1e+43) tmp = Float64(t + Float64(a * Float64(t / z))); elseif (z <= 6.2e+51) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t * Float64(Float64(a / z) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.1e+43) tmp = t + (a * (t / z)); elseif (z <= 6.2e+51) tmp = x + (t * (y / a)); else tmp = t * ((a / z) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.1e+43], N[(t + N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+51], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(a / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+43}:\\
\;\;\;\;t + a \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+51}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{a}{z} + 1\right)\\
\end{array}
\end{array}
if z < -3.1000000000000002e43Initial program 43.1%
+-commutative43.1%
*-commutative43.1%
associate-/l*73.3%
fma-define73.4%
Simplified73.4%
Taylor expanded in z around -inf 62.4%
Taylor expanded in y around 0 45.6%
Taylor expanded in t around inf 39.3%
associate-/l*46.7%
Simplified46.7%
if -3.1000000000000002e43 < z < 6.20000000000000022e51Initial program 85.1%
associate-/l*90.0%
Simplified90.0%
Taylor expanded in t around inf 69.7%
Taylor expanded in a around inf 61.4%
Taylor expanded in y around inf 51.9%
associate-/l*59.3%
Simplified59.3%
if 6.20000000000000022e51 < z Initial program 51.8%
+-commutative51.8%
*-commutative51.8%
associate-/l*77.0%
fma-define77.0%
Simplified77.0%
Taylor expanded in z around -inf 72.3%
Taylor expanded in y around 0 60.5%
Taylor expanded in t around inf 48.2%
Final simplification54.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.15e+17) (+ t (* a (/ t z))) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.15e+17) {
tmp = t + (a * (t / z));
} else {
tmp = 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) :: tmp
if (y <= (-1.15d+17)) then
tmp = t + (a * (t / z))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.15e+17) {
tmp = t + (a * (t / z));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.15e+17: tmp = t + (a * (t / z)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.15e+17) tmp = Float64(t + Float64(a * Float64(t / z))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.15e+17) tmp = t + (a * (t / z)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.15e+17], N[(t + N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+17}:\\
\;\;\;\;t + a \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -1.15e17Initial program 65.7%
+-commutative65.7%
*-commutative65.7%
associate-/l*82.1%
fma-define82.3%
Simplified82.3%
Taylor expanded in z around -inf 53.4%
Taylor expanded in y around 0 27.5%
Taylor expanded in t around inf 23.9%
associate-/l*27.1%
Simplified27.1%
if -1.15e17 < y Initial program 69.4%
associate-/l*79.7%
Simplified79.7%
Taylor expanded in t around inf 66.2%
Taylor expanded in z around inf 43.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.06e+73) (* t (+ (/ a z) 1.0)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.06e+73) {
tmp = t * ((a / z) + 1.0);
} else {
tmp = 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) :: tmp
if (z <= (-1.06d+73)) then
tmp = t * ((a / z) + 1.0d0)
else
tmp = x + 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.06e+73) {
tmp = t * ((a / z) + 1.0);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.06e+73: tmp = t * ((a / z) + 1.0) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.06e+73) tmp = Float64(t * Float64(Float64(a / z) + 1.0)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.06e+73) tmp = t * ((a / z) + 1.0); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.06e+73], N[(t * N[(N[(a / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{+73}:\\
\;\;\;\;t \cdot \left(\frac{a}{z} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -1.0600000000000001e73Initial program 43.0%
+-commutative43.0%
*-commutative43.0%
associate-/l*72.7%
fma-define72.8%
Simplified72.8%
Taylor expanded in z around -inf 62.4%
Taylor expanded in y around 0 46.0%
Taylor expanded in t around inf 48.7%
if -1.0600000000000001e73 < z Initial program 76.4%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in t around inf 64.9%
Taylor expanded in z around inf 36.5%
Final simplification39.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.5e+53) t (if (<= z 1.12e+54) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.5e+53) {
tmp = t;
} else if (z <= 1.12e+54) {
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 <= (-7.5d+53)) then
tmp = t
else if (z <= 1.12d+54) 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 <= -7.5e+53) {
tmp = t;
} else if (z <= 1.12e+54) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.5e+53: tmp = t elif z <= 1.12e+54: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.5e+53) tmp = t; elseif (z <= 1.12e+54) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.5e+53) tmp = t; elseif (z <= 1.12e+54) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.5e+53], t, If[LessEqual[z, 1.12e+54], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+53}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{+54}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -7.4999999999999997e53 or 1.12e54 < z Initial program 47.4%
+-commutative47.4%
*-commutative47.4%
associate-/l*75.3%
fma-define75.3%
Simplified75.3%
Taylor expanded in z around -inf 66.7%
Taylor expanded in y around 0 51.7%
Taylor expanded in a around 0 47.1%
if -7.4999999999999997e53 < z < 1.12e54Initial program 84.0%
+-commutative84.0%
*-commutative84.0%
associate-/l*94.5%
fma-define94.5%
Simplified94.5%
Taylor expanded in a around inf 33.6%
(FPCore (x y z t a) :precision binary64 (+ x t))
double code(double x, double y, double z, double t, double a) {
return x + t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + t
end function
public static double code(double x, double y, double z, double t, double a) {
return x + t;
}
def code(x, y, z, t, a): return x + t
function code(x, y, z, t, a) return Float64(x + t) end
function tmp = code(x, y, z, t, a) tmp = x + t; end
code[x_, y_, z_, t_, a_] := N[(x + t), $MachinePrecision]
\begin{array}{l}
\\
x + t
\end{array}
Initial program 68.6%
associate-/l*80.2%
Simplified80.2%
Taylor expanded in t around inf 62.7%
Taylor expanded in z around inf 37.4%
(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 68.6%
+-commutative68.6%
*-commutative68.6%
associate-/l*86.4%
fma-define86.4%
Simplified86.4%
Taylor expanded in z around -inf 45.6%
Taylor expanded in y around 0 31.4%
Taylor expanded in a around 0 25.5%
(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 68.6%
associate-/l*80.2%
Simplified80.2%
Taylor expanded in t around 0 40.2%
associate-*r/40.2%
mul-1-neg40.2%
distribute-lft-neg-out40.2%
*-commutative40.2%
Simplified40.2%
Taylor expanded in z around inf 2.9%
distribute-rgt1-in2.9%
metadata-eval2.9%
Simplified2.9%
Taylor expanded in x around 0 2.9%
(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 2024157
(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))))