
(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 14 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.0%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* y a) t))))
(if (<= t -3.7e+205)
(+ x (* a (/ z t)))
(if (<= t -3.25)
t_1
(if (<= t 5e-119)
(- x (* a (/ z (+ z -1.0))))
(if (<= t 2.25e-18) (- x (* y a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y * a) / t);
double tmp;
if (t <= -3.7e+205) {
tmp = x + (a * (z / t));
} else if (t <= -3.25) {
tmp = t_1;
} else if (t <= 5e-119) {
tmp = x - (a * (z / (z + -1.0)));
} else if (t <= 2.25e-18) {
tmp = x - (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 * a) / t)
if (t <= (-3.7d+205)) then
tmp = x + (a * (z / t))
else if (t <= (-3.25d0)) then
tmp = t_1
else if (t <= 5d-119) then
tmp = x - (a * (z / (z + (-1.0d0))))
else if (t <= 2.25d-18) then
tmp = x - (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 * a) / t);
double tmp;
if (t <= -3.7e+205) {
tmp = x + (a * (z / t));
} else if (t <= -3.25) {
tmp = t_1;
} else if (t <= 5e-119) {
tmp = x - (a * (z / (z + -1.0)));
} else if (t <= 2.25e-18) {
tmp = x - (y * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y * a) / t) tmp = 0 if t <= -3.7e+205: tmp = x + (a * (z / t)) elif t <= -3.25: tmp = t_1 elif t <= 5e-119: tmp = x - (a * (z / (z + -1.0))) elif t <= 2.25e-18: tmp = x - (y * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y * a) / t)) tmp = 0.0 if (t <= -3.7e+205) tmp = Float64(x + Float64(a * Float64(z / t))); elseif (t <= -3.25) tmp = t_1; elseif (t <= 5e-119) tmp = Float64(x - Float64(a * Float64(z / Float64(z + -1.0)))); elseif (t <= 2.25e-18) tmp = Float64(x - Float64(y * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y * a) / t); tmp = 0.0; if (t <= -3.7e+205) tmp = x + (a * (z / t)); elseif (t <= -3.25) tmp = t_1; elseif (t <= 5e-119) tmp = x - (a * (z / (z + -1.0))); elseif (t <= 2.25e-18) tmp = x - (y * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+205], N[(x + N[(a * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.25], t$95$1, If[LessEqual[t, 5e-119], N[(x - N[(a * N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-18], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y \cdot a}{t}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+205}:\\
\;\;\;\;x + a \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq -3.25:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-119}:\\
\;\;\;\;x - a \cdot \frac{z}{z + -1}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-18}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.69999999999999981e205Initial program 93.6%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 99.8%
Taylor expanded in y around 0 78.4%
neg-mul-178.4%
Simplified78.4%
if -3.69999999999999981e205 < t < -3.25 or 2.24999999999999997e-18 < t Initial program 96.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 78.4%
Taylor expanded in t around inf 77.5%
if -3.25 < t < 4.99999999999999993e-119Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 99.4%
Taylor expanded in y around 0 84.0%
neg-mul-184.0%
distribute-neg-frac284.0%
sub-neg84.0%
distribute-neg-in84.0%
metadata-eval84.0%
remove-double-neg84.0%
Simplified84.0%
if 4.99999999999999993e-119 < t < 2.24999999999999997e-18Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 65.4%
Taylor expanded in t around 0 65.4%
Final simplification79.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (/ t (- z y))))))
(if (<= t -92.0)
t_1
(if (<= t 2.4e-119)
(- x (* a (/ z (+ z -1.0))))
(if (<= t 2400.0) (- x (* y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / (t / (z - y)));
double tmp;
if (t <= -92.0) {
tmp = t_1;
} else if (t <= 2.4e-119) {
tmp = x - (a * (z / (z + -1.0)));
} else if (t <= 2400.0) {
tmp = x - (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 + (a / (t / (z - y)))
if (t <= (-92.0d0)) then
tmp = t_1
else if (t <= 2.4d-119) then
tmp = x - (a * (z / (z + (-1.0d0))))
else if (t <= 2400.0d0) then
tmp = x - (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 + (a / (t / (z - y)));
double tmp;
if (t <= -92.0) {
tmp = t_1;
} else if (t <= 2.4e-119) {
tmp = x - (a * (z / (z + -1.0)));
} else if (t <= 2400.0) {
tmp = x - (y * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / (t / (z - y))) tmp = 0 if t <= -92.0: tmp = t_1 elif t <= 2.4e-119: tmp = x - (a * (z / (z + -1.0))) elif t <= 2400.0: tmp = x - (y * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(t / Float64(z - y)))) tmp = 0.0 if (t <= -92.0) tmp = t_1; elseif (t <= 2.4e-119) tmp = Float64(x - Float64(a * Float64(z / Float64(z + -1.0)))); elseif (t <= 2400.0) tmp = Float64(x - Float64(y * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / (t / (z - y))); tmp = 0.0; if (t <= -92.0) tmp = t_1; elseif (t <= 2.4e-119) tmp = x - (a * (z / (z + -1.0))); elseif (t <= 2400.0) tmp = x - (y * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -92.0], t$95$1, If[LessEqual[t, 2.4e-119], N[(x - N[(a * N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2400.0], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{t}{z - y}}\\
\mathbf{if}\;t \leq -92:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-119}:\\
\;\;\;\;x - a \cdot \frac{z}{z + -1}\\
\mathbf{elif}\;t \leq 2400:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -92 or 2400 < t Initial program 95.6%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around inf 89.7%
if -92 < t < 2.40000000000000009e-119Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 99.4%
Taylor expanded in y around 0 84.0%
neg-mul-184.0%
distribute-neg-frac284.0%
sub-neg84.0%
distribute-neg-in84.0%
metadata-eval84.0%
remove-double-neg84.0%
Simplified84.0%
if 2.40000000000000009e-119 < t < 2400Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 68.4%
Taylor expanded in t around 0 68.4%
Final simplification85.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* a (/ (- z y) t)))))
(if (<= t -95.0)
t_1
(if (<= t 2.9e-120)
(- x (* a (/ z (+ z -1.0))))
(if (<= t 520.0) (- x (* y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * ((z - y) / t));
double tmp;
if (t <= -95.0) {
tmp = t_1;
} else if (t <= 2.9e-120) {
tmp = x - (a * (z / (z + -1.0)));
} else if (t <= 520.0) {
tmp = x - (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 + (a * ((z - y) / t))
if (t <= (-95.0d0)) then
tmp = t_1
else if (t <= 2.9d-120) then
tmp = x - (a * (z / (z + (-1.0d0))))
else if (t <= 520.0d0) then
tmp = x - (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 + (a * ((z - y) / t));
double tmp;
if (t <= -95.0) {
tmp = t_1;
} else if (t <= 2.9e-120) {
tmp = x - (a * (z / (z + -1.0)));
} else if (t <= 520.0) {
tmp = x - (y * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a * ((z - y) / t)) tmp = 0 if t <= -95.0: tmp = t_1 elif t <= 2.9e-120: tmp = x - (a * (z / (z + -1.0))) elif t <= 520.0: tmp = x - (y * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a * Float64(Float64(z - y) / t))) tmp = 0.0 if (t <= -95.0) tmp = t_1; elseif (t <= 2.9e-120) tmp = Float64(x - Float64(a * Float64(z / Float64(z + -1.0)))); elseif (t <= 520.0) tmp = Float64(x - Float64(y * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a * ((z - y) / t)); tmp = 0.0; if (t <= -95.0) tmp = t_1; elseif (t <= 2.9e-120) tmp = x - (a * (z / (z + -1.0))); elseif (t <= 520.0) tmp = x - (y * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -95.0], t$95$1, If[LessEqual[t, 2.9e-120], N[(x - N[(a * N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 520.0], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \frac{z - y}{t}\\
\mathbf{if}\;t \leq -95:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-120}:\\
\;\;\;\;x - a \cdot \frac{z}{z + -1}\\
\mathbf{elif}\;t \leq 520:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -95 or 520 < t Initial program 95.6%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 89.7%
if -95 < t < 2.9e-120Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 99.4%
Taylor expanded in y around 0 84.0%
neg-mul-184.0%
distribute-neg-frac284.0%
sub-neg84.0%
distribute-neg-in84.0%
metadata-eval84.0%
remove-double-neg84.0%
Simplified84.0%
if 2.9e-120 < t < 520Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 68.4%
Taylor expanded in t around 0 68.4%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.9e+24) (not (<= t 5e+46))) (- x (/ a (/ t (- y z)))) (+ x (* a (/ (- y z) (+ z -1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.9e+24) || !(t <= 5e+46)) {
tmp = x - (a / (t / (y - z)));
} 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 <= (-2.9d+24)) .or. (.not. (t <= 5d+46))) then
tmp = x - (a / (t / (y - z)))
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 <= -2.9e+24) || !(t <= 5e+46)) {
tmp = x - (a / (t / (y - z)));
} else {
tmp = x + (a * ((y - z) / (z + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.9e+24) or not (t <= 5e+46): tmp = x - (a / (t / (y - z))) else: tmp = x + (a * ((y - z) / (z + -1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.9e+24) || !(t <= 5e+46)) tmp = Float64(x - Float64(a / Float64(t / Float64(y - z)))); 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 <= -2.9e+24) || ~((t <= 5e+46))) tmp = x - (a / (t / (y - z))); else tmp = x + (a * ((y - z) / (z + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.9e+24], N[Not[LessEqual[t, 5e+46]], $MachinePrecision]], N[(x - N[(a / N[(t / N[(y - z), $MachinePrecision]), $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 -2.9 \cdot 10^{+24} \lor \neg \left(t \leq 5 \cdot 10^{+46}\right):\\
\;\;\;\;x - \frac{a}{\frac{t}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y - z}{z + -1}\\
\end{array}
\end{array}
if t < -2.89999999999999979e24 or 5.0000000000000002e46 < t Initial program 95.4%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around inf 92.4%
if -2.89999999999999979e24 < t < 5.0000000000000002e46Initial program 98.4%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 97.5%
Final simplification95.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2400000000.0) (not (<= z 5.8e-10))) (- x (/ (- z y) (/ z a))) (+ x (/ (* y a) (- -1.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2400000000.0) || !(z <= 5.8e-10)) {
tmp = x - ((z - y) / (z / a));
} else {
tmp = x + ((y * a) / (-1.0 - 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 <= (-2400000000.0d0)) .or. (.not. (z <= 5.8d-10))) then
tmp = x - ((z - y) / (z / a))
else
tmp = x + ((y * a) / ((-1.0d0) - 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 <= -2400000000.0) || !(z <= 5.8e-10)) {
tmp = x - ((z - y) / (z / a));
} else {
tmp = x + ((y * a) / (-1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2400000000.0) or not (z <= 5.8e-10): tmp = x - ((z - y) / (z / a)) else: tmp = x + ((y * a) / (-1.0 - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2400000000.0) || !(z <= 5.8e-10)) tmp = Float64(x - Float64(Float64(z - y) / Float64(z / a))); else tmp = Float64(x + Float64(Float64(y * a) / Float64(-1.0 - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2400000000.0) || ~((z <= 5.8e-10))) tmp = x - ((z - y) / (z / a)); else tmp = x + ((y * a) / (-1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2400000000.0], N[Not[LessEqual[z, 5.8e-10]], $MachinePrecision]], N[(x - N[(N[(z - y), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * a), $MachinePrecision] / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2400000000 \lor \neg \left(z \leq 5.8 \cdot 10^{-10}\right):\\
\;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot a}{-1 - t}\\
\end{array}
\end{array}
if z < -2.4e9 or 5.79999999999999962e-10 < z Initial program 95.7%
Taylor expanded in z around inf 80.5%
associate-*r/80.5%
neg-mul-180.5%
Simplified80.5%
if -2.4e9 < z < 5.79999999999999962e-10Initial program 98.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.4%
Final simplification85.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -2400000000.0) (- x (* (+ y z) (/ a z))) (if (<= z 5.8e-10) (+ x (/ (* y a) (- -1.0 t))) (- (- x (/ a z)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2400000000.0) {
tmp = x - ((y + z) * (a / z));
} else if (z <= 5.8e-10) {
tmp = x + ((y * a) / (-1.0 - t));
} else {
tmp = (x - (a / 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 <= (-2400000000.0d0)) then
tmp = x - ((y + z) * (a / z))
else if (z <= 5.8d-10) then
tmp = x + ((y * a) / ((-1.0d0) - t))
else
tmp = (x - (a / 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 <= -2400000000.0) {
tmp = x - ((y + z) * (a / z));
} else if (z <= 5.8e-10) {
tmp = x + ((y * a) / (-1.0 - t));
} else {
tmp = (x - (a / z)) - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2400000000.0: tmp = x - ((y + z) * (a / z)) elif z <= 5.8e-10: tmp = x + ((y * a) / (-1.0 - t)) else: tmp = (x - (a / z)) - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2400000000.0) tmp = Float64(x - Float64(Float64(y + z) * Float64(a / z))); elseif (z <= 5.8e-10) tmp = Float64(x + Float64(Float64(y * a) / Float64(-1.0 - t))); else tmp = Float64(Float64(x - Float64(a / z)) - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2400000000.0) tmp = x - ((y + z) * (a / z)); elseif (z <= 5.8e-10) tmp = x + ((y * a) / (-1.0 - t)); else tmp = (x - (a / z)) - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2400000000.0], N[(x - N[(N[(y + z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-10], N[(x + N[(N[(y * a), $MachinePrecision] / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2400000000:\\
\;\;\;\;x - \left(y + z\right) \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{y \cdot a}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{a}{z}\right) - a\\
\end{array}
\end{array}
if z < -2.4e9Initial program 94.2%
Taylor expanded in z around inf 73.5%
associate-*r/73.5%
neg-mul-173.5%
Simplified73.5%
div-inv73.4%
sub-neg73.4%
add-sqr-sqrt73.3%
sqrt-unprod29.8%
sqr-neg29.8%
sqrt-unprod0.0%
add-sqr-sqrt50.5%
clear-num50.6%
add-sqr-sqrt50.5%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod0.0%
add-sqr-sqrt71.0%
Applied egg-rr71.0%
if -2.4e9 < z < 5.79999999999999962e-10Initial program 98.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.4%
if 5.79999999999999962e-10 < z Initial program 96.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 90.0%
Taylor expanded in y around 0 84.6%
neg-mul-184.6%
distribute-neg-frac284.6%
sub-neg84.6%
distribute-neg-in84.6%
metadata-eval84.6%
remove-double-neg84.6%
Simplified84.6%
Taylor expanded in z around inf 84.7%
mul-1-neg84.7%
unsub-neg84.7%
Simplified84.7%
Final simplification84.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2200000000.0) (not (<= z 3.5e-12))) (- (- x (/ a z)) a) (- x (/ (* y a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2200000000.0) || !(z <= 3.5e-12)) {
tmp = (x - (a / z)) - a;
} else {
tmp = x - ((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 ((z <= (-2200000000.0d0)) .or. (.not. (z <= 3.5d-12))) then
tmp = (x - (a / z)) - a
else
tmp = x - ((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 ((z <= -2200000000.0) || !(z <= 3.5e-12)) {
tmp = (x - (a / z)) - a;
} else {
tmp = x - ((y * a) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2200000000.0) or not (z <= 3.5e-12): tmp = (x - (a / z)) - a else: tmp = x - ((y * a) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2200000000.0) || !(z <= 3.5e-12)) tmp = Float64(Float64(x - Float64(a / z)) - a); else tmp = Float64(x - Float64(Float64(y * a) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2200000000.0) || ~((z <= 3.5e-12))) tmp = (x - (a / z)) - a; else tmp = x - ((y * a) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2200000000.0], N[Not[LessEqual[z, 3.5e-12]], $MachinePrecision]], N[(N[(x - N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2200000000 \lor \neg \left(z \leq 3.5 \cdot 10^{-12}\right):\\
\;\;\;\;\left(x - \frac{a}{z}\right) - a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\end{array}
\end{array}
if z < -2.2e9 or 3.5e-12 < z Initial program 95.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 82.7%
Taylor expanded in y around 0 78.1%
neg-mul-178.1%
distribute-neg-frac278.1%
sub-neg78.1%
distribute-neg-in78.1%
metadata-eval78.1%
remove-double-neg78.1%
Simplified78.1%
Taylor expanded in z around inf 78.1%
mul-1-neg78.1%
unsub-neg78.1%
Simplified78.1%
if -2.2e9 < z < 3.5e-12Initial program 98.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.4%
Taylor expanded in t around inf 71.0%
Final simplification74.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1500000000.0) (not (<= z 5.8e-10))) (- x a) (- x (/ (* y a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1500000000.0) || !(z <= 5.8e-10)) {
tmp = x - a;
} else {
tmp = x - ((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 ((z <= (-1500000000.0d0)) .or. (.not. (z <= 5.8d-10))) then
tmp = x - a
else
tmp = x - ((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 ((z <= -1500000000.0) || !(z <= 5.8e-10)) {
tmp = x - a;
} else {
tmp = x - ((y * a) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1500000000.0) or not (z <= 5.8e-10): tmp = x - a else: tmp = x - ((y * a) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1500000000.0) || !(z <= 5.8e-10)) tmp = Float64(x - a); else tmp = Float64(x - Float64(Float64(y * a) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1500000000.0) || ~((z <= 5.8e-10))) tmp = x - a; else tmp = x - ((y * a) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1500000000.0], N[Not[LessEqual[z, 5.8e-10]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1500000000 \lor \neg \left(z \leq 5.8 \cdot 10^{-10}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\end{array}
\end{array}
if z < -1.5e9 or 5.79999999999999962e-10 < z Initial program 95.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 77.9%
if -1.5e9 < z < 5.79999999999999962e-10Initial program 98.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.4%
Taylor expanded in t around inf 71.0%
Final simplification74.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1600000000.0) (- x (* (+ y z) (/ a z))) (if (<= z 5.8e-10) (- x (/ (* y a) t)) (- (- x (/ a z)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1600000000.0) {
tmp = x - ((y + z) * (a / z));
} else if (z <= 5.8e-10) {
tmp = x - ((y * a) / t);
} else {
tmp = (x - (a / 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 <= (-1600000000.0d0)) then
tmp = x - ((y + z) * (a / z))
else if (z <= 5.8d-10) then
tmp = x - ((y * a) / t)
else
tmp = (x - (a / 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 <= -1600000000.0) {
tmp = x - ((y + z) * (a / z));
} else if (z <= 5.8e-10) {
tmp = x - ((y * a) / t);
} else {
tmp = (x - (a / z)) - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1600000000.0: tmp = x - ((y + z) * (a / z)) elif z <= 5.8e-10: tmp = x - ((y * a) / t) else: tmp = (x - (a / z)) - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1600000000.0) tmp = Float64(x - Float64(Float64(y + z) * Float64(a / z))); elseif (z <= 5.8e-10) tmp = Float64(x - Float64(Float64(y * a) / t)); else tmp = Float64(Float64(x - Float64(a / z)) - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1600000000.0) tmp = x - ((y + z) * (a / z)); elseif (z <= 5.8e-10) tmp = x - ((y * a) / t); else tmp = (x - (a / z)) - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1600000000.0], N[(x - N[(N[(y + z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-10], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1600000000:\\
\;\;\;\;x - \left(y + z\right) \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{a}{z}\right) - a\\
\end{array}
\end{array}
if z < -1.6e9Initial program 94.2%
Taylor expanded in z around inf 73.5%
associate-*r/73.5%
neg-mul-173.5%
Simplified73.5%
div-inv73.4%
sub-neg73.4%
add-sqr-sqrt73.3%
sqrt-unprod29.8%
sqr-neg29.8%
sqrt-unprod0.0%
add-sqr-sqrt50.5%
clear-num50.6%
add-sqr-sqrt50.5%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod0.0%
add-sqr-sqrt71.0%
Applied egg-rr71.0%
if -1.6e9 < z < 5.79999999999999962e-10Initial program 98.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.4%
Taylor expanded in t around inf 71.0%
if 5.79999999999999962e-10 < z Initial program 96.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 90.0%
Taylor expanded in y around 0 84.6%
neg-mul-184.6%
distribute-neg-frac284.6%
sub-neg84.6%
distribute-neg-in84.6%
metadata-eval84.6%
remove-double-neg84.6%
Simplified84.6%
Taylor expanded in z around inf 84.7%
mul-1-neg84.7%
unsub-neg84.7%
Simplified84.7%
Final simplification74.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -61000.0) (not (<= z 2.25e-14))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -61000.0) || !(z <= 2.25e-14)) {
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 <= (-61000.0d0)) .or. (.not. (z <= 2.25d-14))) 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 <= -61000.0) || !(z <= 2.25e-14)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -61000.0) or not (z <= 2.25e-14): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -61000.0) || !(z <= 2.25e-14)) 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 <= -61000.0) || ~((z <= 2.25e-14))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -61000.0], N[Not[LessEqual[z, 2.25e-14]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -61000 \lor \neg \left(z \leq 2.25 \cdot 10^{-14}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -61000 or 2.2499999999999999e-14 < z Initial program 95.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 77.0%
if -61000 < z < 2.2499999999999999e-14Initial program 98.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.2%
Taylor expanded in t around 0 66.4%
Final simplification71.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1400000000.0) (not (<= z 2.25e-14))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1400000000.0) || !(z <= 2.25e-14)) {
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 <= (-1400000000.0d0)) .or. (.not. (z <= 2.25d-14))) 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 <= -1400000000.0) || !(z <= 2.25e-14)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1400000000.0) or not (z <= 2.25e-14): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1400000000.0) || !(z <= 2.25e-14)) 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 <= -1400000000.0) || ~((z <= 2.25e-14))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1400000000.0], N[Not[LessEqual[z, 2.25e-14]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1400000000 \lor \neg \left(z \leq 2.25 \cdot 10^{-14}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.4e9 or 2.2499999999999999e-14 < z Initial program 95.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 77.4%
if -1.4e9 < z < 2.2499999999999999e-14Initial program 98.4%
sub-neg98.4%
+-commutative98.4%
associate-/r/99.9%
distribute-rgt-neg-in99.9%
associate-*l/94.7%
associate-/l*98.4%
fma-define98.4%
distribute-frac-neg98.4%
distribute-neg-frac298.4%
distribute-neg-in98.4%
sub-neg98.4%
distribute-neg-in98.4%
remove-double-neg98.4%
+-commutative98.4%
sub-neg98.4%
metadata-eval98.4%
Simplified98.4%
Taylor expanded in a around 0 61.0%
Final simplification69.2%
(FPCore (x y z t a) :precision binary64 (if (<= z 2.55e+120) x (- a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 2.55e+120) {
tmp = x;
} else {
tmp = -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 <= 2.55d+120) then
tmp = x
else
tmp = -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 <= 2.55e+120) {
tmp = x;
} else {
tmp = -a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 2.55e+120: tmp = x else: tmp = -a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 2.55e+120) tmp = x; else tmp = Float64(-a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 2.55e+120) tmp = x; else tmp = -a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 2.55e+120], x, (-a)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.55 \cdot 10^{+120}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-a\\
\end{array}
\end{array}
if z < 2.55000000000000014e120Initial program 97.4%
sub-neg97.4%
+-commutative97.4%
associate-/r/99.9%
distribute-rgt-neg-in99.9%
associate-*l/87.4%
associate-/l*97.5%
fma-define97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
distribute-neg-in97.5%
sub-neg97.5%
distribute-neg-in97.5%
remove-double-neg97.5%
+-commutative97.5%
sub-neg97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in a around 0 56.3%
if 2.55000000000000014e120 < z Initial program 95.3%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 95.7%
Taylor expanded in x around 0 59.0%
neg-mul-159.0%
Simplified59.0%
(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.0%
sub-neg97.0%
+-commutative97.0%
associate-/r/99.9%
distribute-rgt-neg-in99.9%
associate-*l/83.0%
associate-/l*97.2%
fma-define97.2%
distribute-frac-neg97.2%
distribute-neg-frac297.2%
distribute-neg-in97.2%
sub-neg97.2%
distribute-neg-in97.2%
remove-double-neg97.2%
+-commutative97.2%
sub-neg97.2%
metadata-eval97.2%
Simplified97.2%
Taylor expanded in a around 0 52.9%
(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 2024186
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))