
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-263) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(- t (/ (* (- 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 <= -5e-263) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -5e-263) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-263], 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[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-263} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.00000000000000006e-263 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.4%
+-commutative91.4%
remove-double-neg91.4%
unsub-neg91.4%
*-commutative91.4%
associate-*l/75.9%
associate-/l*95.9%
fma-neg96.0%
remove-double-neg96.0%
Simplified96.0%
if -5.00000000000000006e-263 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.0%
+-commutative3.0%
remove-double-neg3.0%
unsub-neg3.0%
*-commutative3.0%
associate-*l/2.9%
associate-/l*3.0%
fma-neg3.0%
remove-double-neg3.0%
Simplified3.0%
Taylor expanded in z around inf 87.3%
associate--l+87.3%
associate-*r/87.3%
associate-*r/87.3%
mul-1-neg87.3%
div-sub87.3%
mul-1-neg87.3%
distribute-lft-out--87.3%
associate-*r/87.3%
mul-1-neg87.3%
unsub-neg87.3%
distribute-rgt-out--87.3%
Simplified87.3%
Final simplification95.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-263) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(- t (/ (* (- 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 <= -5e-263) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t - (((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 <= (-5d-263)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t - (((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 <= -5e-263) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t - (((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 <= -5e-263) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -5e-263) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) * 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 <= -5e-263) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-263], 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[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-263} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.00000000000000006e-263 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.4%
Taylor expanded in y around 0 75.0%
+-commutative75.0%
div-sub76.8%
mul-1-neg76.8%
associate-/l*87.0%
distribute-lft-neg-out87.0%
distribute-rgt-out91.4%
sub-neg91.4%
associate-/r/95.9%
Simplified95.9%
if -5.00000000000000006e-263 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.0%
+-commutative3.0%
remove-double-neg3.0%
unsub-neg3.0%
*-commutative3.0%
associate-*l/2.9%
associate-/l*3.0%
fma-neg3.0%
remove-double-neg3.0%
Simplified3.0%
Taylor expanded in z around inf 87.3%
associate--l+87.3%
associate-*r/87.3%
associate-*r/87.3%
mul-1-neg87.3%
div-sub87.3%
mul-1-neg87.3%
distribute-lft-out--87.3%
associate-*r/87.3%
mul-1-neg87.3%
unsub-neg87.3%
distribute-rgt-out--87.3%
Simplified87.3%
Final simplification95.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-263) (not (<= t_1 2e-308)))
t_1
(- t (/ (* (- 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 <= -5e-263) || !(t_1 <= 2e-308)) {
tmp = t_1;
} else {
tmp = t - (((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 <= (-5d-263)) .or. (.not. (t_1 <= 2d-308))) then
tmp = t_1
else
tmp = t - (((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 <= -5e-263) || !(t_1 <= 2e-308)) {
tmp = t_1;
} else {
tmp = t - (((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 <= -5e-263) or not (t_1 <= 2e-308): tmp = t_1 else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -5e-263) || !(t_1 <= 2e-308)) tmp = t_1; else tmp = Float64(t - Float64(Float64(Float64(t - x) * 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 <= -5e-263) || ~((t_1 <= 2e-308))) tmp = t_1; else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-263], N[Not[LessEqual[t$95$1, 2e-308]], $MachinePrecision]], t$95$1, N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-263} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-308}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.00000000000000006e-263 or 1.9999999999999998e-308 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.7%
if -5.00000000000000006e-263 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999998e-308Initial program 3.1%
+-commutative3.1%
remove-double-neg3.1%
unsub-neg3.1%
*-commutative3.1%
associate-*l/6.9%
associate-/l*7.1%
fma-neg7.1%
remove-double-neg7.1%
Simplified7.1%
Taylor expanded in z around inf 87.8%
associate--l+87.8%
associate-*r/87.8%
associate-*r/87.8%
mul-1-neg87.8%
div-sub87.8%
mul-1-neg87.8%
distribute-lft-out--87.8%
associate-*r/87.8%
mul-1-neg87.8%
unsub-neg87.8%
distribute-rgt-out--87.8%
Simplified87.8%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.4e+156)
(- t (* y (/ (- t x) z)))
(if (<= z -7.4e-67)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 1.6e+24)
(+ x (/ y (/ (- a z) (- t x))))
(* t (+ (/ y (- a z)) (/ z (- z a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.4e+156) {
tmp = t - (y * ((t - x) / z));
} else if (z <= -7.4e-67) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 1.6e+24) {
tmp = x + (y / ((a - z) / (t - x)));
} else {
tmp = t * ((y / (a - z)) + (z / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.4d+156)) then
tmp = t - (y * ((t - x) / z))
else if (z <= (-7.4d-67)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 1.6d+24) then
tmp = x + (y / ((a - z) / (t - x)))
else
tmp = t * ((y / (a - z)) + (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.4e+156) {
tmp = t - (y * ((t - x) / z));
} else if (z <= -7.4e-67) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 1.6e+24) {
tmp = x + (y / ((a - z) / (t - x)));
} else {
tmp = t * ((y / (a - z)) + (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.4e+156: tmp = t - (y * ((t - x) / z)) elif z <= -7.4e-67: tmp = x + ((y - z) * (t / (a - z))) elif z <= 1.6e+24: tmp = x + (y / ((a - z) / (t - x))) else: tmp = t * ((y / (a - z)) + (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.4e+156) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); elseif (z <= -7.4e-67) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 1.6e+24) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x)))); else tmp = Float64(t * Float64(Float64(y / Float64(a - z)) + Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.4e+156) tmp = t - (y * ((t - x) / z)); elseif (z <= -7.4e-67) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 1.6e+24) tmp = x + (y / ((a - z) / (t - x))); else tmp = t * ((y / (a - z)) + (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.4e+156], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.4e-67], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+24], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+156}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -7.4 \cdot 10^{-67}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{y}{a - z} + \frac{z}{z - a}\right)\\
\end{array}
\end{array}
if z < -6.40000000000000005e156Initial program 51.8%
+-commutative51.8%
fma-define52.4%
Simplified52.4%
Taylor expanded in a around 0 39.5%
mul-1-neg39.5%
distribute-neg-frac239.5%
Simplified39.5%
Taylor expanded in y around 0 71.0%
div-sub71.0%
associate-/l*57.0%
mul-1-neg57.0%
unsub-neg57.0%
associate-/l*71.0%
Simplified71.0%
if -6.40000000000000005e156 < z < -7.3999999999999999e-67Initial program 91.3%
Taylor expanded in t around inf 80.3%
if -7.3999999999999999e-67 < z < 1.5999999999999999e24Initial program 91.5%
clear-num91.5%
un-div-inv92.3%
Applied egg-rr92.3%
Taylor expanded in y around inf 86.8%
if 1.5999999999999999e24 < z Initial program 76.2%
+-commutative76.2%
remove-double-neg76.2%
unsub-neg76.2%
*-commutative76.2%
associate-*l/41.7%
associate-/l*78.6%
fma-neg78.6%
remove-double-neg78.6%
Simplified78.6%
Taylor expanded in t around inf 70.2%
Final simplification80.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.8e+156)
(- t (* y (/ (- t x) z)))
(if (or (<= z -3e-66) (not (<= z 1.2e+20)))
(- x (* t (/ (- z y) (- a z))))
(+ x (* y (/ (- t x) (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.8e+156) {
tmp = t - (y * ((t - x) / z));
} else if ((z <= -3e-66) || !(z <= 1.2e+20)) {
tmp = x - (t * ((z - y) / (a - z)));
} else {
tmp = x + (y * ((t - x) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.8d+156)) then
tmp = t - (y * ((t - x) / z))
else if ((z <= (-3d-66)) .or. (.not. (z <= 1.2d+20))) then
tmp = x - (t * ((z - y) / (a - z)))
else
tmp = x + (y * ((t - x) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.8e+156) {
tmp = t - (y * ((t - x) / z));
} else if ((z <= -3e-66) || !(z <= 1.2e+20)) {
tmp = x - (t * ((z - y) / (a - z)));
} else {
tmp = x + (y * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.8e+156: tmp = t - (y * ((t - x) / z)) elif (z <= -3e-66) or not (z <= 1.2e+20): tmp = x - (t * ((z - y) / (a - z))) else: tmp = x + (y * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.8e+156) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); elseif ((z <= -3e-66) || !(z <= 1.2e+20)) tmp = Float64(x - Float64(t * Float64(Float64(z - y) / Float64(a - z)))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.8e+156) tmp = t - (y * ((t - x) / z)); elseif ((z <= -3e-66) || ~((z <= 1.2e+20))) tmp = x - (t * ((z - y) / (a - z))); else tmp = x + (y * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.8e+156], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3e-66], N[Not[LessEqual[z, 1.2e+20]], $MachinePrecision]], N[(x - N[(t * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+156}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-66} \lor \neg \left(z \leq 1.2 \cdot 10^{+20}\right):\\
\;\;\;\;x - t \cdot \frac{z - y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -5.80000000000000021e156Initial program 51.8%
+-commutative51.8%
fma-define52.4%
Simplified52.4%
Taylor expanded in a around 0 39.5%
mul-1-neg39.5%
distribute-neg-frac239.5%
Simplified39.5%
Taylor expanded in y around 0 71.0%
div-sub71.0%
associate-/l*57.0%
mul-1-neg57.0%
unsub-neg57.0%
associate-/l*71.0%
Simplified71.0%
if -5.80000000000000021e156 < z < -3.0000000000000002e-66 or 1.2e20 < z Initial program 82.8%
Taylor expanded in t around inf 55.2%
associate-/l*73.8%
Simplified73.8%
if -3.0000000000000002e-66 < z < 1.2e20Initial program 91.5%
Taylor expanded in y around inf 85.9%
Final simplification79.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.65e+156)
(- t (* y (/ (- t x) z)))
(if (<= z -5.6e-67)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 8.5e+19)
(+ x (/ y (/ (- a z) (- t x))))
(- x (* t (/ (- z y) (- a z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+156) {
tmp = t - (y * ((t - x) / z));
} else if (z <= -5.6e-67) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 8.5e+19) {
tmp = x + (y / ((a - z) / (t - x)));
} else {
tmp = x - (t * ((z - y) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.65d+156)) then
tmp = t - (y * ((t - x) / z))
else if (z <= (-5.6d-67)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 8.5d+19) then
tmp = x + (y / ((a - z) / (t - x)))
else
tmp = x - (t * ((z - y) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.65e+156) {
tmp = t - (y * ((t - x) / z));
} else if (z <= -5.6e-67) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 8.5e+19) {
tmp = x + (y / ((a - z) / (t - x)));
} else {
tmp = x - (t * ((z - y) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.65e+156: tmp = t - (y * ((t - x) / z)) elif z <= -5.6e-67: tmp = x + ((y - z) * (t / (a - z))) elif z <= 8.5e+19: tmp = x + (y / ((a - z) / (t - x))) else: tmp = x - (t * ((z - y) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.65e+156) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); elseif (z <= -5.6e-67) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 8.5e+19) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x)))); else tmp = Float64(x - Float64(t * Float64(Float64(z - y) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.65e+156) tmp = t - (y * ((t - x) / z)); elseif (z <= -5.6e-67) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 8.5e+19) tmp = x + (y / ((a - z) / (t - x))); else tmp = x - (t * ((z - y) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.65e+156], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.6e-67], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+19], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+156}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-67}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+19}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{z - y}{a - z}\\
\end{array}
\end{array}
if z < -1.6499999999999999e156Initial program 51.8%
+-commutative51.8%
fma-define52.4%
Simplified52.4%
Taylor expanded in a around 0 39.5%
mul-1-neg39.5%
distribute-neg-frac239.5%
Simplified39.5%
Taylor expanded in y around 0 71.0%
div-sub71.0%
associate-/l*57.0%
mul-1-neg57.0%
unsub-neg57.0%
associate-/l*71.0%
Simplified71.0%
if -1.6499999999999999e156 < z < -5.60000000000000021e-67Initial program 91.3%
Taylor expanded in t around inf 80.3%
if -5.60000000000000021e-67 < z < 8.5e19Initial program 91.5%
clear-num91.5%
un-div-inv92.2%
Applied egg-rr92.2%
Taylor expanded in y around inf 86.7%
if 8.5e19 < z Initial program 76.7%
Taylor expanded in t around inf 37.2%
associate-/l*69.1%
Simplified69.1%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.45e+162)
(- t (* y (/ (- t x) z)))
(if (<= z -1.3e-66)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 8.5e+19)
(+ x (* y (/ (- t x) (- a z))))
(- x (* t (/ (- z y) (- a z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+162) {
tmp = t - (y * ((t - x) / z));
} else if (z <= -1.3e-66) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 8.5e+19) {
tmp = x + (y * ((t - x) / (a - z)));
} else {
tmp = x - (t * ((z - y) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.45d+162)) then
tmp = t - (y * ((t - x) / z))
else if (z <= (-1.3d-66)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 8.5d+19) then
tmp = x + (y * ((t - x) / (a - z)))
else
tmp = x - (t * ((z - y) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+162) {
tmp = t - (y * ((t - x) / z));
} else if (z <= -1.3e-66) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 8.5e+19) {
tmp = x + (y * ((t - x) / (a - z)));
} else {
tmp = x - (t * ((z - y) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+162: tmp = t - (y * ((t - x) / z)) elif z <= -1.3e-66: tmp = x + ((y - z) * (t / (a - z))) elif z <= 8.5e+19: tmp = x + (y * ((t - x) / (a - z))) else: tmp = x - (t * ((z - y) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+162) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); elseif (z <= -1.3e-66) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 8.5e+19) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z)))); else tmp = Float64(x - Float64(t * Float64(Float64(z - y) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.45e+162) tmp = t - (y * ((t - x) / z)); elseif (z <= -1.3e-66) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 8.5e+19) tmp = x + (y * ((t - x) / (a - z))); else tmp = x - (t * ((z - y) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+162], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3e-66], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+19], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+162}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-66}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+19}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{z - y}{a - z}\\
\end{array}
\end{array}
if z < -1.45000000000000003e162Initial program 51.8%
+-commutative51.8%
fma-define52.4%
Simplified52.4%
Taylor expanded in a around 0 39.5%
mul-1-neg39.5%
distribute-neg-frac239.5%
Simplified39.5%
Taylor expanded in y around 0 71.0%
div-sub71.0%
associate-/l*57.0%
mul-1-neg57.0%
unsub-neg57.0%
associate-/l*71.0%
Simplified71.0%
if -1.45000000000000003e162 < z < -1.2999999999999999e-66Initial program 91.3%
Taylor expanded in t around inf 80.3%
if -1.2999999999999999e-66 < z < 8.5e19Initial program 91.5%
Taylor expanded in y around inf 85.9%
if 8.5e19 < z Initial program 76.7%
Taylor expanded in t around inf 37.2%
associate-/l*69.1%
Simplified69.1%
Final simplification79.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.55e-230) (not (<= a 9.5e-132))) (- x (* t (/ (- z y) (- a z)))) (- t (* y (/ (- t x) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.55e-230) || !(a <= 9.5e-132)) {
tmp = x - (t * ((z - y) / (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 <= (-1.55d-230)) .or. (.not. (a <= 9.5d-132))) then
tmp = x - (t * ((z - y) / (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 <= -1.55e-230) || !(a <= 9.5e-132)) {
tmp = x - (t * ((z - y) / (a - z)));
} else {
tmp = t - (y * ((t - x) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.55e-230) or not (a <= 9.5e-132): tmp = x - (t * ((z - y) / (a - z))) else: tmp = t - (y * ((t - x) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.55e-230) || !(a <= 9.5e-132)) tmp = Float64(x - Float64(t * Float64(Float64(z - y) / Float64(a - z)))); else tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.55e-230) || ~((a <= 9.5e-132))) tmp = x - (t * ((z - y) / (a - z))); else tmp = t - (y * ((t - x) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.55e-230], N[Not[LessEqual[a, 9.5e-132]], $MachinePrecision]], N[(x - N[(t * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.55 \cdot 10^{-230} \lor \neg \left(a \leq 9.5 \cdot 10^{-132}\right):\\
\;\;\;\;x - t \cdot \frac{z - y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\end{array}
\end{array}
if a < -1.55e-230 or 9.49999999999999987e-132 < a Initial program 85.2%
Taylor expanded in t around inf 61.6%
associate-/l*76.2%
Simplified76.2%
if -1.55e-230 < a < 9.49999999999999987e-132Initial program 76.4%
+-commutative76.4%
fma-define76.2%
Simplified76.2%
Taylor expanded in a around 0 70.3%
mul-1-neg70.3%
distribute-neg-frac270.3%
Simplified70.3%
Taylor expanded in y around 0 77.2%
div-sub85.5%
associate-/l*86.3%
mul-1-neg86.3%
unsub-neg86.3%
associate-/l*85.5%
Simplified85.5%
Final simplification78.0%
(FPCore (x y z t a) :precision binary64 (if (<= y -6.2e+112) (* x (/ (- y) a)) (if (or (<= y -2.6e-48) (not (<= y 1.22e+117))) (* t (/ y a)) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -6.2e+112) {
tmp = x * (-y / a);
} else if ((y <= -2.6e-48) || !(y <= 1.22e+117)) {
tmp = t * (y / a);
} 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 <= (-6.2d+112)) then
tmp = x * (-y / a)
else if ((y <= (-2.6d-48)) .or. (.not. (y <= 1.22d+117))) then
tmp = t * (y / a)
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 <= -6.2e+112) {
tmp = x * (-y / a);
} else if ((y <= -2.6e-48) || !(y <= 1.22e+117)) {
tmp = t * (y / a);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -6.2e+112: tmp = x * (-y / a) elif (y <= -2.6e-48) or not (y <= 1.22e+117): tmp = t * (y / a) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -6.2e+112) tmp = Float64(x * Float64(Float64(-y) / a)); elseif ((y <= -2.6e-48) || !(y <= 1.22e+117)) tmp = Float64(t * Float64(y / a)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -6.2e+112) tmp = x * (-y / a); elseif ((y <= -2.6e-48) || ~((y <= 1.22e+117))) tmp = t * (y / a); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.2e+112], N[(x * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.6e-48], N[Not[LessEqual[y, 1.22e+117]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+112}:\\
\;\;\;\;x \cdot \frac{-y}{a}\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-48} \lor \neg \left(y \leq 1.22 \cdot 10^{+117}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -6.19999999999999965e112Initial program 91.0%
Taylor expanded in z around 0 50.9%
associate-/l*65.6%
Simplified65.6%
Taylor expanded in x around inf 50.8%
mul-1-neg50.8%
unsub-neg50.8%
Simplified50.8%
Taylor expanded in y around inf 50.1%
neg-mul-150.1%
distribute-neg-frac50.1%
Simplified50.1%
if -6.19999999999999965e112 < y < -2.59999999999999987e-48 or 1.22000000000000004e117 < y Initial program 86.9%
+-commutative86.9%
remove-double-neg86.9%
unsub-neg86.9%
*-commutative86.9%
associate-*l/66.5%
associate-/l*90.7%
fma-neg90.7%
remove-double-neg90.7%
Simplified90.7%
Taylor expanded in t around inf 71.1%
Taylor expanded in z around 0 53.2%
if -2.59999999999999987e-48 < y < 1.22000000000000004e117Initial program 79.5%
Taylor expanded in t around inf 64.1%
associate-/l*73.4%
Simplified73.4%
Taylor expanded in z around inf 46.7%
Final simplification49.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e-20) (not (<= z 20000000.0))) (- 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 ((z <= -4.5e-20) || !(z <= 20000000.0)) {
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 ((z <= (-4.5d-20)) .or. (.not. (z <= 20000000.0d0))) 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 ((z <= -4.5e-20) || !(z <= 20000000.0)) {
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 (z <= -4.5e-20) or not (z <= 20000000.0): 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 ((z <= -4.5e-20) || !(z <= 20000000.0)) tmp = Float64(t - Float64(y * Float64(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 ((z <= -4.5e-20) || ~((z <= 20000000.0))) 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[Or[LessEqual[z, -4.5e-20], N[Not[LessEqual[z, 20000000.0]], $MachinePrecision]], N[(t - N[(y * N[(N[(t - x), $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 -4.5 \cdot 10^{-20} \lor \neg \left(z \leq 20000000\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -4.5000000000000001e-20 or 2e7 < z Initial program 72.8%
+-commutative72.8%
fma-define73.0%
Simplified73.0%
Taylor expanded in a around 0 53.2%
mul-1-neg53.2%
distribute-neg-frac253.2%
Simplified53.2%
Taylor expanded in y around 0 68.4%
div-sub68.4%
associate-/l*62.8%
mul-1-neg62.8%
unsub-neg62.8%
associate-/l*68.4%
Simplified68.4%
if -4.5000000000000001e-20 < z < 2e7Initial program 91.8%
Taylor expanded in y around 0 89.0%
+-commutative89.0%
div-sub91.9%
mul-1-neg91.9%
associate-/l*84.7%
distribute-lft-neg-out84.7%
distribute-rgt-out91.8%
sub-neg91.8%
associate-/r/96.5%
Simplified96.5%
Taylor expanded in z around 0 80.3%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.6e-13) (not (<= z 2.55e+26))) (* t (- 1.0 (/ y z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e-13) || !(z <= 2.55e+26)) {
tmp = t * (1.0 - (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 ((z <= (-2.6d-13)) .or. (.not. (z <= 2.55d+26))) then
tmp = t * (1.0d0 - (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 ((z <= -2.6e-13) || !(z <= 2.55e+26)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.6e-13) or not (z <= 2.55e+26): tmp = t * (1.0 - (y / z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.6e-13) || !(z <= 2.55e+26)) tmp = Float64(t * Float64(1.0 - Float64(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 ((z <= -2.6e-13) || ~((z <= 2.55e+26))) tmp = t * (1.0 - (y / z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6e-13], N[Not[LessEqual[z, 2.55e+26]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / 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.6 \cdot 10^{-13} \lor \neg \left(z \leq 2.55 \cdot 10^{+26}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -2.6e-13 or 2.5499999999999999e26 < z Initial program 72.5%
+-commutative72.5%
remove-double-neg72.5%
unsub-neg72.5%
*-commutative72.5%
associate-*l/45.0%
associate-/l*76.2%
fma-neg76.2%
remove-double-neg76.2%
Simplified76.2%
Taylor expanded in t around inf 66.9%
Taylor expanded in a around 0 58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
if -2.6e-13 < z < 2.5499999999999999e26Initial program 91.4%
Taylor expanded in y around 0 88.7%
+-commutative88.7%
div-sub91.5%
mul-1-neg91.5%
associate-/l*84.5%
distribute-lft-neg-out84.5%
distribute-rgt-out91.4%
sub-neg91.4%
associate-/r/95.9%
Simplified95.9%
Taylor expanded in z around 0 79.1%
Final simplification70.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.45e-13) (not (<= z 1.7e+29))) (* t (- 1.0 (/ y z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.45e-13) || !(z <= 1.7e+29)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.45d-13)) .or. (.not. (z <= 1.7d+29))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.45e-13) || !(z <= 1.7e+29)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.45e-13) or not (z <= 1.7e+29): tmp = t * (1.0 - (y / z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.45e-13) || !(z <= 1.7e+29)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.45e-13) || ~((z <= 1.7e+29))) tmp = t * (1.0 - (y / z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.45e-13], N[Not[LessEqual[z, 1.7e+29]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{-13} \lor \neg \left(z \leq 1.7 \cdot 10^{+29}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -2.45000000000000016e-13 or 1.69999999999999991e29 < z Initial program 72.5%
+-commutative72.5%
remove-double-neg72.5%
unsub-neg72.5%
*-commutative72.5%
associate-*l/45.0%
associate-/l*76.2%
fma-neg76.2%
remove-double-neg76.2%
Simplified76.2%
Taylor expanded in t around inf 66.9%
Taylor expanded in a around 0 58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
if -2.45000000000000016e-13 < z < 1.69999999999999991e29Initial program 91.4%
Taylor expanded in z around 0 70.2%
associate-/l*76.0%
Simplified76.0%
clear-num75.9%
un-div-inv76.7%
Applied egg-rr76.7%
Final simplification69.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.45e-13) (not (<= z 2.9e+23))) (* t (- 1.0 (/ y z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.45e-13) || !(z <= 2.9e+23)) {
tmp = t * (1.0 - (y / 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.45d-13)) .or. (.not. (z <= 2.9d+23))) then
tmp = t * (1.0d0 - (y / 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.45e-13) || !(z <= 2.9e+23)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.45e-13) or not (z <= 2.9e+23): tmp = t * (1.0 - (y / z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.45e-13) || !(z <= 2.9e+23)) tmp = Float64(t * Float64(1.0 - Float64(y / 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.45e-13) || ~((z <= 2.9e+23))) tmp = t * (1.0 - (y / z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.45e-13], N[Not[LessEqual[z, 2.9e+23]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / 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.45 \cdot 10^{-13} \lor \neg \left(z \leq 2.9 \cdot 10^{+23}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -2.45000000000000016e-13 or 2.90000000000000013e23 < z Initial program 72.5%
+-commutative72.5%
remove-double-neg72.5%
unsub-neg72.5%
*-commutative72.5%
associate-*l/45.0%
associate-/l*76.2%
fma-neg76.2%
remove-double-neg76.2%
Simplified76.2%
Taylor expanded in t around inf 66.9%
Taylor expanded in a around 0 58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
if -2.45000000000000016e-13 < z < 2.90000000000000013e23Initial program 91.4%
Taylor expanded in z around 0 70.2%
associate-/l*76.0%
Simplified76.0%
Final simplification68.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.2e-13) (not (<= z 4.1e+33))) (* t (- 1.0 (/ y z))) (+ x (* t (/ (- y z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.2e-13) || !(z <= 4.1e+33)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (t * ((y - z) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.2d-13)) .or. (.not. (z <= 4.1d+33))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + (t * ((y - z) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.2e-13) || !(z <= 4.1e+33)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (t * ((y - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.2e-13) or not (z <= 4.1e+33): tmp = t * (1.0 - (y / z)) else: tmp = x + (t * ((y - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.2e-13) || !(z <= 4.1e+33)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.2e-13) || ~((z <= 4.1e+33))) tmp = t * (1.0 - (y / z)); else tmp = x + (t * ((y - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.2e-13], N[Not[LessEqual[z, 4.1e+33]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-13} \lor \neg \left(z \leq 4.1 \cdot 10^{+33}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if z < -2.19999999999999997e-13 or 4.09999999999999995e33 < z Initial program 72.3%
+-commutative72.3%
remove-double-neg72.3%
unsub-neg72.3%
*-commutative72.3%
associate-*l/44.5%
associate-/l*76.0%
fma-neg76.0%
remove-double-neg76.0%
Simplified76.0%
Taylor expanded in t around inf 66.6%
Taylor expanded in a around 0 59.0%
mul-1-neg59.0%
unsub-neg59.0%
Simplified59.0%
if -2.19999999999999997e-13 < z < 4.09999999999999995e33Initial program 91.5%
Taylor expanded in t around inf 69.1%
associate-/l*75.5%
Simplified75.5%
Taylor expanded in a around inf 67.8%
associate-/l*72.9%
Simplified72.9%
Final simplification67.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e-15) (not (<= z 2.8e+21))) (* t (- 1.0 (/ y z))) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e-15) || !(z <= 2.8e+21)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (y * (t / 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 <= (-8d-15)) .or. (.not. (z <= 2.8d+21))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + (y * (t / 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 <= -8e-15) || !(z <= 2.8e+21)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e-15) or not (z <= 2.8e+21): tmp = t * (1.0 - (y / z)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e-15) || !(z <= 2.8e+21)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8e-15) || ~((z <= 2.8e+21))) tmp = t * (1.0 - (y / z)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e-15], N[Not[LessEqual[z, 2.8e+21]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-15} \lor \neg \left(z \leq 2.8 \cdot 10^{+21}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -8.0000000000000006e-15 or 2.8e21 < z Initial program 72.5%
+-commutative72.5%
remove-double-neg72.5%
unsub-neg72.5%
*-commutative72.5%
associate-*l/45.0%
associate-/l*76.2%
fma-neg76.2%
remove-double-neg76.2%
Simplified76.2%
Taylor expanded in t around inf 66.9%
Taylor expanded in a around 0 58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
if -8.0000000000000006e-15 < z < 2.8e21Initial program 91.4%
Taylor expanded in z around 0 70.2%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in t around inf 66.7%
Final simplification63.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.5e-87) (not (<= z 1e+30))) (* t (- 1.0 (/ y z))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.5e-87) || !(z <= 1e+30)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.5d-87)) .or. (.not. (z <= 1d+30))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x * (1.0d0 - (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.5e-87) || !(z <= 1e+30)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.5e-87) or not (z <= 1e+30): tmp = t * (1.0 - (y / z)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.5e-87) || !(z <= 1e+30)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(1.0 - Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.5e-87) || ~((z <= 1e+30))) tmp = t * (1.0 - (y / z)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.5e-87], N[Not[LessEqual[z, 1e+30]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-87} \lor \neg \left(z \leq 10^{+30}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if z < -2.50000000000000021e-87 or 1e30 < z Initial program 75.2%
+-commutative75.2%
remove-double-neg75.2%
unsub-neg75.2%
*-commutative75.2%
associate-*l/52.0%
associate-/l*79.2%
fma-neg79.3%
remove-double-neg79.3%
Simplified79.3%
Taylor expanded in t around inf 66.4%
Taylor expanded in a around 0 56.9%
mul-1-neg56.9%
unsub-neg56.9%
Simplified56.9%
if -2.50000000000000021e-87 < z < 1e30Initial program 91.2%
Taylor expanded in z around 0 70.9%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in x around inf 56.8%
mul-1-neg56.8%
unsub-neg56.8%
Simplified56.8%
Final simplification56.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.5e+66) x (if (<= a 2.65e+70) (* t (- 1.0 (/ y z))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.5e+66) {
tmp = x;
} else if (a <= 2.65e+70) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5.5d+66)) then
tmp = x
else if (a <= 2.65d+70) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.5e+66) {
tmp = x;
} else if (a <= 2.65e+70) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.5e+66: tmp = x elif a <= 2.65e+70: tmp = t * (1.0 - (y / z)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.5e+66) tmp = x; elseif (a <= 2.65e+70) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.5e+66) tmp = x; elseif (a <= 2.65e+70) tmp = t * (1.0 - (y / z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.5e+66], x, If[LessEqual[a, 2.65e+70], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{+66}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.65 \cdot 10^{+70}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.5e66 or 2.65e70 < a Initial program 91.8%
+-commutative91.8%
remove-double-neg91.8%
unsub-neg91.8%
*-commutative91.8%
associate-*l/66.6%
associate-/l*92.7%
fma-neg92.7%
remove-double-neg92.7%
Simplified92.7%
Taylor expanded in a around inf 52.3%
if -5.5e66 < a < 2.65e70Initial program 78.0%
+-commutative78.0%
remove-double-neg78.0%
unsub-neg78.0%
*-commutative78.0%
associate-*l/71.1%
associate-/l*84.3%
fma-neg84.3%
remove-double-neg84.3%
Simplified84.3%
Taylor expanded in t around inf 65.7%
Taylor expanded in a around 0 50.0%
mul-1-neg50.0%
unsub-neg50.0%
Simplified50.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.6e-48) (not (<= y 1.05e+117))) (* t (/ y a)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.6e-48) || !(y <= 1.05e+117)) {
tmp = t * (y / a);
} 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 <= (-2.6d-48)) .or. (.not. (y <= 1.05d+117))) then
tmp = t * (y / a)
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 <= -2.6e-48) || !(y <= 1.05e+117)) {
tmp = t * (y / a);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.6e-48) or not (y <= 1.05e+117): tmp = t * (y / a) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.6e-48) || !(y <= 1.05e+117)) tmp = Float64(t * Float64(y / a)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.6e-48) || ~((y <= 1.05e+117))) tmp = t * (y / a); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.6e-48], N[Not[LessEqual[y, 1.05e+117]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-48} \lor \neg \left(y \leq 1.05 \cdot 10^{+117}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -2.59999999999999987e-48 or 1.0500000000000001e117 < y Initial program 88.3%
+-commutative88.3%
remove-double-neg88.3%
unsub-neg88.3%
*-commutative88.3%
associate-*l/69.4%
associate-/l*91.8%
fma-neg91.9%
remove-double-neg91.9%
Simplified91.9%
Taylor expanded in t around inf 63.9%
Taylor expanded in z around 0 47.4%
if -2.59999999999999987e-48 < y < 1.0500000000000001e117Initial program 79.5%
Taylor expanded in t around inf 64.1%
associate-/l*73.4%
Simplified73.4%
Taylor expanded in z around inf 46.7%
Final simplification47.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.5e+62) x (if (<= a 2e+70) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e+62) {
tmp = x;
} else if (a <= 2e+70) {
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 <= (-6.5d+62)) then
tmp = x
else if (a <= 2d+70) 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 <= -6.5e+62) {
tmp = x;
} else if (a <= 2e+70) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.5e+62: tmp = x elif a <= 2e+70: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.5e+62) tmp = x; elseif (a <= 2e+70) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.5e+62) tmp = x; elseif (a <= 2e+70) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.5e+62], x, If[LessEqual[a, 2e+70], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{+62}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+70}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.5000000000000003e62 or 2.00000000000000015e70 < a Initial program 91.8%
+-commutative91.8%
remove-double-neg91.8%
unsub-neg91.8%
*-commutative91.8%
associate-*l/66.6%
associate-/l*92.7%
fma-neg92.7%
remove-double-neg92.7%
Simplified92.7%
Taylor expanded in a around inf 52.3%
if -6.5000000000000003e62 < a < 2.00000000000000015e70Initial program 78.0%
Taylor expanded in t around inf 49.4%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in z around inf 28.0%
Taylor expanded in x around 0 33.3%
(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 83.4%
Taylor expanded in t around inf 57.6%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in z around inf 32.3%
Taylor expanded in x around 0 22.6%
herbie shell --seed 2024136
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))