
(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 21 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 -4e-304) (not (<= t_1 0.0)))
(- x (/ (/ (- z y) (- a z)) (/ 1.0 (- t x))))
(+ t (* (- y a) (/ x 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 <= -4e-304) || !(t_1 <= 0.0)) {
tmp = x - (((z - y) / (a - z)) / (1.0 / (t - x)));
} else {
tmp = t + ((y - a) * (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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-4d-304)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x - (((z - y) / (a - z)) / (1.0d0 / (t - x)))
else
tmp = t + ((y - a) * (x / 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 <= -4e-304) || !(t_1 <= 0.0)) {
tmp = x - (((z - y) / (a - z)) / (1.0 / (t - x)));
} else {
tmp = t + ((y - a) * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -4e-304) or not (t_1 <= 0.0): tmp = x - (((z - y) / (a - z)) / (1.0 / (t - x))) else: tmp = t + ((y - a) * (x / 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 <= -4e-304) || !(t_1 <= 0.0)) tmp = Float64(x - Float64(Float64(Float64(z - y) / Float64(a - z)) / Float64(1.0 / Float64(t - x)))); else tmp = Float64(t + Float64(Float64(y - a) * Float64(x / 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 <= -4e-304) || ~((t_1 <= 0.0))) tmp = x - (((z - y) / (a - z)) / (1.0 / (t - x))); else tmp = t + ((y - a) * (x / 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, -4e-304], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x - N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-304} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x - \frac{\frac{z - y}{a - z}}{\frac{1}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -3.99999999999999988e-304 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 86.7%
clear-num86.6%
un-div-inv87.0%
Applied egg-rr87.0%
add-sqr-sqrt47.4%
div-inv47.3%
times-frac42.4%
Applied egg-rr42.4%
associate-*r/50.1%
*-commutative50.1%
associate-*r/50.1%
rem-square-sqrt93.2%
Simplified93.2%
if -3.99999999999999988e-304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.9%
+-commutative3.9%
fma-define3.4%
Simplified3.4%
Taylor expanded in z around inf 90.4%
associate--l+90.4%
distribute-lft-out--90.4%
div-sub90.4%
mul-1-neg90.4%
unsub-neg90.4%
div-sub90.4%
associate-/l*90.4%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Taylor expanded in t around 0 99.8%
neg-mul-199.8%
Simplified99.8%
Final simplification93.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* t (/ (- z y) (- a z))))) (t_2 (+ t (* (- y a) (/ x z)))))
(if (<= z -3.8e+105)
t_2
(if (<= z -4.7e-188)
t_1
(if (<= z 7e-134)
(+ x (* y (/ (- t x) a)))
(if (<= z 3.7e+157) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t * ((z - y) / (a - z)));
double t_2 = t + ((y - a) * (x / z));
double tmp;
if (z <= -3.8e+105) {
tmp = t_2;
} else if (z <= -4.7e-188) {
tmp = t_1;
} else if (z <= 7e-134) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 3.7e+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 * ((z - y) / (a - z)))
t_2 = t + ((y - a) * (x / z))
if (z <= (-3.8d+105)) then
tmp = t_2
else if (z <= (-4.7d-188)) then
tmp = t_1
else if (z <= 7d-134) then
tmp = x + (y * ((t - x) / a))
else if (z <= 3.7d+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 * ((z - y) / (a - z)));
double t_2 = t + ((y - a) * (x / z));
double tmp;
if (z <= -3.8e+105) {
tmp = t_2;
} else if (z <= -4.7e-188) {
tmp = t_1;
} else if (z <= 7e-134) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 3.7e+157) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t * ((z - y) / (a - z))) t_2 = t + ((y - a) * (x / z)) tmp = 0 if z <= -3.8e+105: tmp = t_2 elif z <= -4.7e-188: tmp = t_1 elif z <= 7e-134: tmp = x + (y * ((t - x) / a)) elif z <= 3.7e+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(z - y) / Float64(a - z)))) t_2 = Float64(t + Float64(Float64(y - a) * Float64(x / z))) tmp = 0.0 if (z <= -3.8e+105) tmp = t_2; elseif (z <= -4.7e-188) tmp = t_1; elseif (z <= 7e-134) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (z <= 3.7e+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 * ((z - y) / (a - z))); t_2 = t + ((y - a) * (x / z)); tmp = 0.0; if (z <= -3.8e+105) tmp = t_2; elseif (z <= -4.7e-188) tmp = t_1; elseif (z <= 7e-134) tmp = x + (y * ((t - x) / a)); elseif (z <= 3.7e+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[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.8e+105], t$95$2, If[LessEqual[z, -4.7e-188], t$95$1, If[LessEqual[z, 7e-134], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+157], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - t \cdot \frac{z - y}{a - z}\\
t_2 := t + \left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+105}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-134}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+157}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.8e105 or 3.6999999999999999e157 < z Initial program 58.4%
+-commutative58.4%
fma-define58.3%
Simplified58.3%
Taylor expanded in z around inf 70.0%
associate--l+70.0%
distribute-lft-out--70.0%
div-sub70.0%
mul-1-neg70.0%
unsub-neg70.0%
div-sub70.0%
associate-/l*78.6%
associate-/l*88.4%
distribute-rgt-out--88.4%
Simplified88.4%
Taylor expanded in t around 0 85.8%
neg-mul-185.8%
Simplified85.8%
if -3.8e105 < z < -4.69999999999999998e-188 or 6.9999999999999997e-134 < z < 3.6999999999999999e157Initial program 87.1%
Taylor expanded in t around inf 59.8%
associate-/l*72.5%
Simplified72.5%
if -4.69999999999999998e-188 < z < 6.9999999999999997e-134Initial program 92.9%
Taylor expanded in z around 0 82.2%
associate-/l*89.8%
Simplified89.8%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (- y a) (/ (- x t) z)))))
(if (<= z -4.5e+43)
t_1
(if (<= z -8.6e-188)
(- x (* t (/ (- z y) (- a z))))
(if (<= z 1.6e+91) (+ x (/ (- y z) (/ a (- t x)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((y - a) * ((x - t) / z));
double tmp;
if (z <= -4.5e+43) {
tmp = t_1;
} else if (z <= -8.6e-188) {
tmp = x - (t * ((z - y) / (a - z)));
} else if (z <= 1.6e+91) {
tmp = x + ((y - z) / (a / (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 - a) * ((x - t) / z))
if (z <= (-4.5d+43)) then
tmp = t_1
else if (z <= (-8.6d-188)) then
tmp = x - (t * ((z - y) / (a - z)))
else if (z <= 1.6d+91) then
tmp = x + ((y - z) / (a / (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 - a) * ((x - t) / z));
double tmp;
if (z <= -4.5e+43) {
tmp = t_1;
} else if (z <= -8.6e-188) {
tmp = x - (t * ((z - y) / (a - z)));
} else if (z <= 1.6e+91) {
tmp = x + ((y - z) / (a / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((y - a) * ((x - t) / z)) tmp = 0 if z <= -4.5e+43: tmp = t_1 elif z <= -8.6e-188: tmp = x - (t * ((z - y) / (a - z))) elif z <= 1.6e+91: tmp = x + ((y - z) / (a / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / z))) tmp = 0.0 if (z <= -4.5e+43) tmp = t_1; elseif (z <= -8.6e-188) tmp = Float64(x - Float64(t * Float64(Float64(z - y) / Float64(a - z)))); elseif (z <= 1.6e+91) tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((y - a) * ((x - t) / z)); tmp = 0.0; if (z <= -4.5e+43) tmp = t_1; elseif (z <= -8.6e-188) tmp = x - (t * ((z - y) / (a - z))); elseif (z <= 1.6e+91) tmp = x + ((y - z) / (a / (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 - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+43], t$95$1, If[LessEqual[z, -8.6e-188], N[(x - N[(t * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+91], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y - a\right) \cdot \frac{x - t}{z}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8.6 \cdot 10^{-188}:\\
\;\;\;\;x - t \cdot \frac{z - y}{a - z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+91}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5e43 or 1.59999999999999995e91 < z Initial program 65.3%
+-commutative65.3%
fma-define65.2%
Simplified65.2%
Taylor expanded in z around inf 68.2%
associate--l+68.2%
distribute-lft-out--68.2%
div-sub68.2%
mul-1-neg68.2%
unsub-neg68.2%
div-sub68.2%
associate-/l*77.3%
associate-/l*84.6%
distribute-rgt-out--84.6%
Simplified84.6%
if -4.5e43 < z < -8.59999999999999975e-188Initial program 83.8%
Taylor expanded in t around inf 63.3%
associate-/l*70.4%
Simplified70.4%
if -8.59999999999999975e-188 < z < 1.59999999999999995e91Initial program 92.7%
clear-num92.7%
un-div-inv92.8%
Applied egg-rr92.8%
Taylor expanded in a around inf 84.0%
Final simplification81.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (- y a) (/ x z)))))
(if (<= z -2.7e+112)
t_1
(if (<= z -7.2e-188)
(- x (* t (/ (- z y) (- a z))))
(if (<= z 1.6e+91) (+ x (/ (- y z) (/ a (- t x)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((y - a) * (x / z));
double tmp;
if (z <= -2.7e+112) {
tmp = t_1;
} else if (z <= -7.2e-188) {
tmp = x - (t * ((z - y) / (a - z)));
} else if (z <= 1.6e+91) {
tmp = x + ((y - z) / (a / (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 - a) * (x / z))
if (z <= (-2.7d+112)) then
tmp = t_1
else if (z <= (-7.2d-188)) then
tmp = x - (t * ((z - y) / (a - z)))
else if (z <= 1.6d+91) then
tmp = x + ((y - z) / (a / (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 - a) * (x / z));
double tmp;
if (z <= -2.7e+112) {
tmp = t_1;
} else if (z <= -7.2e-188) {
tmp = x - (t * ((z - y) / (a - z)));
} else if (z <= 1.6e+91) {
tmp = x + ((y - z) / (a / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((y - a) * (x / z)) tmp = 0 if z <= -2.7e+112: tmp = t_1 elif z <= -7.2e-188: tmp = x - (t * ((z - y) / (a - z))) elif z <= 1.6e+91: tmp = x + ((y - z) / (a / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(y - a) * Float64(x / z))) tmp = 0.0 if (z <= -2.7e+112) tmp = t_1; elseif (z <= -7.2e-188) tmp = Float64(x - Float64(t * Float64(Float64(z - y) / Float64(a - z)))); elseif (z <= 1.6e+91) tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((y - a) * (x / z)); tmp = 0.0; if (z <= -2.7e+112) tmp = t_1; elseif (z <= -7.2e-188) tmp = x - (t * ((z - y) / (a - z))); elseif (z <= 1.6e+91) tmp = x + ((y - z) / (a / (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 - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+112], t$95$1, If[LessEqual[z, -7.2e-188], N[(x - N[(t * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+91], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(y - a\right) \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-188}:\\
\;\;\;\;x - t \cdot \frac{z - y}{a - z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+91}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.7000000000000001e112 or 1.59999999999999995e91 < z Initial program 62.6%
+-commutative62.6%
fma-define62.6%
Simplified62.6%
Taylor expanded in z around inf 70.5%
associate--l+70.5%
distribute-lft-out--70.5%
div-sub70.5%
mul-1-neg70.5%
unsub-neg70.5%
div-sub70.5%
associate-/l*80.3%
associate-/l*88.8%
distribute-rgt-out--88.8%
Simplified88.8%
Taylor expanded in t around 0 84.3%
neg-mul-184.3%
Simplified84.3%
if -2.7000000000000001e112 < z < -7.1999999999999994e-188Initial program 83.0%
Taylor expanded in t around inf 58.7%
associate-/l*67.0%
Simplified67.0%
if -7.1999999999999994e-188 < z < 1.59999999999999995e91Initial program 92.7%
clear-num92.7%
un-div-inv92.8%
Applied egg-rr92.8%
Taylor expanded in a around inf 84.0%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* y (/ (- t x) z)))))
(if (<= z -5.4e+38)
t_1
(if (<= z 2.05e+46)
(+ x (/ y (/ a (- t x))))
(if (<= z 4.4e+91) (- x (/ (* z t) (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (y * ((t - x) / z));
double tmp;
if (z <= -5.4e+38) {
tmp = t_1;
} else if (z <= 2.05e+46) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 4.4e+91) {
tmp = x - ((z * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - (y * ((t - x) / z))
if (z <= (-5.4d+38)) then
tmp = t_1
else if (z <= 2.05d+46) then
tmp = x + (y / (a / (t - x)))
else if (z <= 4.4d+91) then
tmp = x - ((z * t) / (a - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - (y * ((t - x) / z));
double tmp;
if (z <= -5.4e+38) {
tmp = t_1;
} else if (z <= 2.05e+46) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 4.4e+91) {
tmp = x - ((z * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (y * ((t - x) / z)) tmp = 0 if z <= -5.4e+38: tmp = t_1 elif z <= 2.05e+46: tmp = x + (y / (a / (t - x))) elif z <= 4.4e+91: tmp = x - ((z * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(y * Float64(Float64(t - x) / z))) tmp = 0.0 if (z <= -5.4e+38) tmp = t_1; elseif (z <= 2.05e+46) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 4.4e+91) tmp = Float64(x - Float64(Float64(z * t) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (y * ((t - x) / z)); tmp = 0.0; if (z <= -5.4e+38) tmp = t_1; elseif (z <= 2.05e+46) tmp = x + (y / (a / (t - x))); elseif (z <= 4.4e+91) tmp = x - ((z * t) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e+38], t$95$1, If[LessEqual[z, 2.05e+46], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+91], N[(x - N[(N[(z * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - y \cdot \frac{t - x}{z}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+46}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+91}:\\
\;\;\;\;x - \frac{z \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.39999999999999992e38 or 4.39999999999999999e91 < z Initial program 65.3%
+-commutative65.3%
fma-define65.2%
Simplified65.2%
Taylor expanded in z around inf 68.2%
associate--l+68.2%
distribute-lft-out--68.2%
div-sub68.2%
mul-1-neg68.2%
unsub-neg68.2%
div-sub68.2%
associate-/l*77.3%
associate-/l*84.6%
distribute-rgt-out--84.6%
Simplified84.6%
Taylor expanded in y around inf 76.0%
if -5.39999999999999992e38 < z < 2.05e46Initial program 89.9%
Taylor expanded in z around 0 66.8%
associate-/l*74.7%
Simplified74.7%
clear-num74.7%
un-div-inv74.7%
Applied egg-rr74.7%
if 2.05e46 < z < 4.39999999999999999e91Initial program 90.2%
Taylor expanded in t around inf 90.2%
Taylor expanded in y around 0 90.2%
mul-1-neg90.2%
unsub-neg90.2%
*-commutative90.2%
Simplified90.2%
Final simplification75.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6e+106)
t
(if (<= z -8.2e-6)
(+ x (/ t (/ a (- y z))))
(if (<= z 6.5e+52) (+ x (/ y (/ a (- t x)))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+106) {
tmp = t;
} else if (z <= -8.2e-6) {
tmp = x + (t / (a / (y - z)));
} else if (z <= 6.5e+52) {
tmp = x + (y / (a / (t - 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 <= (-6d+106)) then
tmp = t
else if (z <= (-8.2d-6)) then
tmp = x + (t / (a / (y - z)))
else if (z <= 6.5d+52) then
tmp = x + (y / (a / (t - 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 <= -6e+106) {
tmp = t;
} else if (z <= -8.2e-6) {
tmp = x + (t / (a / (y - z)));
} else if (z <= 6.5e+52) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+106: tmp = t elif z <= -8.2e-6: tmp = x + (t / (a / (y - z))) elif z <= 6.5e+52: tmp = x + (y / (a / (t - x))) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+106) tmp = t; elseif (z <= -8.2e-6) tmp = Float64(x + Float64(t / Float64(a / Float64(y - z)))); elseif (z <= 6.5e+52) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e+106) tmp = t; elseif (z <= -8.2e-6) tmp = x + (t / (a / (y - z))); elseif (z <= 6.5e+52) tmp = x + (y / (a / (t - x))); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+106], t, If[LessEqual[z, -8.2e-6], N[(x + N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+52], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+106}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-6}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+52}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.0000000000000001e106 or 6.49999999999999996e52 < z Initial program 65.1%
clear-num65.1%
un-div-inv65.2%
Applied egg-rr65.2%
Taylor expanded in z around inf 51.2%
if -6.0000000000000001e106 < z < -8.1999999999999994e-6Initial program 81.1%
Taylor expanded in t around inf 48.9%
Taylor expanded in a around inf 41.4%
associate-/l*51.2%
Simplified51.2%
clear-num51.1%
un-div-inv51.2%
Applied egg-rr51.2%
if -8.1999999999999994e-6 < z < 6.49999999999999996e52Initial program 90.6%
Taylor expanded in z around 0 69.3%
associate-/l*76.5%
Simplified76.5%
clear-num76.4%
un-div-inv76.5%
Applied egg-rr76.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1e+105)
t
(if (<= z -2.6e-6)
(+ x (/ t (/ a (- y z))))
(if (<= z 6e+52) (+ x (* y (/ (- t x) a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+105) {
tmp = t;
} else if (z <= -2.6e-6) {
tmp = x + (t / (a / (y - z)));
} else if (z <= 6e+52) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1d+105)) then
tmp = t
else if (z <= (-2.6d-6)) then
tmp = x + (t / (a / (y - z)))
else if (z <= 6d+52) then
tmp = x + (y * ((t - x) / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+105) {
tmp = t;
} else if (z <= -2.6e-6) {
tmp = x + (t / (a / (y - z)));
} else if (z <= 6e+52) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1e+105: tmp = t elif z <= -2.6e-6: tmp = x + (t / (a / (y - z))) elif z <= 6e+52: tmp = x + (y * ((t - x) / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e+105) tmp = t; elseif (z <= -2.6e-6) tmp = Float64(x + Float64(t / Float64(a / Float64(y - z)))); elseif (z <= 6e+52) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1e+105) tmp = t; elseif (z <= -2.6e-6) tmp = x + (t / (a / (y - z))); elseif (z <= 6e+52) tmp = x + (y * ((t - x) / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e+105], t, If[LessEqual[z, -2.6e-6], N[(x + N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+52], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+105}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-6}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+52}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.9999999999999994e104 or 6e52 < z Initial program 65.1%
clear-num65.1%
un-div-inv65.2%
Applied egg-rr65.2%
Taylor expanded in z around inf 51.2%
if -9.9999999999999994e104 < z < -2.60000000000000009e-6Initial program 81.1%
Taylor expanded in t around inf 48.9%
Taylor expanded in a around inf 41.4%
associate-/l*51.2%
Simplified51.2%
clear-num51.1%
un-div-inv51.2%
Applied egg-rr51.2%
if -2.60000000000000009e-6 < z < 6e52Initial program 90.6%
Taylor expanded in z around 0 69.3%
associate-/l*76.5%
Simplified76.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.55e+107)
t
(if (<= z -9e-9)
(+ x (* t (/ (- y z) a)))
(if (<= z 7.8e+49) (+ x (* y (/ (- t x) a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e+107) {
tmp = t;
} else if (z <= -9e-9) {
tmp = x + (t * ((y - z) / a));
} else if (z <= 7.8e+49) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.55d+107)) then
tmp = t
else if (z <= (-9d-9)) then
tmp = x + (t * ((y - z) / a))
else if (z <= 7.8d+49) then
tmp = x + (y * ((t - x) / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e+107) {
tmp = t;
} else if (z <= -9e-9) {
tmp = x + (t * ((y - z) / a));
} else if (z <= 7.8e+49) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.55e+107: tmp = t elif z <= -9e-9: tmp = x + (t * ((y - z) / a)) elif z <= 7.8e+49: tmp = x + (y * ((t - x) / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.55e+107) tmp = t; elseif (z <= -9e-9) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); elseif (z <= 7.8e+49) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.55e+107) tmp = t; elseif (z <= -9e-9) tmp = x + (t * ((y - z) / a)); elseif (z <= 7.8e+49) tmp = x + (y * ((t - x) / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.55e+107], t, If[LessEqual[z, -9e-9], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+49], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+107}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-9}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.55000000000000013e107 or 7.8000000000000002e49 < z Initial program 65.1%
clear-num65.1%
un-div-inv65.2%
Applied egg-rr65.2%
Taylor expanded in z around inf 51.2%
if -1.55000000000000013e107 < z < -8.99999999999999953e-9Initial program 81.1%
Taylor expanded in t around inf 48.9%
Taylor expanded in a around inf 41.4%
associate-/l*51.2%
Simplified51.2%
if -8.99999999999999953e-9 < z < 7.8000000000000002e49Initial program 90.6%
Taylor expanded in z around 0 69.3%
associate-/l*76.5%
Simplified76.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1e+106) (not (<= z 3.4e+107))) (+ t (* (- y a) (/ (- x t) z))) (+ x (/ (- y z) (/ (- a z) (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1e+106) || !(z <= 3.4e+107)) {
tmp = t + ((y - a) * ((x - t) / z));
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1d+106)) .or. (.not. (z <= 3.4d+107))) then
tmp = t + ((y - a) * ((x - t) / z))
else
tmp = x + ((y - z) / ((a - z) / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1e+106) || !(z <= 3.4e+107)) {
tmp = t + ((y - a) * ((x - t) / z));
} else {
tmp = x + ((y - z) / ((a - z) / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1e+106) or not (z <= 3.4e+107): tmp = t + ((y - a) * ((x - t) / z)) else: tmp = x + ((y - z) / ((a - z) / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1e+106) || !(z <= 3.4e+107)) tmp = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / z))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1e+106) || ~((z <= 3.4e+107))) tmp = t + ((y - a) * ((x - t) / z)); else tmp = x + ((y - z) / ((a - z) / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1e+106], N[Not[LessEqual[z, 3.4e+107]], $MachinePrecision]], N[(t + N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+106} \lor \neg \left(z \leq 3.4 \cdot 10^{+107}\right):\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\end{array}
\end{array}
if z < -1.00000000000000009e106 or 3.3999999999999997e107 < z Initial program 61.3%
+-commutative61.3%
fma-define61.2%
Simplified61.2%
Taylor expanded in z around inf 70.6%
associate--l+70.6%
distribute-lft-out--70.6%
div-sub70.6%
mul-1-neg70.6%
unsub-neg70.6%
div-sub70.6%
associate-/l*80.7%
associate-/l*89.6%
distribute-rgt-out--89.6%
Simplified89.6%
if -1.00000000000000009e106 < z < 3.3999999999999997e107Initial program 89.3%
clear-num89.3%
un-div-inv89.7%
Applied egg-rr89.7%
Final simplification89.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.25e+112) (not (<= z 2.1e+109))) (+ t (* (- y a) (/ (- x t) z))) (+ x (* (- y z) (/ (- t x) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+112) || !(z <= 2.1e+109)) {
tmp = t + ((y - a) * ((x - t) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.25d+112)) .or. (.not. (z <= 2.1d+109))) then
tmp = t + ((y - a) * ((x - t) / z))
else
tmp = x + ((y - z) * ((t - x) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+112) || !(z <= 2.1e+109)) {
tmp = t + ((y - a) * ((x - t) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.25e+112) or not (z <= 2.1e+109): tmp = t + ((y - a) * ((x - t) / z)) else: tmp = x + ((y - z) * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.25e+112) || !(z <= 2.1e+109)) tmp = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / z))); else tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.25e+112) || ~((z <= 2.1e+109))) tmp = t + ((y - a) * ((x - t) / z)); else tmp = x + ((y - z) * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.25e+112], N[Not[LessEqual[z, 2.1e+109]], $MachinePrecision]], N[(t + N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $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.25 \cdot 10^{+112} \lor \neg \left(z \leq 2.1 \cdot 10^{+109}\right):\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -1.25e112 or 2.1000000000000001e109 < z Initial program 61.3%
+-commutative61.3%
fma-define61.2%
Simplified61.2%
Taylor expanded in z around inf 70.6%
associate--l+70.6%
distribute-lft-out--70.6%
div-sub70.6%
mul-1-neg70.6%
unsub-neg70.6%
div-sub70.6%
associate-/l*80.7%
associate-/l*89.6%
distribute-rgt-out--89.6%
Simplified89.6%
if -1.25e112 < z < 2.1000000000000001e109Initial program 89.3%
Final simplification89.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4e+54)
t
(if (<= z -1.1e-292)
(* x (- 1.0 (/ y a)))
(if (<= z 3.7e+56) (+ x (* t (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+54) {
tmp = t;
} else if (z <= -1.1e-292) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.7e+56) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4d+54)) then
tmp = t
else if (z <= (-1.1d-292)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 3.7d+56) then
tmp = x + (t * (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+54) {
tmp = t;
} else if (z <= -1.1e-292) {
tmp = x * (1.0 - (y / a));
} else if (z <= 3.7e+56) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e+54: tmp = t elif z <= -1.1e-292: tmp = x * (1.0 - (y / a)) elif z <= 3.7e+56: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+54) tmp = t; elseif (z <= -1.1e-292) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 3.7e+56) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e+54) tmp = t; elseif (z <= -1.1e-292) tmp = x * (1.0 - (y / a)); elseif (z <= 3.7e+56) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+54], t, If[LessEqual[z, -1.1e-292], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+56], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+54}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-292}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+56}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.0000000000000003e54 or 3.69999999999999997e56 < z Initial program 67.5%
clear-num67.5%
un-div-inv67.6%
Applied egg-rr67.6%
Taylor expanded in z around inf 47.1%
if -4.0000000000000003e54 < z < -1.10000000000000006e-292Initial program 87.2%
+-commutative87.2%
fma-define87.1%
Simplified87.1%
Taylor expanded in t around 0 54.0%
mul-1-neg54.0%
*-rgt-identity54.0%
associate-/l*60.5%
distribute-rgt-neg-in60.5%
mul-1-neg60.5%
distribute-lft-in60.5%
mul-1-neg60.5%
unsub-neg60.5%
Simplified60.5%
Taylor expanded in z around 0 54.4%
if -1.10000000000000006e-292 < z < 3.69999999999999997e56Initial program 91.5%
Taylor expanded in z around 0 72.8%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in t around inf 59.1%
associate-/l*67.5%
Simplified67.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.7e+43) (not (<= z 1.2e+51))) (- t (* y (/ (- t x) z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e+43) || !(z <= 1.2e+51)) {
tmp = t - (y * ((t - x) / 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 <= (-1.7d+43)) .or. (.not. (z <= 1.2d+51))) then
tmp = t - (y * ((t - x) / 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 <= -1.7e+43) || !(z <= 1.2e+51)) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.7e+43) or not (z <= 1.2e+51): tmp = t - (y * ((t - x) / z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.7e+43) || !(z <= 1.2e+51)) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / 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 <= -1.7e+43) || ~((z <= 1.2e+51))) tmp = t - (y * ((t - x) / z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.7e+43], N[Not[LessEqual[z, 1.2e+51]], $MachinePrecision]], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / 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 -1.7 \cdot 10^{+43} \lor \neg \left(z \leq 1.2 \cdot 10^{+51}\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -1.70000000000000006e43 or 1.1999999999999999e51 < z Initial program 67.2%
+-commutative67.2%
fma-define67.1%
Simplified67.1%
Taylor expanded in z around inf 66.4%
associate--l+66.4%
distribute-lft-out--66.4%
div-sub66.4%
mul-1-neg66.4%
unsub-neg66.4%
div-sub66.4%
associate-/l*74.9%
associate-/l*81.6%
distribute-rgt-out--81.6%
Simplified81.6%
Taylor expanded in y around inf 72.8%
if -1.70000000000000006e43 < z < 1.1999999999999999e51Initial program 90.0%
Taylor expanded in z around 0 67.0%
associate-/l*74.9%
Simplified74.9%
clear-num74.9%
un-div-inv74.9%
Applied egg-rr74.9%
Final simplification74.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.3e+53) (not (<= z 6.2e+54))) (- t (* t (/ (- y a) z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.3e+53) || !(z <= 6.2e+54)) {
tmp = t - (t * ((y - a) / 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 <= (-1.3d+53)) .or. (.not. (z <= 6.2d+54))) then
tmp = t - (t * ((y - a) / 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 <= -1.3e+53) || !(z <= 6.2e+54)) {
tmp = t - (t * ((y - a) / z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.3e+53) or not (z <= 6.2e+54): tmp = t - (t * ((y - a) / z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.3e+53) || !(z <= 6.2e+54)) tmp = Float64(t - Float64(t * Float64(Float64(y - a) / 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 <= -1.3e+53) || ~((z <= 6.2e+54))) tmp = t - (t * ((y - a) / z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.3e+53], N[Not[LessEqual[z, 6.2e+54]], $MachinePrecision]], N[(t - N[(t * N[(N[(y - a), $MachinePrecision] / 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 -1.3 \cdot 10^{+53} \lor \neg \left(z \leq 6.2 \cdot 10^{+54}\right):\\
\;\;\;\;t - t \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -1.29999999999999999e53 or 6.1999999999999999e54 < z Initial program 67.5%
+-commutative67.5%
fma-define67.4%
Simplified67.4%
Taylor expanded in z around inf 66.7%
associate--l+66.7%
distribute-lft-out--66.7%
div-sub66.7%
mul-1-neg66.7%
unsub-neg66.7%
div-sub66.7%
associate-/l*74.4%
associate-/l*81.2%
distribute-rgt-out--81.2%
Simplified81.2%
Taylor expanded in t around inf 44.0%
associate-/l*53.1%
Simplified53.1%
if -1.29999999999999999e53 < z < 6.1999999999999999e54Initial program 89.4%
Taylor expanded in z around 0 66.2%
associate-/l*74.0%
Simplified74.0%
clear-num73.9%
un-div-inv74.0%
Applied egg-rr74.0%
Final simplification65.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.5e+41) (- t (* y (/ (- t x) z))) (if (<= z 2e+49) (+ x (/ y (/ a (- t x)))) (+ t (* (- y a) (/ x z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.5e+41) {
tmp = t - (y * ((t - x) / z));
} else if (z <= 2e+49) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t + ((y - a) * (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 (z <= (-4.5d+41)) then
tmp = t - (y * ((t - x) / z))
else if (z <= 2d+49) then
tmp = x + (y / (a / (t - x)))
else
tmp = t + ((y - a) * (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 (z <= -4.5e+41) {
tmp = t - (y * ((t - x) / z));
} else if (z <= 2e+49) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t + ((y - a) * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.5e+41: tmp = t - (y * ((t - x) / z)) elif z <= 2e+49: tmp = x + (y / (a / (t - x))) else: tmp = t + ((y - a) * (x / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.5e+41) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); elseif (z <= 2e+49) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); else tmp = Float64(t + Float64(Float64(y - a) * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.5e+41) tmp = t - (y * ((t - x) / z)); elseif (z <= 2e+49) tmp = x + (y / (a / (t - x))); else tmp = t + ((y - a) * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e+41], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+49], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+41}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+49}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -4.5000000000000001e41Initial program 69.1%
+-commutative69.1%
fma-define68.8%
Simplified68.8%
Taylor expanded in z around inf 62.4%
associate--l+62.4%
distribute-lft-out--62.4%
div-sub62.4%
mul-1-neg62.4%
unsub-neg62.4%
div-sub62.4%
associate-/l*72.5%
associate-/l*80.9%
distribute-rgt-out--80.9%
Simplified80.9%
Taylor expanded in y around inf 74.4%
if -4.5000000000000001e41 < z < 1.99999999999999989e49Initial program 90.0%
Taylor expanded in z around 0 67.0%
associate-/l*74.9%
Simplified74.9%
clear-num74.9%
un-div-inv74.9%
Applied egg-rr74.9%
if 1.99999999999999989e49 < z Initial program 64.6%
+-commutative64.6%
fma-define64.6%
Simplified64.6%
Taylor expanded in z around inf 72.3%
associate--l+72.3%
distribute-lft-out--72.3%
div-sub72.3%
mul-1-neg72.3%
unsub-neg72.3%
div-sub72.3%
associate-/l*78.3%
associate-/l*82.5%
distribute-rgt-out--82.5%
Simplified82.5%
Taylor expanded in t around 0 78.4%
neg-mul-178.4%
Simplified78.4%
Final simplification75.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1e+108) t (if (<= z 1.05e+95) (+ x (* t (/ (- y z) a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+108) {
tmp = t;
} else if (z <= 1.05e+95) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1d+108)) then
tmp = t
else if (z <= 1.05d+95) then
tmp = x + (t * ((y - z) / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+108) {
tmp = t;
} else if (z <= 1.05e+95) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1e+108: tmp = t elif z <= 1.05e+95: tmp = x + (t * ((y - z) / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e+108) tmp = t; elseif (z <= 1.05e+95) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1e+108) tmp = t; elseif (z <= 1.05e+95) tmp = x + (t * ((y - z) / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e+108], t, If[LessEqual[z, 1.05e+95], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+108}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+95}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1e108 or 1.05e95 < z Initial program 62.6%
clear-num62.6%
un-div-inv62.6%
Applied egg-rr62.6%
Taylor expanded in z around inf 52.9%
if -1e108 < z < 1.05e95Initial program 89.1%
Taylor expanded in t around inf 64.8%
Taylor expanded in a around inf 53.5%
associate-/l*60.4%
Simplified60.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -2e+53) t (if (<= z 8.2e+50) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+53) {
tmp = t;
} else if (z <= 8.2e+50) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2d+53)) then
tmp = t
else if (z <= 8.2d+50) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2e+53) {
tmp = t;
} else if (z <= 8.2e+50) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2e+53: tmp = t elif z <= 8.2e+50: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2e+53) tmp = t; elseif (z <= 8.2e+50) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2e+53) tmp = t; elseif (z <= 8.2e+50) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2e+53], t, If[LessEqual[z, 8.2e+50], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+53}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2e53 or 8.2000000000000002e50 < z Initial program 67.5%
clear-num67.5%
un-div-inv67.6%
Applied egg-rr67.6%
Taylor expanded in z around inf 47.1%
if -2e53 < z < 8.2000000000000002e50Initial program 89.4%
+-commutative89.4%
fma-define89.4%
Simplified89.4%
Taylor expanded in t around 0 56.2%
mul-1-neg56.2%
*-rgt-identity56.2%
associate-/l*60.4%
distribute-rgt-neg-in60.4%
mul-1-neg60.4%
distribute-lft-in60.4%
mul-1-neg60.4%
unsub-neg60.4%
Simplified60.4%
Taylor expanded in z around 0 55.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -6.2e-19) (not (<= y 8.2e+114))) (* x (/ y z)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.2e-19) || !(y <= 8.2e+114)) {
tmp = x * (y / 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 <= (-6.2d-19)) .or. (.not. (y <= 8.2d+114))) then
tmp = x * (y / 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 <= -6.2e-19) || !(y <= 8.2e+114)) {
tmp = x * (y / z);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6.2e-19) or not (y <= 8.2e+114): tmp = x * (y / z) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6.2e-19) || !(y <= 8.2e+114)) tmp = Float64(x * Float64(y / z)); 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-19) || ~((y <= 8.2e+114))) tmp = x * (y / z); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6.2e-19], N[Not[LessEqual[y, 8.2e+114]], $MachinePrecision]], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-19} \lor \neg \left(y \leq 8.2 \cdot 10^{+114}\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -6.1999999999999998e-19 or 8.2000000000000001e114 < y Initial program 85.0%
+-commutative85.0%
fma-define85.2%
Simplified85.2%
Taylor expanded in t around 0 42.6%
mul-1-neg42.6%
*-rgt-identity42.6%
associate-/l*48.2%
distribute-rgt-neg-in48.2%
mul-1-neg48.2%
distribute-lft-in48.2%
mul-1-neg48.2%
unsub-neg48.2%
Simplified48.2%
Taylor expanded in a around 0 38.0%
if -6.1999999999999998e-19 < y < 8.2000000000000001e114Initial program 76.8%
Taylor expanded in t around inf 64.9%
Taylor expanded in z around inf 51.8%
Final simplification46.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.55e+53) t (if (<= z 3.4e+52) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e+53) {
tmp = t;
} else if (z <= 3.4e+52) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.55d+53)) then
tmp = t
else if (z <= 3.4d+52) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e+53) {
tmp = t;
} else if (z <= 3.4e+52) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.55e+53: tmp = t elif z <= 3.4e+52: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.55e+53) tmp = t; elseif (z <= 3.4e+52) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.55e+53) tmp = t; elseif (z <= 3.4e+52) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.55e+53], t, If[LessEqual[z, 3.4e+52], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+53}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+52}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.5500000000000001e53 or 3.4e52 < z Initial program 67.5%
clear-num67.5%
un-div-inv67.6%
Applied egg-rr67.6%
Taylor expanded in z around inf 47.1%
if -1.5500000000000001e53 < z < 3.4e52Initial program 89.4%
+-commutative89.4%
fma-define89.4%
Simplified89.4%
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 80.2%
Taylor expanded in t around inf 53.2%
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 80.2%
clear-num80.2%
un-div-inv80.5%
Applied egg-rr80.5%
Taylor expanded in z around inf 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 80.2%
Taylor expanded in t around 0 40.2%
mul-1-neg40.2%
associate-/l*44.7%
distribute-rgt-neg-in44.7%
mul-1-neg44.7%
mul-1-neg44.7%
distribute-frac-neg244.7%
Simplified44.7%
Taylor expanded in z around inf 2.9%
distribute-rgt1-in2.9%
metadata-eval2.9%
mul0-lft2.9%
Simplified2.9%
herbie shell --seed 2024157
(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)))))