
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= (/ (- z t) (- z a)) 4e+192) (- x (* y (/ (- z t) (- a z)))) (+ x (/ (* y t) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) / (z - a)) <= 4e+192) {
tmp = x - (y * ((z - t) / (a - z)));
} else {
tmp = x + ((y * t) / (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 - t) / (z - a)) <= 4d+192) then
tmp = x - (y * ((z - t) / (a - z)))
else
tmp = x + ((y * t) / (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 - t) / (z - a)) <= 4e+192) {
tmp = x - (y * ((z - t) / (a - z)));
} else {
tmp = x + ((y * t) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) / (z - a)) <= 4e+192: tmp = x - (y * ((z - t) / (a - z))) else: tmp = x + ((y * t) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(z - t) / Float64(z - a)) <= 4e+192) tmp = Float64(x - Float64(y * Float64(Float64(z - t) / Float64(a - z)))); else tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) / (z - a)) <= 4e+192) tmp = x - (y * ((z - t) / (a - z))); else tmp = x + ((y * t) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], 4e+192], N[(x - N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z - t}{z - a} \leq 4 \cdot 10^{+192}:\\
\;\;\;\;x - y \cdot \frac{z - t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < 4.00000000000000016e192Initial program 99.1%
if 4.00000000000000016e192 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 76.8%
clear-num76.6%
un-div-inv92.8%
Applied egg-rr92.8%
Taylor expanded in t around inf 99.9%
mul-1-neg99.9%
associate-/l*99.8%
distribute-lft-neg-out99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 99.9%
mul-1-neg99.9%
*-commutative99.9%
associate-*r/76.8%
sub-neg76.8%
*-commutative76.8%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in t around 0 99.9%
Final simplification99.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- z a))))))
(if (<= z -1.95e+36)
t_1
(if (<= z -5.2e-140)
(- x (/ (* y t) z))
(if (<= z 1.6e-52) (+ x (* t (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -1.95e+36) {
tmp = t_1;
} else if (z <= -5.2e-140) {
tmp = x - ((y * t) / z);
} else if (z <= 1.6e-52) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / (z - a)))
if (z <= (-1.95d+36)) then
tmp = t_1
else if (z <= (-5.2d-140)) then
tmp = x - ((y * t) / z)
else if (z <= 1.6d-52) then
tmp = x + (t * (y / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (z - a)));
double tmp;
if (z <= -1.95e+36) {
tmp = t_1;
} else if (z <= -5.2e-140) {
tmp = x - ((y * t) / z);
} else if (z <= 1.6e-52) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (z - a))) tmp = 0 if z <= -1.95e+36: tmp = t_1 elif z <= -5.2e-140: tmp = x - ((y * t) / z) elif z <= 1.6e-52: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a)))) tmp = 0.0 if (z <= -1.95e+36) tmp = t_1; elseif (z <= -5.2e-140) tmp = Float64(x - Float64(Float64(y * t) / z)); elseif (z <= 1.6e-52) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (z - a))); tmp = 0.0; if (z <= -1.95e+36) tmp = t_1; elseif (z <= -5.2e-140) tmp = x - ((y * t) / z); elseif (z <= 1.6e-52) tmp = x + (t * (y / a)); 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 / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+36], t$95$1, If[LessEqual[z, -5.2e-140], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-52], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-140}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-52}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9500000000000001e36 or 1.60000000000000005e-52 < z Initial program 100.0%
Taylor expanded in t around 0 74.9%
associate-/l*88.2%
Simplified88.2%
if -1.9500000000000001e36 < z < -5.1999999999999996e-140Initial program 97.2%
clear-num97.3%
un-div-inv97.3%
Applied egg-rr97.3%
Taylor expanded in t around inf 85.9%
mul-1-neg85.9%
associate-/l*85.9%
distribute-lft-neg-out85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in x around 0 85.9%
mul-1-neg85.9%
*-commutative85.9%
associate-*r/83.2%
sub-neg83.2%
*-commutative83.2%
associate-/r/86.1%
Simplified86.1%
Taylor expanded in z around inf 78.3%
if -5.1999999999999996e-140 < z < 1.60000000000000005e-52Initial program 94.4%
Taylor expanded in z around 0 82.2%
associate-/l*85.7%
Simplified85.7%
Final simplification85.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.5e+140)
(+ x y)
(if (<= z -3.4e-140)
(- x (* t (/ y z)))
(if (<= z 1.42e+62) (+ x (* t (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+140) {
tmp = x + y;
} else if (z <= -3.4e-140) {
tmp = x - (t * (y / z));
} else if (z <= 1.42e+62) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.5d+140)) then
tmp = x + y
else if (z <= (-3.4d-140)) then
tmp = x - (t * (y / z))
else if (z <= 1.42d+62) then
tmp = x + (t * (y / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+140) {
tmp = x + y;
} else if (z <= -3.4e-140) {
tmp = x - (t * (y / z));
} else if (z <= 1.42e+62) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.5e+140: tmp = x + y elif z <= -3.4e-140: tmp = x - (t * (y / z)) elif z <= 1.42e+62: tmp = x + (t * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.5e+140) tmp = Float64(x + y); elseif (z <= -3.4e-140) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= 1.42e+62) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.5e+140) tmp = x + y; elseif (z <= -3.4e-140) tmp = x - (t * (y / z)); elseif (z <= 1.42e+62) tmp = x + (t * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e+140], N[(x + y), $MachinePrecision], If[LessEqual[z, -3.4e-140], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e+62], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+140}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-140}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{+62}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.50000000000000004e140 or 1.42e62 < z Initial program 100.0%
Taylor expanded in z around inf 87.8%
if -2.50000000000000004e140 < z < -3.40000000000000008e-140Initial program 98.3%
clear-num98.3%
un-div-inv98.3%
Applied egg-rr98.3%
Taylor expanded in t around inf 84.9%
mul-1-neg84.9%
associate-/l*83.4%
distribute-lft-neg-out83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in z around inf 80.3%
mul-1-neg80.3%
unsub-neg80.3%
associate-/l*77.1%
Simplified77.1%
if -3.40000000000000008e-140 < z < 1.42e62Initial program 95.3%
Taylor expanded in z around 0 79.2%
associate-/l*82.8%
Simplified82.8%
Final simplification82.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.5e+140)
(+ x y)
(if (<= z -3.8e-140)
(- x (/ t (/ z y)))
(if (<= z 2.4e+62) (+ x (* t (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+140) {
tmp = x + y;
} else if (z <= -3.8e-140) {
tmp = x - (t / (z / y));
} else if (z <= 2.4e+62) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.5d+140)) then
tmp = x + y
else if (z <= (-3.8d-140)) then
tmp = x - (t / (z / y))
else if (z <= 2.4d+62) then
tmp = x + (t * (y / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e+140) {
tmp = x + y;
} else if (z <= -3.8e-140) {
tmp = x - (t / (z / y));
} else if (z <= 2.4e+62) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.5e+140: tmp = x + y elif z <= -3.8e-140: tmp = x - (t / (z / y)) elif z <= 2.4e+62: tmp = x + (t * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.5e+140) tmp = Float64(x + y); elseif (z <= -3.8e-140) tmp = Float64(x - Float64(t / Float64(z / y))); elseif (z <= 2.4e+62) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.5e+140) tmp = x + y; elseif (z <= -3.8e-140) tmp = x - (t / (z / y)); elseif (z <= 2.4e+62) tmp = x + (t * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e+140], N[(x + y), $MachinePrecision], If[LessEqual[z, -3.8e-140], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+62], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+140}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-140}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+62}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.50000000000000004e140 or 2.4e62 < z Initial program 100.0%
Taylor expanded in z around inf 87.8%
if -2.50000000000000004e140 < z < -3.79999999999999998e-140Initial program 98.3%
clear-num98.3%
un-div-inv98.3%
Applied egg-rr98.3%
Taylor expanded in t around inf 84.9%
mul-1-neg84.9%
associate-/l*83.4%
distribute-lft-neg-out83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in x around 0 84.9%
mul-1-neg84.9%
*-commutative84.9%
associate-*r/83.3%
sub-neg83.3%
*-commutative83.3%
associate-/r/83.4%
Simplified83.4%
Taylor expanded in z around inf 77.1%
if -3.79999999999999998e-140 < z < 2.4e62Initial program 95.3%
Taylor expanded in z around 0 79.2%
associate-/l*82.8%
Simplified82.8%
Final simplification82.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.45e+140)
(+ x y)
(if (<= z -4.1e-140)
(- x (/ (* y t) z))
(if (<= z 1.86e+62) (+ x (* t (/ y a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.45e+140) {
tmp = x + y;
} else if (z <= -4.1e-140) {
tmp = x - ((y * t) / z);
} else if (z <= 1.86e+62) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.45d+140)) then
tmp = x + y
else if (z <= (-4.1d-140)) then
tmp = x - ((y * t) / z)
else if (z <= 1.86d+62) then
tmp = x + (t * (y / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.45e+140) {
tmp = x + y;
} else if (z <= -4.1e-140) {
tmp = x - ((y * t) / z);
} else if (z <= 1.86e+62) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.45e+140: tmp = x + y elif z <= -4.1e-140: tmp = x - ((y * t) / z) elif z <= 1.86e+62: tmp = x + (t * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.45e+140) tmp = Float64(x + y); elseif (z <= -4.1e-140) tmp = Float64(x - Float64(Float64(y * t) / z)); elseif (z <= 1.86e+62) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.45e+140) tmp = x + y; elseif (z <= -4.1e-140) tmp = x - ((y * t) / z); elseif (z <= 1.86e+62) tmp = x + (t * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.45e+140], N[(x + y), $MachinePrecision], If[LessEqual[z, -4.1e-140], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.86e+62], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.45 \cdot 10^{+140}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-140}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{elif}\;z \leq 1.86 \cdot 10^{+62}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -3.4500000000000001e140 or 1.85999999999999995e62 < z Initial program 100.0%
Taylor expanded in z around inf 87.8%
if -3.4500000000000001e140 < z < -4.1000000000000001e-140Initial program 98.3%
clear-num98.3%
un-div-inv98.3%
Applied egg-rr98.3%
Taylor expanded in t around inf 84.9%
mul-1-neg84.9%
associate-/l*83.4%
distribute-lft-neg-out83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in x around 0 84.9%
mul-1-neg84.9%
*-commutative84.9%
associate-*r/83.3%
sub-neg83.3%
*-commutative83.3%
associate-/r/83.4%
Simplified83.4%
Taylor expanded in z around inf 80.3%
if -4.1000000000000001e-140 < z < 1.85999999999999995e62Initial program 95.3%
Taylor expanded in z around 0 79.2%
associate-/l*82.8%
Simplified82.8%
Final simplification83.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.1e-42) (not (<= t 3.65e+93))) (+ x (* y (/ t (- a z)))) (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.1e-42) || !(t <= 3.65e+93)) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-4.1d-42)) .or. (.not. (t <= 3.65d+93))) then
tmp = x + (y * (t / (a - z)))
else
tmp = x + (y * (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.1e-42) || !(t <= 3.65e+93)) {
tmp = x + (y * (t / (a - z)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.1e-42) or not (t <= 3.65e+93): tmp = x + (y * (t / (a - z))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.1e-42) || !(t <= 3.65e+93)) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.1e-42) || ~((t <= 3.65e+93))) tmp = x + (y * (t / (a - z))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.1e-42], N[Not[LessEqual[t, 3.65e+93]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.1 \cdot 10^{-42} \lor \neg \left(t \leq 3.65 \cdot 10^{+93}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -4.1000000000000001e-42 or 3.65000000000000013e93 < t Initial program 95.0%
clear-num95.0%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in t around inf 88.5%
mul-1-neg88.5%
associate-/l*91.6%
distribute-lft-neg-out91.6%
*-commutative91.6%
Simplified91.6%
Taylor expanded in x around 0 88.5%
mul-1-neg88.5%
*-commutative88.5%
associate-*r/88.3%
sub-neg88.3%
Simplified88.3%
if -4.1000000000000001e-42 < t < 3.65000000000000013e93Initial program 99.2%
Taylor expanded in t around 0 82.9%
associate-/l*91.0%
Simplified91.0%
Final simplification89.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.3e-146) (+ x (* y (/ (- z t) z))) (if (<= z 5.8e-52) (+ x (* t (/ y a))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.3e-146) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 5.8e-52) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.3d-146)) then
tmp = x + (y * ((z - t) / z))
else if (z <= 5.8d-52) then
tmp = x + (t * (y / a))
else
tmp = x + (y * (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.3e-146) {
tmp = x + (y * ((z - t) / z));
} else if (z <= 5.8e-52) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.3e-146: tmp = x + (y * ((z - t) / z)) elif z <= 5.8e-52: tmp = x + (t * (y / a)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.3e-146) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); elseif (z <= 5.8e-52) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.3e-146) tmp = x + (y * ((z - t) / z)); elseif (z <= 5.8e-52) tmp = x + (t * (y / a)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.3e-146], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-52], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{-146}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-52}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -3.3e-146Initial program 98.8%
Taylor expanded in a around 0 87.9%
if -3.3e-146 < z < 5.8000000000000003e-52Initial program 94.4%
Taylor expanded in z around 0 83.0%
associate-/l*86.5%
Simplified86.5%
if 5.8000000000000003e-52 < z Initial program 100.0%
Taylor expanded in t around 0 72.1%
associate-/l*88.0%
Simplified88.0%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.5e-143) (+ x (/ y (/ z (- z t)))) (if (<= z 7.6e-56) (+ x (* t (/ y a))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e-143) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 7.6e-56) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.5d-143)) then
tmp = x + (y / (z / (z - t)))
else if (z <= 7.6d-56) then
tmp = x + (t * (y / a))
else
tmp = x + (y * (z / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e-143) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 7.6e-56) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.5e-143: tmp = x + (y / (z / (z - t))) elif z <= 7.6e-56: tmp = x + (t * (y / a)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e-143) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= 7.6e-56) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.5e-143) tmp = x + (y / (z / (z - t))); elseif (z <= 7.6e-56) tmp = x + (t * (y / a)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e-143], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-56], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{-143}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-56}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -8.50000000000000072e-143Initial program 98.8%
clear-num98.8%
un-div-inv98.8%
Applied egg-rr98.8%
Taylor expanded in a around 0 87.9%
if -8.50000000000000072e-143 < z < 7.6000000000000004e-56Initial program 94.4%
Taylor expanded in z around 0 83.0%
associate-/l*86.5%
Simplified86.5%
if 7.6000000000000004e-56 < z Initial program 100.0%
Taylor expanded in t around 0 72.1%
associate-/l*88.0%
Simplified88.0%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.9e-19) (+ x (/ y (/ z (- z t)))) (if (<= z 1.8e+62) (+ x (/ t (/ (- a z) y))) (+ x (* y (/ (- z t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.9e-19) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 1.8e+62) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x + (y * ((z - 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 (z <= (-2.9d-19)) then
tmp = x + (y / (z / (z - t)))
else if (z <= 1.8d+62) then
tmp = x + (t / ((a - z) / y))
else
tmp = x + (y * ((z - 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 (z <= -2.9e-19) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 1.8e+62) {
tmp = x + (t / ((a - z) / y));
} else {
tmp = x + (y * ((z - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.9e-19: tmp = x + (y / (z / (z - t))) elif z <= 1.8e+62: tmp = x + (t / ((a - z) / y)) else: tmp = x + (y * ((z - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.9e-19) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= 1.8e+62) tmp = Float64(x + Float64(t / Float64(Float64(a - z) / y))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.9e-19) tmp = x + (y / (z / (z - t))); elseif (z <= 1.8e+62) tmp = x + (t / ((a - z) / y)); else tmp = x + (y * ((z - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e-19], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+62], N[(x + N[(t / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+62}:\\
\;\;\;\;x + \frac{t}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\end{array}
\end{array}
if z < -2.9e-19Initial program 99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in a around 0 95.3%
if -2.9e-19 < z < 1.8e62Initial program 95.5%
clear-num95.5%
un-div-inv97.7%
Applied egg-rr97.7%
Taylor expanded in t around inf 87.2%
mul-1-neg87.2%
associate-/l*90.2%
distribute-lft-neg-out90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in x around 0 87.2%
mul-1-neg87.2%
*-commutative87.2%
associate-*r/86.4%
sub-neg86.4%
*-commutative86.4%
associate-/r/90.2%
Simplified90.2%
if 1.8e62 < z Initial program 100.0%
Taylor expanded in a around 0 95.7%
Final simplification92.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.16e-20) (+ x (/ y (/ z (- z t)))) (if (<= z 1.3e+62) (+ x (* t (/ y (- a z)))) (+ x (* y (/ (- z t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.16e-20) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 1.3e+62) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y * ((z - 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 (z <= (-1.16d-20)) then
tmp = x + (y / (z / (z - t)))
else if (z <= 1.3d+62) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + (y * ((z - 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 (z <= -1.16e-20) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 1.3e+62) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y * ((z - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.16e-20: tmp = x + (y / (z / (z - t))) elif z <= 1.3e+62: tmp = x + (t * (y / (a - z))) else: tmp = x + (y * ((z - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.16e-20) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= 1.3e+62) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.16e-20) tmp = x + (y / (z / (z - t))); elseif (z <= 1.3e+62) tmp = x + (t * (y / (a - z))); else tmp = x + (y * ((z - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.16e-20], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+62], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+62}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\end{array}
\end{array}
if z < -1.16e-20Initial program 99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in a around 0 95.3%
if -1.16e-20 < z < 1.29999999999999992e62Initial program 95.5%
Taylor expanded in t around inf 87.2%
mul-1-neg87.2%
associate-/l*90.2%
Simplified90.2%
if 1.29999999999999992e62 < z Initial program 100.0%
Taylor expanded in a around 0 95.7%
Final simplification92.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.4e-22) (not (<= z 1.56e+62))) (+ x y) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.4e-22) || !(z <= 1.56e+62)) {
tmp = x + y;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8.4d-22)) .or. (.not. (z <= 1.56d+62))) then
tmp = x + y
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.4e-22) || !(z <= 1.56e+62)) {
tmp = x + y;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.4e-22) or not (z <= 1.56e+62): tmp = x + y else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.4e-22) || !(z <= 1.56e+62)) tmp = Float64(x + y); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.4e-22) || ~((z <= 1.56e+62))) tmp = x + y; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.4e-22], N[Not[LessEqual[z, 1.56e+62]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.4 \cdot 10^{-22} \lor \neg \left(z \leq 1.56 \cdot 10^{+62}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -8.40000000000000031e-22 or 1.55999999999999995e62 < z Initial program 100.0%
Taylor expanded in z around inf 81.1%
if -8.40000000000000031e-22 < z < 1.55999999999999995e62Initial program 95.5%
Taylor expanded in z around 0 77.3%
associate-/l*79.6%
Simplified79.6%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.2e+81) x (if (<= a 65000000000000.0) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e+81) {
tmp = x;
} else if (a <= 65000000000000.0) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.2d+81)) then
tmp = x
else if (a <= 65000000000000.0d0) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.2e+81) {
tmp = x;
} else if (a <= 65000000000000.0) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.2e+81: tmp = x elif a <= 65000000000000.0: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.2e+81) tmp = x; elseif (a <= 65000000000000.0) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.2e+81) tmp = x; elseif (a <= 65000000000000.0) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.2e+81], x, If[LessEqual[a, 65000000000000.0], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 65000000000000:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.2e81 or 6.5e13 < a Initial program 98.9%
Taylor expanded in t around 0 76.2%
associate-/l*78.1%
Simplified78.1%
Taylor expanded in x around inf 70.2%
if -3.2e81 < a < 6.5e13Initial program 96.2%
Taylor expanded in z around inf 63.2%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (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 / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
Initial program 97.3%
clear-num97.3%
un-div-inv98.6%
Applied egg-rr98.6%
Final simplification98.6%
(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 97.3%
Taylor expanded in t around 0 64.8%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in x around inf 52.9%
Final simplification52.9%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (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 / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024084
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))