
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / 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) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / 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) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- y z) (- -1.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 - (t - 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 + (a * ((y - z) / ((-1.0d0) - (t - z))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 - (t - z))));
}
def code(x, y, z, t, a): return x + (a * ((y - z) / (-1.0 - (t - z))))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(y - z) / Float64(-1.0 - Float64(t - z))))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((y - z) / (-1.0 - (t - z)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{y - z}{-1 - \left(t - z\right)}
\end{array}
Initial program 97.3%
associate-/r/99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ a t) (- z y)))) (t_2 (+ x (* (- y z) (/ a z)))))
(if (<= z -5.7e+47)
t_2
(if (<= z -1.9e-110)
t_1
(if (<= z 1.42e-139) (- x (* y a)) (if (<= z 1.05e+63) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((a / t) * (z - y));
double t_2 = x + ((y - z) * (a / z));
double tmp;
if (z <= -5.7e+47) {
tmp = t_2;
} else if (z <= -1.9e-110) {
tmp = t_1;
} else if (z <= 1.42e-139) {
tmp = x - (y * a);
} else if (z <= 1.05e+63) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((a / t) * (z - y))
t_2 = x + ((y - z) * (a / z))
if (z <= (-5.7d+47)) then
tmp = t_2
else if (z <= (-1.9d-110)) then
tmp = t_1
else if (z <= 1.42d-139) then
tmp = x - (y * a)
else if (z <= 1.05d+63) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((a / t) * (z - y));
double t_2 = x + ((y - z) * (a / z));
double tmp;
if (z <= -5.7e+47) {
tmp = t_2;
} else if (z <= -1.9e-110) {
tmp = t_1;
} else if (z <= 1.42e-139) {
tmp = x - (y * a);
} else if (z <= 1.05e+63) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((a / t) * (z - y)) t_2 = x + ((y - z) * (a / z)) tmp = 0 if z <= -5.7e+47: tmp = t_2 elif z <= -1.9e-110: tmp = t_1 elif z <= 1.42e-139: tmp = x - (y * a) elif z <= 1.05e+63: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(a / t) * Float64(z - y))) t_2 = Float64(x + Float64(Float64(y - z) * Float64(a / z))) tmp = 0.0 if (z <= -5.7e+47) tmp = t_2; elseif (z <= -1.9e-110) tmp = t_1; elseif (z <= 1.42e-139) tmp = Float64(x - Float64(y * a)); elseif (z <= 1.05e+63) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((a / t) * (z - y)); t_2 = x + ((y - z) * (a / z)); tmp = 0.0; if (z <= -5.7e+47) tmp = t_2; elseif (z <= -1.9e-110) tmp = t_1; elseif (z <= 1.42e-139) tmp = x - (y * a); elseif (z <= 1.05e+63) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(a / t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.7e+47], t$95$2, If[LessEqual[z, -1.9e-110], t$95$1, If[LessEqual[z, 1.42e-139], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+63], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{t} \cdot \left(z - y\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq -5.7 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{-139}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.6999999999999997e47 or 1.0500000000000001e63 < z Initial program 94.8%
Taylor expanded in z around inf 87.7%
associate-*r/87.7%
neg-mul-187.7%
Simplified87.7%
div-sub87.7%
div-inv87.7%
clear-num87.8%
add-sqr-sqrt48.0%
sqrt-unprod78.1%
sqr-neg78.1%
sqrt-unprod33.2%
add-sqr-sqrt72.6%
div-inv72.6%
clear-num72.6%
add-sqr-sqrt39.3%
sqrt-unprod52.9%
sqr-neg52.9%
sqrt-unprod24.9%
add-sqr-sqrt49.3%
Applied egg-rr49.3%
distribute-rgt-out--49.3%
Simplified49.3%
cancel-sign-sub-inv49.3%
distribute-neg-frac49.3%
add-sqr-sqrt33.5%
sqrt-unprod62.9%
sqr-neg62.9%
sqrt-unprod39.5%
add-sqr-sqrt87.8%
Applied egg-rr87.8%
if -5.6999999999999997e47 < z < -1.8999999999999999e-110 or 1.41999999999999997e-139 < z < 1.0500000000000001e63Initial program 97.7%
Taylor expanded in t around inf 80.0%
Taylor expanded in y around 0 77.5%
+-commutative77.5%
*-commutative77.5%
associate-*r/78.7%
mul-1-neg78.7%
*-commutative78.7%
associate-*r/78.7%
sub-neg78.7%
distribute-rgt-out--80.0%
Simplified80.0%
if -1.8999999999999999e-110 < z < 1.41999999999999997e-139Initial program 99.9%
associate-/r/98.8%
Simplified98.8%
Taylor expanded in z around 0 96.8%
Taylor expanded in t around 0 81.3%
Final simplification83.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ a z)))))
(if (<= z -1.05)
t_1
(if (<= z 1.4e-141)
(- x (* y a))
(if (<= z 5.2e+49) (- x (* y (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (a / z));
double tmp;
if (z <= -1.05) {
tmp = t_1;
} else if (z <= 1.4e-141) {
tmp = x - (y * a);
} else if (z <= 5.2e+49) {
tmp = x - (y * (a / t));
} 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 / z))
if (z <= (-1.05d0)) then
tmp = t_1
else if (z <= 1.4d-141) then
tmp = x - (y * a)
else if (z <= 5.2d+49) then
tmp = x - (y * (a / t))
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 / z));
double tmp;
if (z <= -1.05) {
tmp = t_1;
} else if (z <= 1.4e-141) {
tmp = x - (y * a);
} else if (z <= 5.2e+49) {
tmp = x - (y * (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * (a / z)) tmp = 0 if z <= -1.05: tmp = t_1 elif z <= 1.4e-141: tmp = x - (y * a) elif z <= 5.2e+49: tmp = x - (y * (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(a / z))) tmp = 0.0 if (z <= -1.05) tmp = t_1; elseif (z <= 1.4e-141) tmp = Float64(x - Float64(y * a)); elseif (z <= 5.2e+49) tmp = Float64(x - Float64(y * Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * (a / z)); tmp = 0.0; if (z <= -1.05) tmp = t_1; elseif (z <= 1.4e-141) tmp = x - (y * a); elseif (z <= 5.2e+49) tmp = x - (y * (a / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05], t$95$1, If[LessEqual[z, 1.4e-141], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+49], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq -1.05:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-141}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+49}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.05000000000000004 or 5.19999999999999977e49 < z Initial program 94.5%
Taylor expanded in z around inf 83.8%
associate-*r/83.8%
neg-mul-183.8%
Simplified83.8%
div-sub83.8%
div-inv83.8%
clear-num83.9%
add-sqr-sqrt47.3%
sqrt-unprod75.5%
sqr-neg75.5%
sqrt-unprod30.8%
add-sqr-sqrt68.8%
div-inv68.7%
clear-num68.8%
add-sqr-sqrt37.9%
sqrt-unprod51.7%
sqr-neg51.7%
sqrt-unprod23.5%
add-sqr-sqrt48.6%
Applied egg-rr48.6%
distribute-rgt-out--48.6%
Simplified48.6%
cancel-sign-sub-inv48.6%
distribute-neg-frac48.6%
add-sqr-sqrt31.9%
sqrt-unprod61.1%
sqr-neg61.1%
sqrt-unprod37.9%
add-sqr-sqrt83.8%
Applied egg-rr83.8%
if -1.05000000000000004 < z < 1.40000000000000006e-141Initial program 99.8%
associate-/r/99.0%
Simplified99.0%
Taylor expanded in z around 0 95.5%
Taylor expanded in t around 0 78.6%
if 1.40000000000000006e-141 < z < 5.19999999999999977e49Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 78.8%
Taylor expanded in t around inf 70.7%
*-commutative70.7%
associate-*r/72.7%
Simplified72.7%
Final simplification79.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ a z)))))
(if (<= z -6.7e+48)
t_1
(if (<= z 45.0)
(+ x (* a (/ y (- -1.0 t))))
(if (<= z 1.5e+63) (- x (* (- y z) (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (a / z));
double tmp;
if (z <= -6.7e+48) {
tmp = t_1;
} else if (z <= 45.0) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 1.5e+63) {
tmp = x - ((y - z) * (a / t));
} 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 / z))
if (z <= (-6.7d+48)) then
tmp = t_1
else if (z <= 45.0d0) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else if (z <= 1.5d+63) then
tmp = x - ((y - z) * (a / t))
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 / z));
double tmp;
if (z <= -6.7e+48) {
tmp = t_1;
} else if (z <= 45.0) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 1.5e+63) {
tmp = x - ((y - z) * (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * (a / z)) tmp = 0 if z <= -6.7e+48: tmp = t_1 elif z <= 45.0: tmp = x + (a * (y / (-1.0 - t))) elif z <= 1.5e+63: tmp = x - ((y - z) * (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(a / z))) tmp = 0.0 if (z <= -6.7e+48) tmp = t_1; elseif (z <= 45.0) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); elseif (z <= 1.5e+63) tmp = Float64(x - Float64(Float64(y - z) * Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * (a / z)); tmp = 0.0; if (z <= -6.7e+48) tmp = t_1; elseif (z <= 45.0) tmp = x + (a * (y / (-1.0 - t))); elseif (z <= 1.5e+63) tmp = x - ((y - z) * (a / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.7e+48], t$95$1, If[LessEqual[z, 45.0], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+63], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq -6.7 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 45:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+63}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.7e48 or 1.5e63 < z Initial program 94.7%
Taylor expanded in z around inf 87.6%
associate-*r/87.6%
neg-mul-187.6%
Simplified87.6%
div-sub87.6%
div-inv87.6%
clear-num87.7%
add-sqr-sqrt47.4%
sqrt-unprod77.9%
sqr-neg77.9%
sqrt-unprod33.6%
add-sqr-sqrt72.3%
div-inv72.3%
clear-num72.3%
add-sqr-sqrt38.6%
sqrt-unprod52.4%
sqr-neg52.4%
sqrt-unprod25.2%
add-sqr-sqrt48.7%
Applied egg-rr48.7%
distribute-rgt-out--48.7%
Simplified48.7%
cancel-sign-sub-inv48.7%
distribute-neg-frac48.7%
add-sqr-sqrt33.9%
sqrt-unprod62.5%
sqr-neg62.5%
sqrt-unprod38.8%
add-sqr-sqrt87.6%
Applied egg-rr87.6%
if -6.7e48 < z < 45Initial program 99.2%
associate-/r/99.3%
Simplified99.3%
Taylor expanded in z around 0 91.2%
if 45 < z < 1.5e63Initial program 96.0%
Taylor expanded in t around inf 84.1%
Taylor expanded in y around 0 80.3%
+-commutative80.3%
*-commutative80.3%
associate-*r/80.2%
mul-1-neg80.2%
*-commutative80.2%
associate-*r/80.3%
sub-neg80.3%
distribute-rgt-out--84.3%
Simplified84.3%
Final simplification89.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ a z)))))
(if (<= z -1.8e+49)
t_1
(if (<= z 0.0225)
(+ x (* a (/ y (- -1.0 t))))
(if (<= z 9.8e+62) (- x (* a (/ (- y z) t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (a / z));
double tmp;
if (z <= -1.8e+49) {
tmp = t_1;
} else if (z <= 0.0225) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 9.8e+62) {
tmp = x - (a * ((y - z) / t));
} 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 / z))
if (z <= (-1.8d+49)) then
tmp = t_1
else if (z <= 0.0225d0) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else if (z <= 9.8d+62) then
tmp = x - (a * ((y - z) / t))
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 / z));
double tmp;
if (z <= -1.8e+49) {
tmp = t_1;
} else if (z <= 0.0225) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 9.8e+62) {
tmp = x - (a * ((y - z) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * (a / z)) tmp = 0 if z <= -1.8e+49: tmp = t_1 elif z <= 0.0225: tmp = x + (a * (y / (-1.0 - t))) elif z <= 9.8e+62: tmp = x - (a * ((y - z) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(a / z))) tmp = 0.0 if (z <= -1.8e+49) tmp = t_1; elseif (z <= 0.0225) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); elseif (z <= 9.8e+62) tmp = Float64(x - Float64(a * Float64(Float64(y - z) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * (a / z)); tmp = 0.0; if (z <= -1.8e+49) tmp = t_1; elseif (z <= 0.0225) tmp = x + (a * (y / (-1.0 - t))); elseif (z <= 9.8e+62) tmp = x - (a * ((y - z) / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+49], t$95$1, If[LessEqual[z, 0.0225], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e+62], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0225:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+62}:\\
\;\;\;\;x - a \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.79999999999999998e49 or 9.7999999999999994e62 < z Initial program 94.7%
Taylor expanded in z around inf 87.6%
associate-*r/87.6%
neg-mul-187.6%
Simplified87.6%
div-sub87.6%
div-inv87.6%
clear-num87.7%
add-sqr-sqrt47.4%
sqrt-unprod77.9%
sqr-neg77.9%
sqrt-unprod33.6%
add-sqr-sqrt72.3%
div-inv72.3%
clear-num72.3%
add-sqr-sqrt38.6%
sqrt-unprod52.4%
sqr-neg52.4%
sqrt-unprod25.2%
add-sqr-sqrt48.7%
Applied egg-rr48.7%
distribute-rgt-out--48.7%
Simplified48.7%
cancel-sign-sub-inv48.7%
distribute-neg-frac48.7%
add-sqr-sqrt33.9%
sqrt-unprod62.5%
sqr-neg62.5%
sqrt-unprod38.8%
add-sqr-sqrt87.6%
Applied egg-rr87.6%
if -1.79999999999999998e49 < z < 0.022499999999999999Initial program 99.2%
associate-/r/99.3%
Simplified99.3%
Taylor expanded in z around 0 91.2%
if 0.022499999999999999 < z < 9.7999999999999994e62Initial program 96.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around inf 88.1%
Final simplification89.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (- a (* a (/ y z))))))
(if (<= z -1.14e+48)
t_1
(if (<= z 880.0)
(+ x (* a (/ y (- -1.0 t))))
(if (<= z 1.1e+63) (- x (* a (/ (- y z) t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a - (a * (y / z)));
double tmp;
if (z <= -1.14e+48) {
tmp = t_1;
} else if (z <= 880.0) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 1.1e+63) {
tmp = x - (a * ((y - z) / t));
} 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 - (a - (a * (y / z)))
if (z <= (-1.14d+48)) then
tmp = t_1
else if (z <= 880.0d0) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else if (z <= 1.1d+63) then
tmp = x - (a * ((y - z) / t))
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 - (a - (a * (y / z)));
double tmp;
if (z <= -1.14e+48) {
tmp = t_1;
} else if (z <= 880.0) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 1.1e+63) {
tmp = x - (a * ((y - z) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a - (a * (y / z))) tmp = 0 if z <= -1.14e+48: tmp = t_1 elif z <= 880.0: tmp = x + (a * (y / (-1.0 - t))) elif z <= 1.1e+63: tmp = x - (a * ((y - z) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a - Float64(a * Float64(y / z)))) tmp = 0.0 if (z <= -1.14e+48) tmp = t_1; elseif (z <= 880.0) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); elseif (z <= 1.1e+63) tmp = Float64(x - Float64(a * Float64(Float64(y - z) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a - (a * (y / z))); tmp = 0.0; if (z <= -1.14e+48) tmp = t_1; elseif (z <= 880.0) tmp = x + (a * (y / (-1.0 - t))); elseif (z <= 1.1e+63) tmp = x - (a * ((y - z) / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a - N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.14e+48], t$95$1, If[LessEqual[z, 880.0], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+63], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \left(a - a \cdot \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.14 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 880:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+63}:\\
\;\;\;\;x - a \cdot \frac{y - z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1399999999999999e48 or 1.0999999999999999e63 < z Initial program 94.7%
Taylor expanded in z around inf 87.6%
associate-*r/87.6%
neg-mul-187.6%
Simplified87.6%
Taylor expanded in y around 0 81.3%
mul-1-neg81.3%
unsub-neg81.3%
associate-/l*91.8%
Simplified91.8%
if -1.1399999999999999e48 < z < 880Initial program 99.2%
associate-/r/99.3%
Simplified99.3%
Taylor expanded in z around 0 91.2%
if 880 < z < 1.0999999999999999e63Initial program 96.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around inf 88.1%
Final simplification91.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.6e+25)
(- x a)
(if (<= z 2.5e-138)
(- x (* y a))
(if (<= z 9.8e+62) (+ x (* a (/ z t))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.6e+25) {
tmp = x - a;
} else if (z <= 2.5e-138) {
tmp = x - (y * a);
} else if (z <= 9.8e+62) {
tmp = x + (a * (z / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.6d+25)) then
tmp = x - a
else if (z <= 2.5d-138) then
tmp = x - (y * a)
else if (z <= 9.8d+62) then
tmp = x + (a * (z / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.6e+25) {
tmp = x - a;
} else if (z <= 2.5e-138) {
tmp = x - (y * a);
} else if (z <= 9.8e+62) {
tmp = x + (a * (z / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.6e+25: tmp = x - a elif z <= 2.5e-138: tmp = x - (y * a) elif z <= 9.8e+62: tmp = x + (a * (z / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.6e+25) tmp = Float64(x - a); elseif (z <= 2.5e-138) tmp = Float64(x - Float64(y * a)); elseif (z <= 9.8e+62) tmp = Float64(x + Float64(a * Float64(z / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.6e+25) tmp = x - a; elseif (z <= 2.5e-138) tmp = x - (y * a); elseif (z <= 9.8e+62) tmp = x + (a * (z / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.6e+25], N[(x - a), $MachinePrecision], If[LessEqual[z, 2.5e-138], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e+62], N[(x + N[(a * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+25}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-138}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+62}:\\
\;\;\;\;x + a \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -4.5999999999999996e25 or 9.7999999999999994e62 < z Initial program 94.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 76.7%
if -4.5999999999999996e25 < z < 2.49999999999999994e-138Initial program 99.8%
associate-/r/99.1%
Simplified99.1%
Taylor expanded in z around 0 93.3%
Taylor expanded in t around 0 77.4%
if 2.49999999999999994e-138 < z < 9.7999999999999994e62Initial program 96.5%
Taylor expanded in t around inf 78.7%
Taylor expanded in y around 0 61.5%
sub-neg61.5%
mul-1-neg61.5%
remove-double-neg61.5%
associate-/l*61.5%
Simplified61.5%
Final simplification73.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.8e+17)
(- x a)
(if (<= z 7.8e-140)
(- x (* y a))
(if (<= z 4.6e+49) (- x (* y (/ a t))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+17) {
tmp = x - a;
} else if (z <= 7.8e-140) {
tmp = x - (y * a);
} else if (z <= 4.6e+49) {
tmp = x - (y * (a / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.8d+17)) then
tmp = x - a
else if (z <= 7.8d-140) then
tmp = x - (y * a)
else if (z <= 4.6d+49) then
tmp = x - (y * (a / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+17) {
tmp = x - a;
} else if (z <= 7.8e-140) {
tmp = x - (y * a);
} else if (z <= 4.6e+49) {
tmp = x - (y * (a / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.8e+17: tmp = x - a elif z <= 7.8e-140: tmp = x - (y * a) elif z <= 4.6e+49: tmp = x - (y * (a / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.8e+17) tmp = Float64(x - a); elseif (z <= 7.8e-140) tmp = Float64(x - Float64(y * a)); elseif (z <= 4.6e+49) tmp = Float64(x - Float64(y * Float64(a / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.8e+17) tmp = x - a; elseif (z <= 7.8e-140) tmp = x - (y * a); elseif (z <= 4.6e+49) tmp = x - (y * (a / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.8e+17], N[(x - a), $MachinePrecision], If[LessEqual[z, 7.8e-140], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+49], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+17}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{-140}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+49}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -8.8e17 or 4.60000000000000004e49 < z Initial program 94.2%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 75.7%
if -8.8e17 < z < 7.80000000000000038e-140Initial program 99.8%
associate-/r/99.1%
Simplified99.1%
Taylor expanded in z around 0 93.3%
Taylor expanded in t around 0 77.4%
if 7.80000000000000038e-140 < z < 4.60000000000000004e49Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 78.8%
Taylor expanded in t around inf 70.7%
*-commutative70.7%
associate-*r/72.7%
Simplified72.7%
Final simplification75.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8e+18) (not (<= t 7.2e+205))) (+ x (* a (/ (- z y) t))) (+ x (* a (/ (- y z) (- z 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8e+18) || !(t <= 7.2e+205)) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x + (a * ((y - z) / (z - 1.0)));
}
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 <= (-8d+18)) .or. (.not. (t <= 7.2d+205))) then
tmp = x + (a * ((z - y) / t))
else
tmp = x + (a * ((y - z) / (z - 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8e+18) || !(t <= 7.2e+205)) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x + (a * ((y - z) / (z - 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8e+18) or not (t <= 7.2e+205): tmp = x + (a * ((z - y) / t)) else: tmp = x + (a * ((y - z) / (z - 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8e+18) || !(t <= 7.2e+205)) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); else tmp = Float64(x + Float64(a * Float64(Float64(y - z) / Float64(z - 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -8e+18) || ~((t <= 7.2e+205))) tmp = x + (a * ((z - y) / t)); else tmp = x + (a * ((y - z) / (z - 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8e+18], N[Not[LessEqual[t, 7.2e+205]], $MachinePrecision]], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(z - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+18} \lor \neg \left(t \leq 7.2 \cdot 10^{+205}\right):\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y - z}{z - 1}\\
\end{array}
\end{array}
if t < -8e18 or 7.20000000000000003e205 < t Initial program 96.9%
associate-/r/99.0%
Simplified99.0%
Taylor expanded in t around inf 92.2%
if -8e18 < t < 7.20000000000000003e205Initial program 97.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 94.7%
Final simplification93.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3e+19) (not (<= z 6.4e+22))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3e+19) || !(z <= 6.4e+22)) {
tmp = x - a;
} else {
tmp = x - (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 <= (-3d+19)) .or. (.not. (z <= 6.4d+22))) then
tmp = x - a
else
tmp = x - (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 <= -3e+19) || !(z <= 6.4e+22)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3e+19) or not (z <= 6.4e+22): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3e+19) || !(z <= 6.4e+22)) tmp = Float64(x - a); else tmp = Float64(x - Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3e+19) || ~((z <= 6.4e+22))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3e+19], N[Not[LessEqual[z, 6.4e+22]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+19} \lor \neg \left(z \leq 6.4 \cdot 10^{+22}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -3e19 or 6.4e22 < z Initial program 94.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 73.9%
if -3e19 < z < 6.4e22Initial program 99.2%
associate-/r/99.3%
Simplified99.3%
Taylor expanded in z around 0 89.1%
Taylor expanded in t around 0 70.7%
Final simplification72.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -12500000000000.0) (not (<= z 6.2e+24))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -12500000000000.0) || !(z <= 6.2e+24)) {
tmp = x - a;
} 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 ((z <= (-12500000000000.0d0)) .or. (.not. (z <= 6.2d+24))) then
tmp = x - a
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 ((z <= -12500000000000.0) || !(z <= 6.2e+24)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -12500000000000.0) or not (z <= 6.2e+24): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -12500000000000.0) || !(z <= 6.2e+24)) tmp = Float64(x - a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -12500000000000.0) || ~((z <= 6.2e+24))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -12500000000000.0], N[Not[LessEqual[z, 6.2e+24]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12500000000000 \lor \neg \left(z \leq 6.2 \cdot 10^{+24}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.25e13 or 6.20000000000000022e24 < z Initial program 94.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 74.6%
if -1.25e13 < z < 6.20000000000000022e24Initial program 99.2%
associate-/r/99.3%
Simplified99.3%
Taylor expanded in x around inf 62.2%
Final simplification67.4%
(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%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in x around inf 58.0%
Final simplification58.0%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * 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) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024046
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))