
(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 17 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 -2e-154) (not (<= t_1 0.0)))
(+ x (/ (- y z) (/ (- a z) (- t x))))
(+ t (* (/ (- t x) z) (- a y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-154) || !(t_1 <= 0.0)) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-154)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t + (((t - x) / z) * (a - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-154) || !(t_1 <= 0.0)) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-154) or not (t_1 <= 0.0): tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t + (((t - x) / z) * (a - y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-154) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-154) || ~((t_1 <= 0.0))) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t + (((t - x) / z) * (a - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-154], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-154} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.9999999999999999e-154 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.6%
clear-num94.6%
un-div-inv94.7%
Applied egg-rr94.7%
if -1.9999999999999999e-154 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 6.1%
+-commutative6.1%
fma-define6.5%
Simplified6.5%
Taylor expanded in z around inf 78.5%
associate--l+78.5%
distribute-lft-out--78.5%
div-sub78.5%
mul-1-neg78.5%
unsub-neg78.5%
div-sub78.5%
associate-/l*89.1%
associate-/l*94.7%
distribute-rgt-out--94.7%
Simplified94.7%
Final simplification94.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-154) (not (<= t_1 0.0)))
t_1
(+ t (* (/ (- t x) z) (- a y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-154) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-154)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t + (((t - x) / z) * (a - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-154) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-154) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t + (((t - x) / z) * (a - y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-154) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-154) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t + (((t - x) / z) * (a - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-154], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-154} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.9999999999999999e-154 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.6%
if -1.9999999999999999e-154 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 6.1%
+-commutative6.1%
fma-define6.5%
Simplified6.5%
Taylor expanded in z around inf 78.5%
associate--l+78.5%
distribute-lft-out--78.5%
div-sub78.5%
mul-1-neg78.5%
unsub-neg78.5%
div-sub78.5%
associate-/l*89.1%
associate-/l*94.7%
distribute-rgt-out--94.7%
Simplified94.7%
Final simplification94.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ (- t x) z) (- a y)))))
(if (<= z -2.3e+51)
t_1
(if (<= z 9.5e-143)
(+ x (/ y (/ (- a z) (- t x))))
(if (<= z 2.4e+151) (+ x (* t (/ (- y z) (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((t - x) / z) * (a - y));
double tmp;
if (z <= -2.3e+51) {
tmp = t_1;
} else if (z <= 9.5e-143) {
tmp = x + (y / ((a - z) / (t - x)));
} else if (z <= 2.4e+151) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (((t - x) / z) * (a - y))
if (z <= (-2.3d+51)) then
tmp = t_1
else if (z <= 9.5d-143) then
tmp = x + (y / ((a - z) / (t - x)))
else if (z <= 2.4d+151) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((t - x) / z) * (a - y));
double tmp;
if (z <= -2.3e+51) {
tmp = t_1;
} else if (z <= 9.5e-143) {
tmp = x + (y / ((a - z) / (t - x)));
} else if (z <= 2.4e+151) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (((t - x) / z) * (a - y)) tmp = 0 if z <= -2.3e+51: tmp = t_1 elif z <= 9.5e-143: tmp = x + (y / ((a - z) / (t - x))) elif z <= 2.4e+151: tmp = x + (t * ((y - z) / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))) tmp = 0.0 if (z <= -2.3e+51) tmp = t_1; elseif (z <= 9.5e-143) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x)))); elseif (z <= 2.4e+151) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (((t - x) / z) * (a - y)); tmp = 0.0; if (z <= -2.3e+51) tmp = t_1; elseif (z <= 9.5e-143) tmp = x + (y / ((a - z) / (t - x))); elseif (z <= 2.4e+151) tmp = x + (t * ((y - z) / (a - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+51], t$95$1, If[LessEqual[z, 9.5e-143], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+151], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-143}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+151}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.30000000000000005e51 or 2.4000000000000001e151 < z Initial program 59.2%
+-commutative59.2%
fma-define59.5%
Simplified59.5%
Taylor expanded in z around inf 66.5%
associate--l+66.5%
distribute-lft-out--66.5%
div-sub66.5%
mul-1-neg66.5%
unsub-neg66.5%
div-sub66.5%
associate-/l*78.6%
associate-/l*87.5%
distribute-rgt-out--87.5%
Simplified87.5%
if -2.30000000000000005e51 < z < 9.4999999999999993e-143Initial program 94.5%
clear-num94.6%
un-div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in y around inf 90.0%
if 9.4999999999999993e-143 < z < 2.4000000000000001e151Initial program 88.6%
Taylor expanded in t around inf 76.4%
associate-/l*82.2%
Simplified82.2%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* x (/ (- y a) z)))))
(if (<= z -7.5e+73)
t_1
(if (<= z 1e-142)
(+ x (/ y (/ (- a z) (- t x))))
(if (<= z 3.6e+151) (+ x (* t (/ (- y z) (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x * ((y - a) / z));
double tmp;
if (z <= -7.5e+73) {
tmp = t_1;
} else if (z <= 1e-142) {
tmp = x + (y / ((a - z) / (t - x)));
} else if (z <= 3.6e+151) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (x * ((y - a) / z))
if (z <= (-7.5d+73)) then
tmp = t_1
else if (z <= 1d-142) then
tmp = x + (y / ((a - z) / (t - x)))
else if (z <= 3.6d+151) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x * ((y - a) / z));
double tmp;
if (z <= -7.5e+73) {
tmp = t_1;
} else if (z <= 1e-142) {
tmp = x + (y / ((a - z) / (t - x)));
} else if (z <= 3.6e+151) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x * ((y - a) / z)) tmp = 0 if z <= -7.5e+73: tmp = t_1 elif z <= 1e-142: tmp = x + (y / ((a - z) / (t - x))) elif z <= 3.6e+151: tmp = x + (t * ((y - z) / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x * Float64(Float64(y - a) / z))) tmp = 0.0 if (z <= -7.5e+73) tmp = t_1; elseif (z <= 1e-142) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / Float64(t - x)))); elseif (z <= 3.6e+151) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x * ((y - a) / z)); tmp = 0.0; if (z <= -7.5e+73) tmp = t_1; elseif (z <= 1e-142) tmp = x + (y / ((a - z) / (t - x))); elseif (z <= 3.6e+151) tmp = x + (t * ((y - z) / (a - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+73], t$95$1, If[LessEqual[z, 1e-142], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+151], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + x \cdot \frac{y - a}{z}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-142}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+151}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.5e73 or 3.6e151 < z Initial program 56.4%
clear-num56.4%
un-div-inv56.7%
Applied egg-rr56.7%
Taylor expanded in z around inf 66.2%
associate--l+66.2%
associate-*r/66.2%
associate-*r/66.2%
mul-1-neg66.2%
div-sub66.2%
mul-1-neg66.2%
distribute-lft-out--66.2%
associate-*r/66.2%
mul-1-neg66.2%
distribute-rgt-out--66.4%
Simplified66.4%
Taylor expanded in t around 0 71.8%
associate-/l*81.1%
Simplified81.1%
if -7.5e73 < z < 1e-142Initial program 94.4%
clear-num94.5%
un-div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in y around inf 88.0%
if 1e-142 < z < 3.6e151Initial program 88.6%
Taylor expanded in t around inf 76.4%
associate-/l*82.2%
Simplified82.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* x (/ (- y a) z)))))
(if (<= z -1.45e+43)
t_1
(if (<= z 3.5e-143)
(+ x (* y (/ (- t x) a)))
(if (<= z 8.2e+58) (+ x (* t (/ (- y z) a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x * ((y - a) / z));
double tmp;
if (z <= -1.45e+43) {
tmp = t_1;
} else if (z <= 3.5e-143) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 8.2e+58) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (x * ((y - a) / z))
if (z <= (-1.45d+43)) then
tmp = t_1
else if (z <= 3.5d-143) then
tmp = x + (y * ((t - x) / a))
else if (z <= 8.2d+58) then
tmp = x + (t * ((y - z) / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (x * ((y - a) / z));
double tmp;
if (z <= -1.45e+43) {
tmp = t_1;
} else if (z <= 3.5e-143) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 8.2e+58) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (x * ((y - a) / z)) tmp = 0 if z <= -1.45e+43: tmp = t_1 elif z <= 3.5e-143: tmp = x + (y * ((t - x) / a)) elif z <= 8.2e+58: tmp = x + (t * ((y - z) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(x * Float64(Float64(y - a) / z))) tmp = 0.0 if (z <= -1.45e+43) tmp = t_1; elseif (z <= 3.5e-143) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (z <= 8.2e+58) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (x * ((y - a) / z)); tmp = 0.0; if (z <= -1.45e+43) tmp = t_1; elseif (z <= 3.5e-143) tmp = x + (y * ((t - x) / a)); elseif (z <= 8.2e+58) tmp = x + (t * ((y - z) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+43], t$95$1, If[LessEqual[z, 3.5e-143], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+58], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + x \cdot \frac{y - a}{z}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-143}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+58}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.4500000000000001e43 or 8.2e58 < z Initial program 66.5%
clear-num66.5%
un-div-inv66.8%
Applied egg-rr66.8%
Taylor expanded in z around inf 60.8%
associate--l+60.8%
associate-*r/60.8%
associate-*r/60.8%
mul-1-neg60.8%
div-sub60.8%
mul-1-neg60.8%
distribute-lft-out--60.8%
associate-*r/60.8%
mul-1-neg60.8%
distribute-rgt-out--61.9%
Simplified61.9%
Taylor expanded in t around 0 60.8%
associate-/l*69.1%
Simplified69.1%
if -1.4500000000000001e43 < z < 3.50000000000000005e-143Initial program 94.4%
Taylor expanded in z around 0 70.5%
associate-/l*76.6%
Simplified76.6%
if 3.50000000000000005e-143 < z < 8.2e58Initial program 90.8%
Taylor expanded in t around inf 84.2%
Taylor expanded in a around inf 58.2%
associate-/l*62.7%
Simplified62.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.16e-127) (not (<= a 2.4e-25))) (+ x (* t (/ (- y z) (- a z)))) (- t (* y (/ (- t x) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.16e-127) || !(a <= 2.4e-25)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t - (y * ((t - x) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.16d-127)) .or. (.not. (a <= 2.4d-25))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t - (y * ((t - x) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.16e-127) || !(a <= 2.4e-25)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t - (y * ((t - x) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.16e-127) or not (a <= 2.4e-25): tmp = x + (t * ((y - z) / (a - z))) else: tmp = t - (y * ((t - x) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.16e-127) || !(a <= 2.4e-25)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / 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.16e-127) || ~((a <= 2.4e-25))) tmp = x + (t * ((y - z) / (a - z))); else tmp = t - (y * ((t - x) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.16e-127], N[Not[LessEqual[a, 2.4e-25]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $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.16 \cdot 10^{-127} \lor \neg \left(a \leq 2.4 \cdot 10^{-25}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\end{array}
\end{array}
if a < -1.16e-127 or 2.40000000000000009e-25 < a Initial program 87.7%
Taylor expanded in t around inf 63.4%
associate-/l*76.8%
Simplified76.8%
if -1.16e-127 < a < 2.40000000000000009e-25Initial program 73.7%
clear-num73.7%
un-div-inv73.8%
Applied egg-rr73.8%
Taylor expanded in z around inf 83.1%
associate--l+83.1%
associate-*r/83.1%
associate-*r/83.1%
mul-1-neg83.1%
div-sub85.1%
mul-1-neg85.1%
distribute-lft-out--85.1%
associate-*r/85.1%
mul-1-neg85.1%
distribute-rgt-out--85.1%
Simplified85.1%
Taylor expanded in a around 0 85.0%
associate-/l*89.4%
Simplified89.4%
Final simplification81.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.6e-142)
(+ x (* (- y z) (/ t (- a z))))
(if (<= a 5.2e-25)
(- t (* y (/ (- t x) z)))
(+ x (* t (/ (- y z) (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.6e-142) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (a <= 5.2e-25) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.6d-142)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (a <= 5.2d-25) then
tmp = t - (y * ((t - x) / z))
else
tmp = x + (t * ((y - z) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.6e-142) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (a <= 5.2e-25) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.6e-142: tmp = x + ((y - z) * (t / (a - z))) elif a <= 5.2e-25: tmp = t - (y * ((t - x) / z)) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.6e-142) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (a <= 5.2e-25) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.6e-142) tmp = x + ((y - z) * (t / (a - z))); elseif (a <= 5.2e-25) tmp = t - (y * ((t - x) / z)); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.6e-142], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.2e-25], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{-142}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{-25}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -2.6e-142Initial program 90.1%
Taylor expanded in t around inf 77.6%
if -2.6e-142 < a < 5.2e-25Initial program 73.2%
clear-num73.2%
un-div-inv73.3%
Applied egg-rr73.3%
Taylor expanded in z around inf 83.8%
associate--l+83.8%
associate-*r/83.8%
associate-*r/83.8%
mul-1-neg83.8%
div-sub85.8%
mul-1-neg85.8%
distribute-lft-out--85.8%
associate-*r/85.8%
mul-1-neg85.8%
distribute-rgt-out--85.8%
Simplified85.8%
Taylor expanded in a around 0 85.7%
associate-/l*90.2%
Simplified90.2%
if 5.2e-25 < a Initial program 85.0%
Taylor expanded in t around inf 61.0%
associate-/l*76.5%
Simplified76.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.4e-47) (not (<= a 1.85e-44))) (+ x (* t (/ (- y z) a))) (+ t (* x (/ (- y a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.4e-47) || !(a <= 1.85e-44)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t + (x * ((y - a) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.4d-47)) .or. (.not. (a <= 1.85d-44))) then
tmp = x + (t * ((y - z) / a))
else
tmp = t + (x * ((y - a) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.4e-47) || !(a <= 1.85e-44)) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t + (x * ((y - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.4e-47) or not (a <= 1.85e-44): tmp = x + (t * ((y - z) / a)) else: tmp = t + (x * ((y - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.4e-47) || !(a <= 1.85e-44)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.4e-47) || ~((a <= 1.85e-44))) tmp = x + (t * ((y - z) / a)); else tmp = t + (x * ((y - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.4e-47], N[Not[LessEqual[a, 1.85e-44]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{-47} \lor \neg \left(a \leq 1.85 \cdot 10^{-44}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if a < -2.3999999999999999e-47 or 1.85e-44 < a Initial program 87.8%
Taylor expanded in t around inf 74.7%
Taylor expanded in a around inf 57.8%
associate-/l*65.4%
Simplified65.4%
if -2.3999999999999999e-47 < a < 1.85e-44Initial program 75.9%
clear-num75.8%
un-div-inv75.9%
Applied egg-rr75.9%
Taylor expanded in z around inf 77.7%
associate--l+77.7%
associate-*r/77.7%
associate-*r/77.7%
mul-1-neg77.7%
div-sub79.4%
mul-1-neg79.4%
distribute-lft-out--79.4%
associate-*r/79.4%
mul-1-neg79.4%
distribute-rgt-out--79.4%
Simplified79.4%
Taylor expanded in t around 0 62.9%
associate-/l*68.7%
Simplified68.7%
Final simplification66.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.7e+65) (not (<= z 2.1e+151))) (+ t (* a (/ (- t x) z))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.7e+65) || !(z <= 2.1e+151)) {
tmp = t + (a * ((t - x) / z));
} else {
tmp = x + (t * (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 <= (-6.7d+65)) .or. (.not. (z <= 2.1d+151))) then
tmp = t + (a * ((t - x) / z))
else
tmp = x + (t * (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 <= -6.7e+65) || !(z <= 2.1e+151)) {
tmp = t + (a * ((t - x) / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.7e+65) or not (z <= 2.1e+151): tmp = t + (a * ((t - x) / z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.7e+65) || !(z <= 2.1e+151)) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.7e+65) || ~((z <= 2.1e+151))) tmp = t + (a * ((t - x) / z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.7e+65], N[Not[LessEqual[z, 2.1e+151]], $MachinePrecision]], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.7 \cdot 10^{+65} \lor \neg \left(z \leq 2.1 \cdot 10^{+151}\right):\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -6.6999999999999997e65 or 2.1000000000000001e151 < z Initial program 57.5%
clear-num57.5%
un-div-inv57.8%
Applied egg-rr57.8%
Taylor expanded in z around inf 66.3%
associate--l+66.3%
associate-*r/66.3%
associate-*r/66.3%
mul-1-neg66.3%
div-sub66.3%
mul-1-neg66.3%
distribute-lft-out--66.3%
associate-*r/66.3%
mul-1-neg66.3%
distribute-rgt-out--66.5%
Simplified66.5%
Taylor expanded in y around 0 58.9%
associate-/l*65.5%
Simplified65.5%
if -6.6999999999999997e65 < z < 2.1000000000000001e151Initial program 92.4%
Taylor expanded in z around 0 57.7%
Taylor expanded in t around inf 46.4%
associate-/l*50.2%
Simplified50.2%
Final simplification54.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -2e-65) (+ x (* (- y z) (/ t a))) (if (<= a 1.95e-25) (- t (* y (/ (- t x) z))) (+ x (* y (/ (- t x) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-65) {
tmp = x + ((y - z) * (t / a));
} else if (a <= 1.95e-25) {
tmp = t - (y * ((t - x) / 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 (a <= (-2d-65)) then
tmp = x + ((y - z) * (t / a))
else if (a <= 1.95d-25) then
tmp = t - (y * ((t - x) / 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 (a <= -2e-65) {
tmp = x + ((y - z) * (t / a));
} else if (a <= 1.95e-25) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e-65: tmp = x + ((y - z) * (t / a)) elif a <= 1.95e-25: tmp = t - (y * ((t - x) / z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e-65) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / a))); elseif (a <= 1.95e-25) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / 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 (a <= -2e-65) tmp = x + ((y - z) * (t / a)); elseif (a <= 1.95e-25) tmp = t - (y * ((t - x) / z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e-65], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.95e-25], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-65}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{-25}:\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if a < -1.99999999999999985e-65Initial program 89.1%
Taylor expanded in t around inf 77.9%
Taylor expanded in a around inf 64.6%
if -1.99999999999999985e-65 < a < 1.95e-25Initial program 76.3%
clear-num76.2%
un-div-inv76.3%
Applied egg-rr76.3%
Taylor expanded in z around inf 79.4%
associate--l+79.4%
associate-*r/79.4%
associate-*r/79.4%
mul-1-neg79.4%
div-sub81.2%
mul-1-neg81.2%
distribute-lft-out--81.2%
associate-*r/81.2%
mul-1-neg81.2%
distribute-rgt-out--81.2%
Simplified81.2%
Taylor expanded in a around 0 80.3%
associate-/l*85.9%
Simplified85.9%
if 1.95e-25 < a Initial program 85.0%
Taylor expanded in z around 0 55.9%
associate-/l*68.8%
Simplified68.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -620000.0) (- x (/ z (/ a t))) (if (<= a 2.25e-44) (+ t (* x (/ (- y a) z))) (+ x (* t (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -620000.0) {
tmp = x - (z / (a / t));
} else if (a <= 2.25e-44) {
tmp = t + (x * ((y - a) / z));
} else {
tmp = x + (t * (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 (a <= (-620000.0d0)) then
tmp = x - (z / (a / t))
else if (a <= 2.25d-44) then
tmp = t + (x * ((y - a) / z))
else
tmp = x + (t * (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 (a <= -620000.0) {
tmp = x - (z / (a / t));
} else if (a <= 2.25e-44) {
tmp = t + (x * ((y - a) / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -620000.0: tmp = x - (z / (a / t)) elif a <= 2.25e-44: tmp = t + (x * ((y - a) / z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -620000.0) tmp = Float64(x - Float64(z / Float64(a / t))); elseif (a <= 2.25e-44) tmp = Float64(t + Float64(x * Float64(Float64(y - a) / z))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -620000.0) tmp = x - (z / (a / t)); elseif (a <= 2.25e-44) tmp = t + (x * ((y - a) / z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -620000.0], N[(x - N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.25e-44], N[(t + N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -620000:\\
\;\;\;\;x - \frac{z}{\frac{a}{t}}\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-44}:\\
\;\;\;\;t + x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -6.2e5Initial program 89.7%
clear-num89.5%
un-div-inv89.7%
Applied egg-rr89.7%
Taylor expanded in t around inf 80.8%
Taylor expanded in y around 0 63.9%
neg-mul-163.9%
Simplified63.9%
Taylor expanded in a around inf 56.4%
if -6.2e5 < a < 2.2499999999999999e-44Initial program 77.5%
clear-num77.5%
un-div-inv77.6%
Applied egg-rr77.6%
Taylor expanded in z around inf 74.7%
associate--l+74.7%
associate-*r/74.7%
associate-*r/74.7%
mul-1-neg74.7%
div-sub76.3%
mul-1-neg76.3%
distribute-lft-out--76.3%
associate-*r/76.3%
mul-1-neg76.3%
distribute-rgt-out--76.3%
Simplified76.3%
Taylor expanded in t around 0 60.6%
associate-/l*65.8%
Simplified65.8%
if 2.2499999999999999e-44 < a Initial program 85.6%
Taylor expanded in z around 0 55.2%
Taylor expanded in t around inf 52.2%
associate-/l*60.6%
Simplified60.6%
Final simplification62.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.7e+28) (not (<= z 1.25e-88))) (+ x t) (* x (/ (- a y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.7e+28) || !(z <= 1.25e-88)) {
tmp = x + t;
} else {
tmp = x * ((a - 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 <= (-3.7d+28)) .or. (.not. (z <= 1.25d-88))) then
tmp = x + t
else
tmp = x * ((a - 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 <= -3.7e+28) || !(z <= 1.25e-88)) {
tmp = x + t;
} else {
tmp = x * ((a - y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.7e+28) or not (z <= 1.25e-88): tmp = x + t else: tmp = x * ((a - y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.7e+28) || !(z <= 1.25e-88)) tmp = Float64(x + t); else tmp = Float64(x * Float64(Float64(a - y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.7e+28) || ~((z <= 1.25e-88))) tmp = x + t; else tmp = x * ((a - y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.7e+28], N[Not[LessEqual[z, 1.25e-88]], $MachinePrecision]], N[(x + t), $MachinePrecision], N[(x * N[(N[(a - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+28} \lor \neg \left(z \leq 1.25 \cdot 10^{-88}\right):\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{a - y}{a}\\
\end{array}
\end{array}
if z < -3.6999999999999999e28 or 1.25000000000000002e-88 < z Initial program 72.5%
Taylor expanded in t around inf 60.9%
Taylor expanded in z around inf 35.0%
if -3.6999999999999999e28 < z < 1.25000000000000002e-88Initial program 94.6%
Taylor expanded in z around 0 69.7%
Taylor expanded in x around inf 50.2%
associate-*r/50.2%
mul-1-neg50.2%
Simplified50.2%
Taylor expanded in a around 0 50.2%
mul-1-neg50.2%
unsub-neg50.2%
Simplified50.2%
Final simplification41.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.6e+60) (* t (+ (/ x t) 1.0)) (if (<= z 4e+151) (+ x (* t (/ y a))) (+ x (- t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.6e+60) {
tmp = t * ((x / t) + 1.0);
} else if (z <= 4e+151) {
tmp = x + (t * (y / a));
} else {
tmp = x + (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 <= (-3.6d+60)) then
tmp = t * ((x / t) + 1.0d0)
else if (z <= 4d+151) then
tmp = x + (t * (y / a))
else
tmp = x + (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 <= -3.6e+60) {
tmp = t * ((x / t) + 1.0);
} else if (z <= 4e+151) {
tmp = x + (t * (y / a));
} else {
tmp = x + (t - x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.6e+60: tmp = t * ((x / t) + 1.0) elif z <= 4e+151: tmp = x + (t * (y / a)) else: tmp = x + (t - x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.6e+60) tmp = Float64(t * Float64(Float64(x / t) + 1.0)); elseif (z <= 4e+151) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(t - x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.6e+60) tmp = t * ((x / t) + 1.0); elseif (z <= 4e+151) tmp = x + (t * (y / a)); else tmp = x + (t - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.6e+60], N[(t * N[(N[(x / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+151], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+60}:\\
\;\;\;\;t \cdot \left(\frac{x}{t} + 1\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+151}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right)\\
\end{array}
\end{array}
if z < -3.59999999999999968e60Initial program 54.8%
Taylor expanded in t around inf 45.7%
Taylor expanded in z around inf 36.2%
Taylor expanded in t around inf 36.3%
if -3.59999999999999968e60 < z < 4.00000000000000007e151Initial program 92.4%
Taylor expanded in z around 0 57.7%
Taylor expanded in t around inf 46.4%
associate-/l*50.2%
Simplified50.2%
if 4.00000000000000007e151 < z Initial program 61.6%
Taylor expanded in z around inf 43.7%
Final simplification47.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.15e+208) (not (<= y 2.6e+44))) (* x (/ y (- a))) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.15e+208) || !(y <= 2.6e+44)) {
tmp = x * (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 <= (-1.15d+208)) .or. (.not. (y <= 2.6d+44))) then
tmp = x * (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 <= -1.15e+208) || !(y <= 2.6e+44)) {
tmp = x * (y / -a);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.15e+208) or not (y <= 2.6e+44): tmp = x * (y / -a) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.15e+208) || !(y <= 2.6e+44)) tmp = Float64(x * Float64(y / Float64(-a))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.15e+208) || ~((y <= 2.6e+44))) tmp = x * (y / -a); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.15e+208], N[Not[LessEqual[y, 2.6e+44]], $MachinePrecision]], N[(x * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+208} \lor \neg \left(y \leq 2.6 \cdot 10^{+44}\right):\\
\;\;\;\;x \cdot \frac{y}{-a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -1.15e208 or 2.5999999999999999e44 < y Initial program 92.4%
Taylor expanded in z around 0 52.6%
Taylor expanded in x around inf 33.3%
associate-*r/33.3%
mul-1-neg33.3%
Simplified33.3%
Taylor expanded in y around inf 23.2%
neg-mul-123.2%
distribute-neg-frac223.2%
Simplified23.2%
if -1.15e208 < y < 2.5999999999999999e44Initial program 76.7%
Taylor expanded in t around inf 66.5%
Taylor expanded in z around inf 37.3%
Final simplification32.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -6e+192) (not (<= y 4.8e+79))) (/ (* x (- y)) a) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6e+192) || !(y <= 4.8e+79)) {
tmp = (x * -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 <= (-6d+192)) .or. (.not. (y <= 4.8d+79))) then
tmp = (x * -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 <= -6e+192) || !(y <= 4.8e+79)) {
tmp = (x * -y) / a;
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6e+192) or not (y <= 4.8e+79): tmp = (x * -y) / a else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6e+192) || !(y <= 4.8e+79)) tmp = Float64(Float64(x * 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 <= -6e+192) || ~((y <= 4.8e+79))) tmp = (x * -y) / a; else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6e+192], N[Not[LessEqual[y, 4.8e+79]], $MachinePrecision]], N[(N[(x * (-y)), $MachinePrecision] / a), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+192} \lor \neg \left(y \leq 4.8 \cdot 10^{+79}\right):\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -6e192 or 4.79999999999999971e79 < y Initial program 94.1%
Taylor expanded in z around 0 52.4%
Taylor expanded in x around inf 33.0%
associate-*r/33.0%
mul-1-neg33.0%
Simplified33.0%
Taylor expanded in y around inf 24.7%
mul-1-neg24.7%
*-commutative24.7%
Simplified24.7%
if -6e192 < y < 4.79999999999999971e79Initial program 76.5%
Taylor expanded in t around inf 66.1%
Taylor expanded in z around inf 35.6%
Final simplification32.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.3e+198) x (if (<= a 8e+144) (+ x t) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.3e+198) {
tmp = x;
} else if (a <= 8e+144) {
tmp = x + 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 <= (-3.3d+198)) then
tmp = x
else if (a <= 8d+144) then
tmp = x + 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 <= -3.3e+198) {
tmp = x;
} else if (a <= 8e+144) {
tmp = x + t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.3e+198: tmp = x elif a <= 8e+144: tmp = x + t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.3e+198) tmp = x; elseif (a <= 8e+144) tmp = Float64(x + t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.3e+198) tmp = x; elseif (a <= 8e+144) tmp = x + t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.3e+198], x, If[LessEqual[a, 8e+144], N[(x + t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+198}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+144}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.29999999999999994e198 or 8.00000000000000019e144 < a Initial program 91.1%
+-commutative91.1%
fma-define91.2%
Simplified91.2%
Taylor expanded in a around inf 58.9%
if -3.29999999999999994e198 < a < 8.00000000000000019e144Initial program 80.1%
Taylor expanded in t around inf 59.1%
Taylor expanded in z around inf 25.2%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 82.2%
+-commutative82.2%
fma-define82.2%
Simplified82.2%
Taylor expanded in a around inf 19.4%
herbie shell --seed 2024172
(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)))))