
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 84.3%
+-commutative84.3%
associate-*r/98.1%
fma-def98.1%
Simplified98.1%
fma-udef98.1%
Applied egg-rr98.1%
Final simplification98.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z a)))))
(if (<= a -3.3e-124)
t_1
(if (<= a -8e-190)
(+ y x)
(if (<= a -2.6e-190)
(/ (* y z) (- a t))
(if (<= a 2.4e-211)
(- x (/ z (/ t y)))
(if (<= a 1.6e-94)
(+ y x)
(if (<= a 7.5e-40) (- x (/ y (/ t z))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / a));
double tmp;
if (a <= -3.3e-124) {
tmp = t_1;
} else if (a <= -8e-190) {
tmp = y + x;
} else if (a <= -2.6e-190) {
tmp = (y * z) / (a - t);
} else if (a <= 2.4e-211) {
tmp = x - (z / (t / y));
} else if (a <= 1.6e-94) {
tmp = y + x;
} else if (a <= 7.5e-40) {
tmp = x - (y / (t / 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 = x + (y * (z / a))
if (a <= (-3.3d-124)) then
tmp = t_1
else if (a <= (-8d-190)) then
tmp = y + x
else if (a <= (-2.6d-190)) then
tmp = (y * z) / (a - t)
else if (a <= 2.4d-211) then
tmp = x - (z / (t / y))
else if (a <= 1.6d-94) then
tmp = y + x
else if (a <= 7.5d-40) then
tmp = x - (y / (t / 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 = x + (y * (z / a));
double tmp;
if (a <= -3.3e-124) {
tmp = t_1;
} else if (a <= -8e-190) {
tmp = y + x;
} else if (a <= -2.6e-190) {
tmp = (y * z) / (a - t);
} else if (a <= 2.4e-211) {
tmp = x - (z / (t / y));
} else if (a <= 1.6e-94) {
tmp = y + x;
} else if (a <= 7.5e-40) {
tmp = x - (y / (t / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / a)) tmp = 0 if a <= -3.3e-124: tmp = t_1 elif a <= -8e-190: tmp = y + x elif a <= -2.6e-190: tmp = (y * z) / (a - t) elif a <= 2.4e-211: tmp = x - (z / (t / y)) elif a <= 1.6e-94: tmp = y + x elif a <= 7.5e-40: tmp = x - (y / (t / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / a))) tmp = 0.0 if (a <= -3.3e-124) tmp = t_1; elseif (a <= -8e-190) tmp = Float64(y + x); elseif (a <= -2.6e-190) tmp = Float64(Float64(y * z) / Float64(a - t)); elseif (a <= 2.4e-211) tmp = Float64(x - Float64(z / Float64(t / y))); elseif (a <= 1.6e-94) tmp = Float64(y + x); elseif (a <= 7.5e-40) tmp = Float64(x - Float64(y / Float64(t / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / a)); tmp = 0.0; if (a <= -3.3e-124) tmp = t_1; elseif (a <= -8e-190) tmp = y + x; elseif (a <= -2.6e-190) tmp = (y * z) / (a - t); elseif (a <= 2.4e-211) tmp = x - (z / (t / y)); elseif (a <= 1.6e-94) tmp = y + x; elseif (a <= 7.5e-40) tmp = x - (y / (t / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.3e-124], t$95$1, If[LessEqual[a, -8e-190], N[(y + x), $MachinePrecision], If[LessEqual[a, -2.6e-190], N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e-211], N[(x - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e-94], N[(y + x), $MachinePrecision], If[LessEqual[a, 7.5e-40], N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -3.3 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -8 \cdot 10^{-190}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -2.6 \cdot 10^{-190}:\\
\;\;\;\;\frac{y \cdot z}{a - t}\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-211}:\\
\;\;\;\;x - \frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-94}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-40}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -3.29999999999999984e-124 or 7.50000000000000069e-40 < a Initial program 83.2%
+-commutative83.2%
associate-*r/99.3%
fma-def99.3%
Simplified99.3%
fma-udef99.3%
Applied egg-rr99.3%
Taylor expanded in t around 0 79.2%
if -3.29999999999999984e-124 < a < -8.0000000000000002e-190 or 2.4000000000000002e-211 < a < 1.59999999999999998e-94Initial program 77.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around inf 75.2%
if -8.0000000000000002e-190 < a < -2.5999999999999998e-190Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around inf 100.0%
if -2.5999999999999998e-190 < a < 2.4000000000000002e-211Initial program 94.1%
associate-*l/92.2%
Simplified92.2%
Taylor expanded in z around inf 88.3%
associate-*l/82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in a around 0 77.1%
+-commutative77.1%
mul-1-neg77.1%
associate-*r/74.5%
sub-neg74.5%
*-commutative74.5%
associate-/r/76.3%
Simplified76.3%
if 1.59999999999999998e-94 < a < 7.50000000000000069e-40Initial program 76.4%
+-commutative76.4%
associate-*r/99.6%
fma-def99.4%
Simplified99.4%
fma-udef99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 88.2%
Taylor expanded in a around 0 76.5%
+-commutative76.5%
mul-1-neg76.5%
unsub-neg76.5%
associate-/l*88.1%
Simplified88.1%
Final simplification78.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z a)))))
(if (<= a -8e-122)
t_1
(if (<= a -4.3e-190)
(+ y x)
(if (<= a -2.9e-190)
(/ (* y z) (- a t))
(if (<= a 8e-218)
(- x (/ (* y z) t))
(if (<= a 5.1e-98)
(+ y x)
(if (<= a 7.2e-42) (- x (/ y (/ t z))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / a));
double tmp;
if (a <= -8e-122) {
tmp = t_1;
} else if (a <= -4.3e-190) {
tmp = y + x;
} else if (a <= -2.9e-190) {
tmp = (y * z) / (a - t);
} else if (a <= 8e-218) {
tmp = x - ((y * z) / t);
} else if (a <= 5.1e-98) {
tmp = y + x;
} else if (a <= 7.2e-42) {
tmp = x - (y / (t / 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 = x + (y * (z / a))
if (a <= (-8d-122)) then
tmp = t_1
else if (a <= (-4.3d-190)) then
tmp = y + x
else if (a <= (-2.9d-190)) then
tmp = (y * z) / (a - t)
else if (a <= 8d-218) then
tmp = x - ((y * z) / t)
else if (a <= 5.1d-98) then
tmp = y + x
else if (a <= 7.2d-42) then
tmp = x - (y / (t / 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 = x + (y * (z / a));
double tmp;
if (a <= -8e-122) {
tmp = t_1;
} else if (a <= -4.3e-190) {
tmp = y + x;
} else if (a <= -2.9e-190) {
tmp = (y * z) / (a - t);
} else if (a <= 8e-218) {
tmp = x - ((y * z) / t);
} else if (a <= 5.1e-98) {
tmp = y + x;
} else if (a <= 7.2e-42) {
tmp = x - (y / (t / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / a)) tmp = 0 if a <= -8e-122: tmp = t_1 elif a <= -4.3e-190: tmp = y + x elif a <= -2.9e-190: tmp = (y * z) / (a - t) elif a <= 8e-218: tmp = x - ((y * z) / t) elif a <= 5.1e-98: tmp = y + x elif a <= 7.2e-42: tmp = x - (y / (t / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / a))) tmp = 0.0 if (a <= -8e-122) tmp = t_1; elseif (a <= -4.3e-190) tmp = Float64(y + x); elseif (a <= -2.9e-190) tmp = Float64(Float64(y * z) / Float64(a - t)); elseif (a <= 8e-218) tmp = Float64(x - Float64(Float64(y * z) / t)); elseif (a <= 5.1e-98) tmp = Float64(y + x); elseif (a <= 7.2e-42) tmp = Float64(x - Float64(y / Float64(t / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / a)); tmp = 0.0; if (a <= -8e-122) tmp = t_1; elseif (a <= -4.3e-190) tmp = y + x; elseif (a <= -2.9e-190) tmp = (y * z) / (a - t); elseif (a <= 8e-218) tmp = x - ((y * z) / t); elseif (a <= 5.1e-98) tmp = y + x; elseif (a <= 7.2e-42) tmp = x - (y / (t / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8e-122], t$95$1, If[LessEqual[a, -4.3e-190], N[(y + x), $MachinePrecision], If[LessEqual[a, -2.9e-190], N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8e-218], N[(x - N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.1e-98], N[(y + x), $MachinePrecision], If[LessEqual[a, 7.2e-42], N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -8 \cdot 10^{-122}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -4.3 \cdot 10^{-190}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-190}:\\
\;\;\;\;\frac{y \cdot z}{a - t}\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-218}:\\
\;\;\;\;x - \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 5.1 \cdot 10^{-98}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-42}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -8.00000000000000047e-122 or 7.2000000000000004e-42 < a Initial program 83.2%
+-commutative83.2%
associate-*r/99.3%
fma-def99.3%
Simplified99.3%
fma-udef99.3%
Applied egg-rr99.3%
Taylor expanded in t around 0 79.2%
if -8.00000000000000047e-122 < a < -4.3e-190 or 8.0000000000000003e-218 < a < 5.10000000000000022e-98Initial program 77.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around inf 75.2%
if -4.3e-190 < a < -2.9000000000000002e-190Initial program 100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around inf 100.0%
if -2.9000000000000002e-190 < a < 8.0000000000000003e-218Initial program 94.1%
+-commutative94.1%
associate-*r/94.3%
fma-def94.3%
Simplified94.3%
fma-udef94.3%
Applied egg-rr94.3%
Taylor expanded in z around inf 84.8%
Taylor expanded in a around 0 77.1%
associate-*r/77.1%
neg-mul-177.1%
distribute-rgt-neg-in77.1%
Simplified77.1%
if 5.10000000000000022e-98 < a < 7.2000000000000004e-42Initial program 76.4%
+-commutative76.4%
associate-*r/99.6%
fma-def99.4%
Simplified99.4%
fma-udef99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 88.2%
Taylor expanded in a around 0 76.5%
+-commutative76.5%
mul-1-neg76.5%
unsub-neg76.5%
associate-/l*88.1%
Simplified88.1%
Final simplification78.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.9e-66)
(+ x (* y (/ z (- a t))))
(if (<= z 9e-89)
(- x (/ y (+ (/ a t) -1.0)))
(if (or (<= z 6.6e-28) (not (<= z 7.2e+22)))
(+ x (* z (/ y (- a t))))
(* y (/ (- z t) (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.9e-66) {
tmp = x + (y * (z / (a - t)));
} else if (z <= 9e-89) {
tmp = x - (y / ((a / t) + -1.0));
} else if ((z <= 6.6e-28) || !(z <= 7.2e+22)) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y * ((z - t) / (a - 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.9d-66)) then
tmp = x + (y * (z / (a - t)))
else if (z <= 9d-89) then
tmp = x - (y / ((a / t) + (-1.0d0)))
else if ((z <= 6.6d-28) .or. (.not. (z <= 7.2d+22))) then
tmp = x + (z * (y / (a - t)))
else
tmp = y * ((z - t) / (a - 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.9e-66) {
tmp = x + (y * (z / (a - t)));
} else if (z <= 9e-89) {
tmp = x - (y / ((a / t) + -1.0));
} else if ((z <= 6.6e-28) || !(z <= 7.2e+22)) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.9e-66: tmp = x + (y * (z / (a - t))) elif z <= 9e-89: tmp = x - (y / ((a / t) + -1.0)) elif (z <= 6.6e-28) or not (z <= 7.2e+22): tmp = x + (z * (y / (a - t))) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.9e-66) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); elseif (z <= 9e-89) tmp = Float64(x - Float64(y / Float64(Float64(a / t) + -1.0))); elseif ((z <= 6.6e-28) || !(z <= 7.2e+22)) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.9e-66) tmp = x + (y * (z / (a - t))); elseif (z <= 9e-89) tmp = x - (y / ((a / t) + -1.0)); elseif ((z <= 6.6e-28) || ~((z <= 7.2e+22))) tmp = x + (z * (y / (a - t))); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.9e-66], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-89], N[(x - N[(y / N[(N[(a / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 6.6e-28], N[Not[LessEqual[z, 7.2e+22]], $MachinePrecision]], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-66}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-89}:\\
\;\;\;\;x - \frac{y}{\frac{a}{t} + -1}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-28} \lor \neg \left(z \leq 7.2 \cdot 10^{+22}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if z < -3.89999999999999983e-66Initial program 87.1%
+-commutative87.1%
associate-*r/97.6%
fma-def97.6%
Simplified97.6%
fma-udef97.6%
Applied egg-rr97.6%
Taylor expanded in z around inf 86.1%
if -3.89999999999999983e-66 < z < 8.9999999999999998e-89Initial program 85.0%
+-commutative85.0%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 80.8%
+-commutative80.8%
mul-1-neg80.8%
unsub-neg80.8%
associate-/l*94.6%
div-sub94.6%
sub-neg94.6%
*-inverses94.6%
metadata-eval94.6%
Simplified94.6%
if 8.9999999999999998e-89 < z < 6.6000000000000003e-28 or 7.2e22 < z Initial program 83.4%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in z around inf 82.2%
associate-*l/93.6%
*-commutative93.6%
Simplified93.6%
if 6.6000000000000003e-28 < z < 7.2e22Initial program 62.8%
associate-*l/99.5%
Simplified99.5%
Taylor expanded in x around 0 53.6%
associate-*l/90.8%
Applied egg-rr90.8%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ y (/ t z)))))
(if (<= a -5.4e-142)
(+ x (* z (/ y a)))
(if (<= a 9.1e-209)
t_1
(if (<= a 2.35e-94)
(+ y x)
(if (<= a 5.4e-42) t_1 (+ x (* y (/ z a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (t / z));
double tmp;
if (a <= -5.4e-142) {
tmp = x + (z * (y / a));
} else if (a <= 9.1e-209) {
tmp = t_1;
} else if (a <= 2.35e-94) {
tmp = y + x;
} else if (a <= 5.4e-42) {
tmp = t_1;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y / (t / z))
if (a <= (-5.4d-142)) then
tmp = x + (z * (y / a))
else if (a <= 9.1d-209) then
tmp = t_1
else if (a <= 2.35d-94) then
tmp = y + x
else if (a <= 5.4d-42) then
tmp = t_1
else
tmp = x + (y * (z / a))
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 / (t / z));
double tmp;
if (a <= -5.4e-142) {
tmp = x + (z * (y / a));
} else if (a <= 9.1e-209) {
tmp = t_1;
} else if (a <= 2.35e-94) {
tmp = y + x;
} else if (a <= 5.4e-42) {
tmp = t_1;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y / (t / z)) tmp = 0 if a <= -5.4e-142: tmp = x + (z * (y / a)) elif a <= 9.1e-209: tmp = t_1 elif a <= 2.35e-94: tmp = y + x elif a <= 5.4e-42: tmp = t_1 else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y / Float64(t / z))) tmp = 0.0 if (a <= -5.4e-142) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (a <= 9.1e-209) tmp = t_1; elseif (a <= 2.35e-94) tmp = Float64(y + x); elseif (a <= 5.4e-42) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y / (t / z)); tmp = 0.0; if (a <= -5.4e-142) tmp = x + (z * (y / a)); elseif (a <= 9.1e-209) tmp = t_1; elseif (a <= 2.35e-94) tmp = y + x; elseif (a <= 5.4e-42) tmp = t_1; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.4e-142], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.1e-209], t$95$1, If[LessEqual[a, 2.35e-94], N[(y + x), $MachinePrecision], If[LessEqual[a, 5.4e-42], t$95$1, N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{t}{z}}\\
\mathbf{if}\;a \leq -5.4 \cdot 10^{-142}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq 9.1 \cdot 10^{-209}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{-94}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < -5.3999999999999996e-142Initial program 81.9%
+-commutative81.9%
associate-*r/98.8%
fma-def98.8%
Simplified98.8%
fma-udef98.8%
Applied egg-rr98.8%
Taylor expanded in t around 0 70.2%
associate-*l/77.8%
*-commutative77.8%
Simplified77.8%
if -5.3999999999999996e-142 < a < 9.09999999999999972e-209 or 2.35000000000000002e-94 < a < 5.39999999999999998e-42Initial program 89.2%
+-commutative89.2%
associate-*r/94.6%
fma-def94.6%
Simplified94.6%
fma-udef94.6%
Applied egg-rr94.6%
Taylor expanded in z around inf 81.2%
Taylor expanded in a around 0 74.4%
+-commutative74.4%
mul-1-neg74.4%
unsub-neg74.4%
associate-/l*73.8%
Simplified73.8%
if 9.09999999999999972e-209 < a < 2.35000000000000002e-94Initial program 81.0%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around inf 69.8%
if 5.39999999999999998e-42 < a Initial program 83.7%
+-commutative83.7%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 78.6%
Final simplification76.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.4e-142)
(+ x (* z (/ y a)))
(if (<= a 3.65e-208)
(- x (/ z (/ t y)))
(if (<= a 1.2e-93)
(+ y x)
(if (<= a 1.55e-41) (- x (/ y (/ t z))) (+ x (* y (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.4e-142) {
tmp = x + (z * (y / a));
} else if (a <= 3.65e-208) {
tmp = x - (z / (t / y));
} else if (a <= 1.2e-93) {
tmp = y + x;
} else if (a <= 1.55e-41) {
tmp = x - (y / (t / z));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5.4d-142)) then
tmp = x + (z * (y / a))
else if (a <= 3.65d-208) then
tmp = x - (z / (t / y))
else if (a <= 1.2d-93) then
tmp = y + x
else if (a <= 1.55d-41) then
tmp = x - (y / (t / z))
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.4e-142) {
tmp = x + (z * (y / a));
} else if (a <= 3.65e-208) {
tmp = x - (z / (t / y));
} else if (a <= 1.2e-93) {
tmp = y + x;
} else if (a <= 1.55e-41) {
tmp = x - (y / (t / z));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.4e-142: tmp = x + (z * (y / a)) elif a <= 3.65e-208: tmp = x - (z / (t / y)) elif a <= 1.2e-93: tmp = y + x elif a <= 1.55e-41: tmp = x - (y / (t / z)) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.4e-142) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (a <= 3.65e-208) tmp = Float64(x - Float64(z / Float64(t / y))); elseif (a <= 1.2e-93) tmp = Float64(y + x); elseif (a <= 1.55e-41) tmp = Float64(x - Float64(y / Float64(t / z))); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.4e-142) tmp = x + (z * (y / a)); elseif (a <= 3.65e-208) tmp = x - (z / (t / y)); elseif (a <= 1.2e-93) tmp = y + x; elseif (a <= 1.55e-41) tmp = x - (y / (t / z)); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.4e-142], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.65e-208], N[(x - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e-93], N[(y + x), $MachinePrecision], If[LessEqual[a, 1.55e-41], N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{-142}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq 3.65 \cdot 10^{-208}:\\
\;\;\;\;x - \frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-93}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-41}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < -5.3999999999999996e-142Initial program 81.9%
+-commutative81.9%
associate-*r/98.8%
fma-def98.8%
Simplified98.8%
fma-udef98.8%
Applied egg-rr98.8%
Taylor expanded in t around 0 70.2%
associate-*l/77.8%
*-commutative77.8%
Simplified77.8%
if -5.3999999999999996e-142 < a < 3.65000000000000001e-208Initial program 90.8%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in z around inf 84.6%
associate-*l/80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in a around 0 74.1%
+-commutative74.1%
mul-1-neg74.1%
associate-*r/72.0%
sub-neg72.0%
*-commutative72.0%
associate-/r/73.4%
Simplified73.4%
if 3.65000000000000001e-208 < a < 1.2000000000000001e-93Initial program 81.0%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around inf 69.8%
if 1.2000000000000001e-93 < a < 1.55e-41Initial program 76.4%
+-commutative76.4%
associate-*r/99.6%
fma-def99.4%
Simplified99.4%
fma-udef99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 88.2%
Taylor expanded in a around 0 76.5%
+-commutative76.5%
mul-1-neg76.5%
unsub-neg76.5%
associate-/l*88.1%
Simplified88.1%
if 1.55e-41 < a Initial program 83.7%
+-commutative83.7%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 78.6%
Final simplification76.5%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.45e+16)
(+ y x)
(if (<= x 5.2e-82)
(* y (/ (- z t) (- a t)))
(if (<= x 3.1e+32)
(+ x (* z (/ y a)))
(if (<= x 1.55e+192) (- x (/ z (/ t y))) (+ x (* y (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.45e+16) {
tmp = y + x;
} else if (x <= 5.2e-82) {
tmp = y * ((z - t) / (a - t));
} else if (x <= 3.1e+32) {
tmp = x + (z * (y / a));
} else if (x <= 1.55e+192) {
tmp = x - (z / (t / y));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.45d+16)) then
tmp = y + x
else if (x <= 5.2d-82) then
tmp = y * ((z - t) / (a - t))
else if (x <= 3.1d+32) then
tmp = x + (z * (y / a))
else if (x <= 1.55d+192) then
tmp = x - (z / (t / y))
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.45e+16) {
tmp = y + x;
} else if (x <= 5.2e-82) {
tmp = y * ((z - t) / (a - t));
} else if (x <= 3.1e+32) {
tmp = x + (z * (y / a));
} else if (x <= 1.55e+192) {
tmp = x - (z / (t / y));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.45e+16: tmp = y + x elif x <= 5.2e-82: tmp = y * ((z - t) / (a - t)) elif x <= 3.1e+32: tmp = x + (z * (y / a)) elif x <= 1.55e+192: tmp = x - (z / (t / y)) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.45e+16) tmp = Float64(y + x); elseif (x <= 5.2e-82) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (x <= 3.1e+32) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (x <= 1.55e+192) tmp = Float64(x - Float64(z / Float64(t / y))); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.45e+16) tmp = y + x; elseif (x <= 5.2e-82) tmp = y * ((z - t) / (a - t)); elseif (x <= 3.1e+32) tmp = x + (z * (y / a)); elseif (x <= 1.55e+192) tmp = x - (z / (t / y)); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.45e+16], N[(y + x), $MachinePrecision], If[LessEqual[x, 5.2e-82], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e+32], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.55e+192], N[(x - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+16}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-82}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+32}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+192}:\\
\;\;\;\;x - \frac{z}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if x < -1.45e16Initial program 72.8%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in t around inf 79.2%
if -1.45e16 < x < 5.2e-82Initial program 88.5%
associate-*l/93.6%
Simplified93.6%
Taylor expanded in x around 0 69.7%
associate-*l/78.7%
Applied egg-rr78.7%
if 5.2e-82 < x < 3.09999999999999993e32Initial program 91.2%
+-commutative91.2%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 78.5%
associate-*l/78.5%
*-commutative78.5%
Simplified78.5%
if 3.09999999999999993e32 < x < 1.5499999999999999e192Initial program 89.2%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 83.8%
associate-*l/89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in a around 0 75.4%
+-commutative75.4%
mul-1-neg75.4%
associate-*r/75.4%
sub-neg75.4%
*-commutative75.4%
associate-/r/78.0%
Simplified78.0%
if 1.5499999999999999e192 < x Initial program 80.1%
+-commutative80.1%
associate-*r/96.3%
fma-def96.3%
Simplified96.3%
fma-udef96.3%
Applied egg-rr96.3%
Taylor expanded in t around 0 92.4%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9e+84) (not (<= y 9.2e+145))) (* y (/ (- z t) (- a t))) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9e+84) || !(y <= 9.2e+145)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z * (y / (a - 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 <= (-9d+84)) .or. (.not. (y <= 9.2d+145))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (z * (y / (a - 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 <= -9e+84) || !(y <= 9.2e+145)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9e+84) or not (y <= 9.2e+145): tmp = y * ((z - t) / (a - t)) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9e+84) || !(y <= 9.2e+145)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9e+84) || ~((y <= 9.2e+145))) tmp = y * ((z - t) / (a - t)); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9e+84], N[Not[LessEqual[y, 9.2e+145]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+84} \lor \neg \left(y \leq 9.2 \cdot 10^{+145}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if y < -8.9999999999999994e84 or 9.2e145 < y Initial program 66.6%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in x around 0 58.6%
associate-*l/83.5%
Applied egg-rr83.5%
if -8.9999999999999994e84 < y < 9.2e145Initial program 92.3%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in z around inf 84.0%
associate-*l/85.6%
*-commutative85.6%
Simplified85.6%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.4e+85) (not (<= y 5.2e+147))) (* y (/ (- z t) (- a t))) (+ x (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.4e+85) || !(y <= 5.2e+147)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (y / ((a - t) / 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 ((y <= (-3.4d+85)) .or. (.not. (y <= 5.2d+147))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (y / ((a - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.4e+85) || !(y <= 5.2e+147)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.4e+85) or not (y <= 5.2e+147): tmp = y * ((z - t) / (a - t)) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.4e+85) || !(y <= 5.2e+147)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.4e+85) || ~((y <= 5.2e+147))) tmp = y * ((z - t) / (a - t)); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.4e+85], N[Not[LessEqual[y, 5.2e+147]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+85} \lor \neg \left(y \leq 5.2 \cdot 10^{+147}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if y < -3.4000000000000003e85 or 5.1999999999999997e147 < y Initial program 66.6%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in x around 0 58.6%
associate-*l/83.5%
Applied egg-rr83.5%
if -3.4000000000000003e85 < y < 5.1999999999999997e147Initial program 92.3%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in z around inf 85.6%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.4e+85) (not (<= y 6.2e+149))) (* y (/ (- z t) (- a t))) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.4e+85) || !(y <= 6.2e+149)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (y * (z / (a - 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 <= (-3.4d+85)) .or. (.not. (y <= 6.2d+149))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (y * (z / (a - 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 <= -3.4e+85) || !(y <= 6.2e+149)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.4e+85) or not (y <= 6.2e+149): tmp = y * ((z - t) / (a - t)) else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.4e+85) || !(y <= 6.2e+149)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.4e+85) || ~((y <= 6.2e+149))) tmp = y * ((z - t) / (a - t)); else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.4e+85], N[Not[LessEqual[y, 6.2e+149]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+85} \lor \neg \left(y \leq 6.2 \cdot 10^{+149}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if y < -3.4000000000000003e85 or 6.19999999999999974e149 < y Initial program 66.6%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in x around 0 58.6%
associate-*l/83.5%
Applied egg-rr83.5%
if -3.4000000000000003e85 < y < 6.19999999999999974e149Initial program 92.3%
+-commutative92.3%
associate-*r/97.3%
fma-def97.3%
Simplified97.3%
fma-udef97.3%
Applied egg-rr97.3%
Taylor expanded in z around inf 85.7%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.5e+119) (not (<= t 8.5e+78))) (+ y x) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.5e+119) || !(t <= 8.5e+78)) {
tmp = y + x;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.5d+119)) .or. (.not. (t <= 8.5d+78))) then
tmp = y + x
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.5e+119) || !(t <= 8.5e+78)) {
tmp = y + x;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.5e+119) or not (t <= 8.5e+78): tmp = y + x else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.5e+119) || !(t <= 8.5e+78)) tmp = Float64(y + x); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.5e+119) || ~((t <= 8.5e+78))) tmp = y + x; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.5e+119], N[Not[LessEqual[t, 8.5e+78]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+119} \lor \neg \left(t \leq 8.5 \cdot 10^{+78}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -2.5e119 or 8.50000000000000079e78 < t Initial program 64.4%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in t around inf 84.4%
if -2.5e119 < t < 8.50000000000000079e78Initial program 92.1%
+-commutative92.1%
associate-*r/97.3%
fma-def97.3%
Simplified97.3%
fma-udef97.3%
Applied egg-rr97.3%
Taylor expanded in t around 0 69.1%
Final simplification73.4%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((z - t) * (y / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a - t}
\end{array}
Initial program 84.3%
associate-*l/96.7%
Simplified96.7%
Final simplification96.7%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
Initial program 84.3%
associate-/l*98.1%
Simplified98.1%
Final simplification98.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.1e+142) x (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.1e+142) {
tmp = x;
} else {
tmp = y + 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 <= (-2.1d+142)) then
tmp = x
else
tmp = y + 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 <= -2.1e+142) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.1e+142: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.1e+142) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.1e+142) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.1e+142], x, N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{+142}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -2.1e142Initial program 67.9%
associate-*l/96.9%
Simplified96.9%
Taylor expanded in x around inf 70.5%
if -2.1e142 < a Initial program 86.8%
associate-*l/96.6%
Simplified96.6%
Taylor expanded in t around inf 56.1%
Final simplification57.9%
(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 84.3%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in x around inf 46.7%
Final simplification46.7%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2023195
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))