
(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 16 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-274) (not (<= t_1 2e-202)))
(+ 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-274) || !(t_1 <= 2e-202)) {
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-274)) .or. (.not. (t_1 <= 2d-202))) 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-274) || !(t_1 <= 2e-202)) {
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-274) or not (t_1 <= 2e-202): 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-274) || !(t_1 <= 2e-202)) 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-274) || ~((t_1 <= 2e-202))) 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-274], N[Not[LessEqual[t$95$1, 2e-202]], $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^{-274} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-202}\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.99999999999999993e-274 or 2.0000000000000001e-202 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.8%
clear-num91.8%
un-div-inv92.3%
Applied egg-rr92.3%
if -1.99999999999999993e-274 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-202Initial program 6.8%
+-commutative6.8%
fma-define7.0%
Simplified7.0%
Taylor expanded in z around inf 78.6%
associate--l+78.6%
distribute-lft-out--78.6%
div-sub78.7%
mul-1-neg78.7%
unsub-neg78.7%
div-sub78.6%
associate-/l*87.7%
associate-/l*96.7%
distribute-rgt-out--96.7%
Simplified96.7%
Final simplification92.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-274) (not (<= t_1 2e-202)))
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-274) || !(t_1 <= 2e-202)) {
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-274)) .or. (.not. (t_1 <= 2d-202))) 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-274) || !(t_1 <= 2e-202)) {
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-274) or not (t_1 <= 2e-202): 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-274) || !(t_1 <= 2e-202)) 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-274) || ~((t_1 <= 2e-202))) 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-274], N[Not[LessEqual[t$95$1, 2e-202]], $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^{-274} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-202}\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.99999999999999993e-274 or 2.0000000000000001e-202 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.8%
if -1.99999999999999993e-274 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-202Initial program 6.8%
+-commutative6.8%
fma-define7.0%
Simplified7.0%
Taylor expanded in z around inf 78.6%
associate--l+78.6%
distribute-lft-out--78.6%
div-sub78.7%
mul-1-neg78.7%
unsub-neg78.7%
div-sub78.6%
associate-/l*87.7%
associate-/l*96.7%
distribute-rgt-out--96.7%
Simplified96.7%
Final simplification92.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.5e+133)
t
(if (<= z -7.8e-89)
(* x (+ 1.0 (/ y (- z a))))
(if (<= z 2.25e+57)
(+ x (* y (/ (- t x) a)))
(if (<= z 1.65e+188)
(+ x (* t (- 1.0 (/ y z))))
(if (<= z 2.6e+267) (* x (/ (- y a) z)) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+133) {
tmp = t;
} else if (z <= -7.8e-89) {
tmp = x * (1.0 + (y / (z - a)));
} else if (z <= 2.25e+57) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 1.65e+188) {
tmp = x + (t * (1.0 - (y / z)));
} else if (z <= 2.6e+267) {
tmp = x * ((y - a) / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.5d+133)) then
tmp = t
else if (z <= (-7.8d-89)) then
tmp = x * (1.0d0 + (y / (z - a)))
else if (z <= 2.25d+57) then
tmp = x + (y * ((t - x) / a))
else if (z <= 1.65d+188) then
tmp = x + (t * (1.0d0 - (y / z)))
else if (z <= 2.6d+267) then
tmp = x * ((y - a) / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e+133) {
tmp = t;
} else if (z <= -7.8e-89) {
tmp = x * (1.0 + (y / (z - a)));
} else if (z <= 2.25e+57) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 1.65e+188) {
tmp = x + (t * (1.0 - (y / z)));
} else if (z <= 2.6e+267) {
tmp = x * ((y - a) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.5e+133: tmp = t elif z <= -7.8e-89: tmp = x * (1.0 + (y / (z - a))) elif z <= 2.25e+57: tmp = x + (y * ((t - x) / a)) elif z <= 1.65e+188: tmp = x + (t * (1.0 - (y / z))) elif z <= 2.6e+267: tmp = x * ((y - a) / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e+133) tmp = t; elseif (z <= -7.8e-89) tmp = Float64(x * Float64(1.0 + Float64(y / Float64(z - a)))); elseif (z <= 2.25e+57) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (z <= 1.65e+188) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); elseif (z <= 2.6e+267) tmp = Float64(x * Float64(Float64(y - a) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.5e+133) tmp = t; elseif (z <= -7.8e-89) tmp = x * (1.0 + (y / (z - a))); elseif (z <= 2.25e+57) tmp = x + (y * ((t - x) / a)); elseif (z <= 1.65e+188) tmp = x + (t * (1.0 - (y / z))); elseif (z <= 2.6e+267) tmp = x * ((y - a) / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e+133], t, If[LessEqual[z, -7.8e-89], N[(x * N[(1.0 + N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+57], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+188], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+267], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-89}:\\
\;\;\;\;x \cdot \left(1 + \frac{y}{z - a}\right)\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+57}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+188}:\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+267}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.5e133 or 2.60000000000000002e267 < z Initial program 60.0%
clear-num59.9%
un-div-inv60.1%
Applied egg-rr60.1%
Taylor expanded in z around inf 64.0%
if -5.5e133 < z < -7.79999999999999957e-89Initial program 89.8%
+-commutative89.8%
fma-define89.7%
Simplified89.7%
Taylor expanded in t around 0 51.9%
mul-1-neg51.9%
*-rgt-identity51.9%
associate-/l*57.4%
distribute-rgt-neg-in57.4%
mul-1-neg57.4%
distribute-lft-in57.4%
mul-1-neg57.4%
unsub-neg57.4%
Simplified57.4%
Taylor expanded in y around inf 57.5%
if -7.79999999999999957e-89 < z < 2.24999999999999998e57Initial program 90.9%
Taylor expanded in z around 0 73.0%
associate-/l*78.0%
Simplified78.0%
if 2.24999999999999998e57 < z < 1.64999999999999991e188Initial program 79.3%
clear-num79.6%
un-div-inv79.3%
Applied egg-rr79.3%
Taylor expanded in t around inf 64.7%
Taylor expanded in a around 0 53.5%
mul-1-neg53.5%
unsub-neg53.5%
associate-/l*56.9%
div-sub56.9%
*-inverses56.9%
Simplified56.9%
if 1.64999999999999991e188 < z < 2.60000000000000002e267Initial program 25.7%
+-commutative25.7%
fma-define26.3%
Simplified26.3%
Taylor expanded in t around 0 2.9%
mul-1-neg2.9%
*-rgt-identity2.9%
associate-/l*3.4%
distribute-rgt-neg-in3.4%
mul-1-neg3.4%
distribute-lft-in3.4%
mul-1-neg3.4%
unsub-neg3.4%
Simplified3.4%
Taylor expanded in z around inf 66.3%
mul-1-neg66.3%
mul-1-neg66.3%
sub-neg66.3%
Simplified66.3%
Final simplification69.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.8e+133)
t
(if (<= z -2.35e-89)
(* x (+ 1.0 (/ y (- z a))))
(if (<= z 8.6e-85)
(+ x (* y (/ (- t x) a)))
(if (<= z 3.3e+140) (+ x (* t (/ y (- a z)))) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+133) {
tmp = t;
} else if (z <= -2.35e-89) {
tmp = x * (1.0 + (y / (z - a)));
} else if (z <= 8.6e-85) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 3.3e+140) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.8d+133)) then
tmp = t
else if (z <= (-2.35d-89)) then
tmp = x * (1.0d0 + (y / (z - a)))
else if (z <= 8.6d-85) then
tmp = x + (y * ((t - x) / a))
else if (z <= 3.3d+140) then
tmp = x + (t * (y / (a - z)))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+133) {
tmp = t;
} else if (z <= -2.35e-89) {
tmp = x * (1.0 + (y / (z - a)));
} else if (z <= 8.6e-85) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 3.3e+140) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+133: tmp = t elif z <= -2.35e-89: tmp = x * (1.0 + (y / (z - a))) elif z <= 8.6e-85: tmp = x + (y * ((t - x) / a)) elif z <= 3.3e+140: tmp = x + (t * (y / (a - z))) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+133) tmp = t; elseif (z <= -2.35e-89) tmp = Float64(x * Float64(1.0 + Float64(y / Float64(z - a)))); elseif (z <= 8.6e-85) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (z <= 3.3e+140) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e+133) tmp = t; elseif (z <= -2.35e-89) tmp = x * (1.0 + (y / (z - a))); elseif (z <= 8.6e-85) tmp = x + (y * ((t - x) / a)); elseif (z <= 3.3e+140) tmp = x + (t * (y / (a - z))); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+133], t, If[LessEqual[z, -2.35e-89], N[(x * N[(1.0 + N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.6e-85], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+140], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{-89}:\\
\;\;\;\;x \cdot \left(1 + \frac{y}{z - a}\right)\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{-85}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+140}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.8000000000000002e133 or 3.3000000000000002e140 < z Initial program 56.0%
clear-num55.9%
un-div-inv56.0%
Applied egg-rr56.0%
Taylor expanded in z around inf 54.6%
if -3.8000000000000002e133 < z < -2.34999999999999998e-89Initial program 89.8%
+-commutative89.8%
fma-define89.7%
Simplified89.7%
Taylor expanded in t around 0 51.9%
mul-1-neg51.9%
*-rgt-identity51.9%
associate-/l*57.4%
distribute-rgt-neg-in57.4%
mul-1-neg57.4%
distribute-lft-in57.4%
mul-1-neg57.4%
unsub-neg57.4%
Simplified57.4%
Taylor expanded in y around inf 57.5%
if -2.34999999999999998e-89 < z < 8.59999999999999998e-85Initial program 91.2%
Taylor expanded in z around 0 80.2%
associate-/l*82.9%
Simplified82.9%
if 8.59999999999999998e-85 < z < 3.3000000000000002e140Initial program 85.0%
Taylor expanded in t around inf 67.7%
associate-/l*73.7%
Simplified73.7%
Taylor expanded in y around inf 51.3%
associate-/l*57.3%
Simplified57.3%
Final simplification66.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -150000000000.0)
(- x (* t (/ z (- a z))))
(if (<= z 1.9e+57)
(+ x (* y (/ (- t x) a)))
(if (<= z 3.05e+187)
(+ x (* t (- 1.0 (/ y z))))
(if (<= z 2.6e+267) (* x (/ (- y a) z)) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -150000000000.0) {
tmp = x - (t * (z / (a - z)));
} else if (z <= 1.9e+57) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 3.05e+187) {
tmp = x + (t * (1.0 - (y / z)));
} else if (z <= 2.6e+267) {
tmp = x * ((y - a) / z);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-150000000000.0d0)) then
tmp = x - (t * (z / (a - z)))
else if (z <= 1.9d+57) then
tmp = x + (y * ((t - x) / a))
else if (z <= 3.05d+187) then
tmp = x + (t * (1.0d0 - (y / z)))
else if (z <= 2.6d+267) then
tmp = x * ((y - a) / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -150000000000.0) {
tmp = x - (t * (z / (a - z)));
} else if (z <= 1.9e+57) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 3.05e+187) {
tmp = x + (t * (1.0 - (y / z)));
} else if (z <= 2.6e+267) {
tmp = x * ((y - a) / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -150000000000.0: tmp = x - (t * (z / (a - z))) elif z <= 1.9e+57: tmp = x + (y * ((t - x) / a)) elif z <= 3.05e+187: tmp = x + (t * (1.0 - (y / z))) elif z <= 2.6e+267: tmp = x * ((y - a) / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -150000000000.0) tmp = Float64(x - Float64(t * Float64(z / Float64(a - z)))); elseif (z <= 1.9e+57) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (z <= 3.05e+187) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); elseif (z <= 2.6e+267) tmp = Float64(x * Float64(Float64(y - a) / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -150000000000.0) tmp = x - (t * (z / (a - z))); elseif (z <= 1.9e+57) tmp = x + (y * ((t - x) / a)); elseif (z <= 3.05e+187) tmp = x + (t * (1.0 - (y / z))); elseif (z <= 2.6e+267) tmp = x * ((y - a) / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -150000000000.0], N[(x - N[(t * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+57], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05e+187], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+267], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -150000000000:\\
\;\;\;\;x - t \cdot \frac{z}{a - z}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+57}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+187}:\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+267}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.5e11Initial program 73.4%
clear-num73.4%
un-div-inv73.5%
Applied egg-rr73.5%
Taylor expanded in y around 0 37.4%
mul-1-neg37.4%
associate-*r/55.8%
unsub-neg55.8%
Simplified55.8%
Taylor expanded in t around inf 36.5%
associate-/l*55.1%
Simplified55.1%
if -1.5e11 < z < 1.8999999999999999e57Initial program 91.4%
Taylor expanded in z around 0 69.9%
associate-/l*74.3%
Simplified74.3%
if 1.8999999999999999e57 < z < 3.0499999999999998e187Initial program 79.3%
clear-num79.6%
un-div-inv79.3%
Applied egg-rr79.3%
Taylor expanded in t around inf 64.7%
Taylor expanded in a around 0 53.5%
mul-1-neg53.5%
unsub-neg53.5%
associate-/l*56.9%
div-sub56.9%
*-inverses56.9%
Simplified56.9%
if 3.0499999999999998e187 < z < 2.60000000000000002e267Initial program 25.7%
+-commutative25.7%
fma-define26.3%
Simplified26.3%
Taylor expanded in t around 0 2.9%
mul-1-neg2.9%
*-rgt-identity2.9%
associate-/l*3.4%
distribute-rgt-neg-in3.4%
mul-1-neg3.4%
distribute-lft-in3.4%
mul-1-neg3.4%
unsub-neg3.4%
Simplified3.4%
Taylor expanded in z around inf 66.3%
mul-1-neg66.3%
mul-1-neg66.3%
sub-neg66.3%
Simplified66.3%
if 2.60000000000000002e267 < z Initial program 52.9%
clear-num52.7%
un-div-inv53.2%
Applied egg-rr53.2%
Taylor expanded in z around inf 81.9%
Final simplification67.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.8e+133)
t
(if (<= z -1.9e-115)
(* x (+ 1.0 (/ y (- z a))))
(if (<= z 1.8e+133) (+ x (* t (/ y (- a z)))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e+133) {
tmp = t;
} else if (z <= -1.9e-115) {
tmp = x * (1.0 + (y / (z - a)));
} else if (z <= 1.8e+133) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.8d+133)) then
tmp = t
else if (z <= (-1.9d-115)) then
tmp = x * (1.0d0 + (y / (z - a)))
else if (z <= 1.8d+133) then
tmp = x + (t * (y / (a - z)))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e+133) {
tmp = t;
} else if (z <= -1.9e-115) {
tmp = x * (1.0 + (y / (z - a)));
} else if (z <= 1.8e+133) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e+133: tmp = t elif z <= -1.9e-115: tmp = x * (1.0 + (y / (z - a))) elif z <= 1.8e+133: tmp = x + (t * (y / (a - z))) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e+133) tmp = t; elseif (z <= -1.9e-115) tmp = Float64(x * Float64(1.0 + Float64(y / Float64(z - a)))); elseif (z <= 1.8e+133) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.8e+133) tmp = t; elseif (z <= -1.9e-115) tmp = x * (1.0 + (y / (z - a))); elseif (z <= 1.8e+133) tmp = x + (t * (y / (a - z))); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e+133], t, If[LessEqual[z, -1.9e-115], N[(x * N[(1.0 + N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+133], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-115}:\\
\;\;\;\;x \cdot \left(1 + \frac{y}{z - a}\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+133}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.80000000000000016e133 or 1.79999999999999989e133 < z Initial program 56.0%
clear-num55.9%
un-div-inv56.0%
Applied egg-rr56.0%
Taylor expanded in z around inf 54.6%
if -2.80000000000000016e133 < z < -1.89999999999999996e-115Initial program 89.4%
+-commutative89.4%
fma-define89.4%
Simplified89.4%
Taylor expanded in t around 0 54.5%
mul-1-neg54.5%
*-rgt-identity54.5%
associate-/l*59.2%
distribute-rgt-neg-in59.2%
mul-1-neg59.2%
distribute-lft-in59.2%
mul-1-neg59.2%
unsub-neg59.2%
Simplified59.2%
Taylor expanded in y around inf 59.3%
if -1.89999999999999996e-115 < z < 1.79999999999999989e133Initial program 89.4%
Taylor expanded in t around inf 69.4%
associate-/l*72.6%
Simplified72.6%
Taylor expanded in y around inf 63.0%
associate-/l*66.2%
Simplified66.2%
Final simplification61.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.6e+133)
t
(if (<= z -1.2e-125)
(* x (+ 1.0 (/ y (- z a))))
(if (<= z 1.8e+57) (+ x (* t (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.6e+133) {
tmp = t;
} else if (z <= -1.2e-125) {
tmp = x * (1.0 + (y / (z - a)));
} else if (z <= 1.8e+57) {
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 <= (-6.6d+133)) then
tmp = t
else if (z <= (-1.2d-125)) then
tmp = x * (1.0d0 + (y / (z - a)))
else if (z <= 1.8d+57) 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 <= -6.6e+133) {
tmp = t;
} else if (z <= -1.2e-125) {
tmp = x * (1.0 + (y / (z - a)));
} else if (z <= 1.8e+57) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.6e+133: tmp = t elif z <= -1.2e-125: tmp = x * (1.0 + (y / (z - a))) elif z <= 1.8e+57: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.6e+133) tmp = t; elseif (z <= -1.2e-125) tmp = Float64(x * Float64(1.0 + Float64(y / Float64(z - a)))); elseif (z <= 1.8e+57) 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 <= -6.6e+133) tmp = t; elseif (z <= -1.2e-125) tmp = x * (1.0 + (y / (z - a))); elseif (z <= 1.8e+57) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.6e+133], t, If[LessEqual[z, -1.2e-125], N[(x * N[(1.0 + N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+57], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-125}:\\
\;\;\;\;x \cdot \left(1 + \frac{y}{z - a}\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+57}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.6e133 or 1.8000000000000001e57 < z Initial program 60.9%
clear-num61.0%
un-div-inv61.0%
Applied egg-rr61.0%
Taylor expanded in z around inf 48.1%
if -6.6e133 < z < -1.2000000000000001e-125Initial program 90.5%
+-commutative90.5%
fma-define90.4%
Simplified90.4%
Taylor expanded in t around 0 54.3%
mul-1-neg54.3%
*-rgt-identity54.3%
associate-/l*60.1%
distribute-rgt-neg-in60.1%
mul-1-neg60.1%
distribute-lft-in60.1%
mul-1-neg60.1%
unsub-neg60.1%
Simplified60.1%
Taylor expanded in y around inf 60.2%
if -1.2000000000000001e-125 < z < 1.8000000000000001e57Initial program 90.6%
Taylor expanded in a around inf 73.4%
Taylor expanded in t around inf 63.5%
Taylor expanded in z around 0 62.9%
+-commutative62.9%
associate-/l*67.6%
Simplified67.6%
Final simplification59.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.4e+133)
t
(if (<= z -1.35e-125)
(* x (- 1.0 (/ y a)))
(if (<= z 1.6e+57) (+ x (* t (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+133) {
tmp = t;
} else if (z <= -1.35e-125) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.6e+57) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.4d+133)) then
tmp = t
else if (z <= (-1.35d-125)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.6d+57) then
tmp = x + (t * (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+133) {
tmp = t;
} else if (z <= -1.35e-125) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.6e+57) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e+133: tmp = t elif z <= -1.35e-125: tmp = x * (1.0 - (y / a)) elif z <= 1.6e+57: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+133) tmp = t; elseif (z <= -1.35e-125) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.6e+57) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.4e+133) tmp = t; elseif (z <= -1.35e-125) tmp = x * (1.0 - (y / a)); elseif (z <= 1.6e+57) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+133], t, If[LessEqual[z, -1.35e-125], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+57], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-125}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+57}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.3999999999999999e133 or 1.60000000000000015e57 < z Initial program 60.9%
clear-num61.0%
un-div-inv61.0%
Applied egg-rr61.0%
Taylor expanded in z around inf 48.1%
if -2.3999999999999999e133 < z < -1.3499999999999999e-125Initial program 90.5%
+-commutative90.5%
fma-define90.4%
Simplified90.4%
Taylor expanded in t around 0 54.3%
mul-1-neg54.3%
*-rgt-identity54.3%
associate-/l*60.1%
distribute-rgt-neg-in60.1%
mul-1-neg60.1%
distribute-lft-in60.1%
mul-1-neg60.1%
unsub-neg60.1%
Simplified60.1%
Taylor expanded in z around 0 50.3%
if -1.3499999999999999e-125 < z < 1.60000000000000015e57Initial program 90.6%
Taylor expanded in a around inf 73.4%
Taylor expanded in t around inf 63.5%
Taylor expanded in z around 0 62.9%
+-commutative62.9%
associate-/l*67.6%
Simplified67.6%
Final simplification57.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.3e+133)
t
(if (<= z -2.3e-126)
(* x (- 1.0 (/ y a)))
(if (<= z 1.8e+57) (+ x (/ (* y t) a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.3e+133) {
tmp = t;
} else if (z <= -2.3e-126) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.8e+57) {
tmp = x + ((y * t) / 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 <= (-4.3d+133)) then
tmp = t
else if (z <= (-2.3d-126)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.8d+57) then
tmp = x + ((y * t) / 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 <= -4.3e+133) {
tmp = t;
} else if (z <= -2.3e-126) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.8e+57) {
tmp = x + ((y * t) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.3e+133: tmp = t elif z <= -2.3e-126: tmp = x * (1.0 - (y / a)) elif z <= 1.8e+57: tmp = x + ((y * t) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.3e+133) tmp = t; elseif (z <= -2.3e-126) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.8e+57) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.3e+133) tmp = t; elseif (z <= -2.3e-126) tmp = x * (1.0 - (y / a)); elseif (z <= 1.8e+57) tmp = x + ((y * t) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.3e+133], t, If[LessEqual[z, -2.3e-126], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+57], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-126}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+57}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.29999999999999994e133 or 1.8000000000000001e57 < z Initial program 60.9%
clear-num61.0%
un-div-inv61.0%
Applied egg-rr61.0%
Taylor expanded in z around inf 48.1%
if -4.29999999999999994e133 < z < -2.30000000000000011e-126Initial program 90.5%
+-commutative90.5%
fma-define90.4%
Simplified90.4%
Taylor expanded in t around 0 54.3%
mul-1-neg54.3%
*-rgt-identity54.3%
associate-/l*60.1%
distribute-rgt-neg-in60.1%
mul-1-neg60.1%
distribute-lft-in60.1%
mul-1-neg60.1%
unsub-neg60.1%
Simplified60.1%
Taylor expanded in z around 0 50.3%
if -2.30000000000000011e-126 < z < 1.8000000000000001e57Initial program 90.6%
Taylor expanded in t around inf 70.5%
associate-/l*74.4%
Simplified74.4%
Taylor expanded in z around 0 62.9%
Final simplification55.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.8e+82) (not (<= z 9e+54))) (+ t (* (/ (- t x) z) (- a y))) (+ x (* (- t x) (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.8e+82) || !(z <= 9e+54)) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + ((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 ((z <= (-5.8d+82)) .or. (.not. (z <= 9d+54))) then
tmp = t + (((t - x) / z) * (a - y))
else
tmp = x + ((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 ((z <= -5.8e+82) || !(z <= 9e+54)) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + ((t - x) * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.8e+82) or not (z <= 9e+54): tmp = t + (((t - x) / z) * (a - y)) else: tmp = x + ((t - x) * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.8e+82) || !(z <= 9e+54)) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5.8e+82) || ~((z <= 9e+54))) tmp = t + (((t - x) / z) * (a - y)); else tmp = x + ((t - x) * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.8e+82], N[Not[LessEqual[z, 9e+54]], $MachinePrecision]], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+82} \lor \neg \left(z \leq 9 \cdot 10^{+54}\right):\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -5.8000000000000003e82 or 8.99999999999999968e54 < z Initial program 63.8%
+-commutative63.8%
fma-define63.8%
Simplified63.8%
Taylor expanded in z around inf 65.7%
associate--l+65.7%
distribute-lft-out--65.7%
div-sub65.7%
mul-1-neg65.7%
unsub-neg65.7%
div-sub65.7%
associate-/l*70.7%
associate-/l*85.3%
distribute-rgt-out--85.3%
Simplified85.3%
if -5.8000000000000003e82 < z < 8.99999999999999968e54Initial program 90.6%
Taylor expanded in y around inf 78.2%
*-commutative78.2%
*-lft-identity78.2%
times-frac85.4%
/-rgt-identity85.4%
Simplified85.4%
Final simplification85.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -750000000000.0) (not (<= z 4.1e-94))) (+ x (* t (/ (- y z) (- a z)))) (+ x (* (- t x) (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -750000000000.0) || !(z <= 4.1e-94)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + ((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 ((z <= (-750000000000.0d0)) .or. (.not. (z <= 4.1d-94))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = x + ((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 ((z <= -750000000000.0) || !(z <= 4.1e-94)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + ((t - x) * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -750000000000.0) or not (z <= 4.1e-94): tmp = x + (t * ((y - z) / (a - z))) else: tmp = x + ((t - x) * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -750000000000.0) || !(z <= 4.1e-94)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -750000000000.0) || ~((z <= 4.1e-94))) tmp = x + (t * ((y - z) / (a - z))); else tmp = x + ((t - x) * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -750000000000.0], N[Not[LessEqual[z, 4.1e-94]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -750000000000 \lor \neg \left(z \leq 4.1 \cdot 10^{-94}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -7.5e11 or 4.10000000000000001e-94 < z Initial program 71.8%
Taylor expanded in t around inf 45.3%
associate-/l*62.1%
Simplified62.1%
if -7.5e11 < z < 4.10000000000000001e-94Initial program 92.5%
Taylor expanded in y around inf 88.6%
*-commutative88.6%
*-lft-identity88.6%
times-frac93.3%
/-rgt-identity93.3%
Simplified93.3%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.35e+66) (not (<= x 8.5e+60))) (* x (+ 1.0 (/ (- y z) (- z a)))) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.35e+66) || !(x <= 8.5e+60)) {
tmp = x * (1.0 + ((y - z) / (z - a)));
} 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 ((x <= (-1.35d+66)) .or. (.not. (x <= 8.5d+60))) then
tmp = x * (1.0d0 + ((y - z) / (z - a)))
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 ((x <= -1.35e+66) || !(x <= 8.5e+60)) {
tmp = x * (1.0 + ((y - z) / (z - a)));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.35e+66) or not (x <= 8.5e+60): tmp = x * (1.0 + ((y - z) / (z - a))) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.35e+66) || !(x <= 8.5e+60)) tmp = Float64(x * Float64(1.0 + Float64(Float64(y - z) / Float64(z - a)))); 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 ((x <= -1.35e+66) || ~((x <= 8.5e+60))) tmp = x * (1.0 + ((y - z) / (z - a))); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.35e+66], N[Not[LessEqual[x, 8.5e+60]], $MachinePrecision]], N[(x * N[(1.0 + N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $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}\;x \leq -1.35 \cdot 10^{+66} \lor \neg \left(x \leq 8.5 \cdot 10^{+60}\right):\\
\;\;\;\;x \cdot \left(1 + \frac{y - z}{z - a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -1.35e66 or 8.50000000000000064e60 < x Initial program 70.9%
+-commutative70.9%
fma-define71.0%
Simplified71.0%
Taylor expanded in t around 0 55.4%
mul-1-neg55.4%
*-rgt-identity55.4%
associate-/l*67.2%
distribute-rgt-neg-in67.2%
mul-1-neg67.2%
distribute-lft-in67.3%
mul-1-neg67.3%
unsub-neg67.3%
Simplified67.3%
if -1.35e66 < x < 8.50000000000000064e60Initial program 87.4%
Taylor expanded in t around inf 67.3%
associate-/l*80.2%
Simplified80.2%
Final simplification75.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.9e+134) t (if (<= z 6.2e+57) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+134) {
tmp = t;
} else if (z <= 6.2e+57) {
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 <= (-1.9d+134)) then
tmp = t
else if (z <= 6.2d+57) 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 <= -1.9e+134) {
tmp = t;
} else if (z <= 6.2e+57) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e+134: tmp = t elif z <= 6.2e+57: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e+134) tmp = t; elseif (z <= 6.2e+57) 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 <= -1.9e+134) tmp = t; elseif (z <= 6.2e+57) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e+134], t, If[LessEqual[z, 6.2e+57], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+134}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+57}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.89999999999999999e134 or 6.20000000000000026e57 < z Initial program 60.4%
clear-num60.5%
un-div-inv60.5%
Applied egg-rr60.5%
Taylor expanded in z around inf 48.7%
if -1.89999999999999999e134 < z < 6.20000000000000026e57Initial program 90.6%
+-commutative90.6%
fma-define90.7%
Simplified90.7%
Taylor expanded in t around 0 55.9%
mul-1-neg55.9%
*-rgt-identity55.9%
associate-/l*62.1%
distribute-rgt-neg-in62.1%
mul-1-neg62.1%
distribute-lft-in62.1%
mul-1-neg62.1%
unsub-neg62.1%
Simplified62.1%
Taylor expanded in z around 0 55.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.5e-37) x (if (<= a 4.6e-65) (* x (/ y z)) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e-37) {
tmp = x;
} else if (a <= 4.6e-65) {
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 (a <= (-6.5d-37)) then
tmp = x
else if (a <= 4.6d-65) 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 (a <= -6.5e-37) {
tmp = x;
} else if (a <= 4.6e-65) {
tmp = x * (y / z);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.5e-37: tmp = x elif a <= 4.6e-65: tmp = x * (y / z) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.5e-37) tmp = x; elseif (a <= 4.6e-65) 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 (a <= -6.5e-37) tmp = x; elseif (a <= 4.6e-65) tmp = x * (y / z); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.5e-37], x, If[LessEqual[a, 4.6e-65], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-65}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if a < -6.5000000000000001e-37Initial program 86.5%
+-commutative86.5%
fma-define86.4%
Simplified86.4%
Taylor expanded in a around inf 45.4%
if -6.5000000000000001e-37 < a < 4.5999999999999999e-65Initial program 73.5%
+-commutative73.5%
fma-define73.7%
Simplified73.7%
Taylor expanded in t around 0 35.5%
mul-1-neg35.5%
*-rgt-identity35.5%
associate-/l*39.9%
distribute-rgt-neg-in39.9%
mul-1-neg39.9%
distribute-lft-in39.8%
mul-1-neg39.8%
unsub-neg39.8%
Simplified39.8%
Taylor expanded in a around 0 40.5%
if 4.5999999999999999e-65 < a Initial program 86.7%
Taylor expanded in t around inf 60.9%
associate-/l*77.6%
Simplified77.6%
Taylor expanded in z around inf 49.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -4e+120) t (if (<= z 8e+55) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+120) {
tmp = t;
} else if (z <= 8e+55) {
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 <= (-4d+120)) then
tmp = t
else if (z <= 8d+55) 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 <= -4e+120) {
tmp = t;
} else if (z <= 8e+55) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e+120: tmp = t elif z <= 8e+55: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+120) tmp = t; elseif (z <= 8e+55) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e+120) tmp = t; elseif (z <= 8e+55) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+120], t, If[LessEqual[z, 8e+55], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+120}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+55}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.9999999999999999e120 or 8.00000000000000008e55 < z Initial program 61.9%
clear-num61.9%
un-div-inv61.9%
Applied egg-rr61.9%
Taylor expanded in z around inf 47.1%
if -3.9999999999999999e120 < z < 8.00000000000000008e55Initial program 90.4%
+-commutative90.4%
fma-define90.5%
Simplified90.5%
Taylor expanded in a around inf 37.6%
(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 81.2%
clear-num81.2%
un-div-inv81.6%
Applied egg-rr81.6%
Taylor expanded in z around inf 22.3%
herbie shell --seed 2024181
(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)))))