
(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 12 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 (+ 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}
Initial program 98.7%
Final simplification98.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ z (- z t))))))
(if (<= z -4.5e+40)
t_1
(if (<= z -1.86e-59)
(+ x (* y (/ z (- z a))))
(if (or (<= z -6e-75) (not (<= z 1.9e+37)))
t_1
(+ x (* (- t z) (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (z / (z - t)));
double tmp;
if (z <= -4.5e+40) {
tmp = t_1;
} else if (z <= -1.86e-59) {
tmp = x + (y * (z / (z - a)));
} else if ((z <= -6e-75) || !(z <= 1.9e+37)) {
tmp = t_1;
} else {
tmp = x + ((t - z) * (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) :: t_1
real(8) :: tmp
t_1 = x + (y / (z / (z - t)))
if (z <= (-4.5d+40)) then
tmp = t_1
else if (z <= (-1.86d-59)) then
tmp = x + (y * (z / (z - a)))
else if ((z <= (-6d-75)) .or. (.not. (z <= 1.9d+37))) then
tmp = t_1
else
tmp = x + ((t - z) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (z / (z - t)));
double tmp;
if (z <= -4.5e+40) {
tmp = t_1;
} else if (z <= -1.86e-59) {
tmp = x + (y * (z / (z - a)));
} else if ((z <= -6e-75) || !(z <= 1.9e+37)) {
tmp = t_1;
} else {
tmp = x + ((t - z) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (z / (z - t))) tmp = 0 if z <= -4.5e+40: tmp = t_1 elif z <= -1.86e-59: tmp = x + (y * (z / (z - a))) elif (z <= -6e-75) or not (z <= 1.9e+37): tmp = t_1 else: tmp = x + ((t - z) * (y / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(z / Float64(z - t)))) tmp = 0.0 if (z <= -4.5e+40) tmp = t_1; elseif (z <= -1.86e-59) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); elseif ((z <= -6e-75) || !(z <= 1.9e+37)) tmp = t_1; else tmp = Float64(x + Float64(Float64(t - z) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (z / (z - t))); tmp = 0.0; if (z <= -4.5e+40) tmp = t_1; elseif (z <= -1.86e-59) tmp = x + (y * (z / (z - a))); elseif ((z <= -6e-75) || ~((z <= 1.9e+37))) tmp = t_1; else tmp = x + ((t - z) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+40], t$95$1, If[LessEqual[z, -1.86e-59], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -6e-75], N[Not[LessEqual[z, 1.9e+37]], $MachinePrecision]], t$95$1, N[(x + N[(N[(t - z), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.86 \cdot 10^{-59}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-75} \lor \neg \left(z \leq 1.9 \cdot 10^{+37}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - z\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -4.50000000000000032e40 or -1.86000000000000004e-59 < z < -5.9999999999999997e-75 or 1.89999999999999995e37 < z Initial program 99.1%
+-commutative99.1%
associate-*r/77.9%
associate-*l/91.4%
*-commutative91.4%
fma-def91.4%
Simplified91.4%
Taylor expanded in a around 0 68.7%
associate-/l*89.5%
Simplified89.5%
if -4.50000000000000032e40 < z < -1.86000000000000004e-59Initial program 99.9%
Taylor expanded in t around 0 90.4%
if -5.9999999999999997e-75 < z < 1.89999999999999995e37Initial program 97.9%
Taylor expanded in a around inf 83.1%
associate-*r/83.1%
neg-mul-183.1%
Simplified83.1%
Taylor expanded in y around 0 79.9%
associate-/l*82.4%
associate-/r/80.6%
Simplified80.6%
Final simplification85.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ z (- z t))))))
(if (<= z -4e+39)
t_1
(if (<= z -1.86e-59)
(+ x (/ (* y z) (- z a)))
(if (or (<= z -6.2e-75) (not (<= z 5.3e+34)))
t_1
(+ x (* (- t z) (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (z / (z - t)));
double tmp;
if (z <= -4e+39) {
tmp = t_1;
} else if (z <= -1.86e-59) {
tmp = x + ((y * z) / (z - a));
} else if ((z <= -6.2e-75) || !(z <= 5.3e+34)) {
tmp = t_1;
} else {
tmp = x + ((t - z) * (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) :: t_1
real(8) :: tmp
t_1 = x + (y / (z / (z - t)))
if (z <= (-4d+39)) then
tmp = t_1
else if (z <= (-1.86d-59)) then
tmp = x + ((y * z) / (z - a))
else if ((z <= (-6.2d-75)) .or. (.not. (z <= 5.3d+34))) then
tmp = t_1
else
tmp = x + ((t - z) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (z / (z - t)));
double tmp;
if (z <= -4e+39) {
tmp = t_1;
} else if (z <= -1.86e-59) {
tmp = x + ((y * z) / (z - a));
} else if ((z <= -6.2e-75) || !(z <= 5.3e+34)) {
tmp = t_1;
} else {
tmp = x + ((t - z) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (z / (z - t))) tmp = 0 if z <= -4e+39: tmp = t_1 elif z <= -1.86e-59: tmp = x + ((y * z) / (z - a)) elif (z <= -6.2e-75) or not (z <= 5.3e+34): tmp = t_1 else: tmp = x + ((t - z) * (y / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(z / Float64(z - t)))) tmp = 0.0 if (z <= -4e+39) tmp = t_1; elseif (z <= -1.86e-59) tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a))); elseif ((z <= -6.2e-75) || !(z <= 5.3e+34)) tmp = t_1; else tmp = Float64(x + Float64(Float64(t - z) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (z / (z - t))); tmp = 0.0; if (z <= -4e+39) tmp = t_1; elseif (z <= -1.86e-59) tmp = x + ((y * z) / (z - a)); elseif ((z <= -6.2e-75) || ~((z <= 5.3e+34))) tmp = t_1; else tmp = x + ((t - z) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+39], t$95$1, If[LessEqual[z, -1.86e-59], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -6.2e-75], N[Not[LessEqual[z, 5.3e+34]], $MachinePrecision]], t$95$1, N[(x + N[(N[(t - z), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.86 \cdot 10^{-59}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-75} \lor \neg \left(z \leq 5.3 \cdot 10^{+34}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - z\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -3.99999999999999976e39 or -1.86000000000000004e-59 < z < -6.20000000000000013e-75 or 5.3000000000000005e34 < z Initial program 99.1%
+-commutative99.1%
associate-*r/77.9%
associate-*l/91.4%
*-commutative91.4%
fma-def91.4%
Simplified91.4%
Taylor expanded in a around 0 68.7%
associate-/l*89.5%
Simplified89.5%
if -3.99999999999999976e39 < z < -1.86000000000000004e-59Initial program 99.9%
+-commutative99.9%
associate-*r/89.9%
associate-*l/99.8%
*-commutative99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in t around 0 90.4%
if -6.20000000000000013e-75 < z < 5.3000000000000005e34Initial program 97.9%
Taylor expanded in a around inf 83.1%
associate-*r/83.1%
neg-mul-183.1%
Simplified83.1%
Taylor expanded in y around 0 79.9%
associate-/l*82.4%
associate-/r/80.6%
Simplified80.6%
Final simplification85.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ z (- z t))))))
(if (<= z -2.1e+42)
t_1
(if (<= z -4e-59)
(+ x (/ (* y z) (- z a)))
(if (<= z -7.2e-77)
(+ x (/ (* y (- z t)) z))
(if (<= z 1e+36) (+ x (* (- t z) (/ y a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (z / (z - t)));
double tmp;
if (z <= -2.1e+42) {
tmp = t_1;
} else if (z <= -4e-59) {
tmp = x + ((y * z) / (z - a));
} else if (z <= -7.2e-77) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 1e+36) {
tmp = x + ((t - z) * (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 - t)))
if (z <= (-2.1d+42)) then
tmp = t_1
else if (z <= (-4d-59)) then
tmp = x + ((y * z) / (z - a))
else if (z <= (-7.2d-77)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 1d+36) then
tmp = x + ((t - z) * (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 - t)));
double tmp;
if (z <= -2.1e+42) {
tmp = t_1;
} else if (z <= -4e-59) {
tmp = x + ((y * z) / (z - a));
} else if (z <= -7.2e-77) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 1e+36) {
tmp = x + ((t - z) * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (z / (z - t))) tmp = 0 if z <= -2.1e+42: tmp = t_1 elif z <= -4e-59: tmp = x + ((y * z) / (z - a)) elif z <= -7.2e-77: tmp = x + ((y * (z - t)) / z) elif z <= 1e+36: tmp = x + ((t - z) * (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 - t)))) tmp = 0.0 if (z <= -2.1e+42) tmp = t_1; elseif (z <= -4e-59) tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a))); elseif (z <= -7.2e-77) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 1e+36) tmp = Float64(x + Float64(Float64(t - z) * 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 - t))); tmp = 0.0; if (z <= -2.1e+42) tmp = t_1; elseif (z <= -4e-59) tmp = x + ((y * z) / (z - a)); elseif (z <= -7.2e-77) tmp = x + ((y * (z - t)) / z); elseif (z <= 1e+36) tmp = x + ((t - z) * (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 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+42], t$95$1, If[LessEqual[z, -4e-59], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.2e-77], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+36], N[(x + N[(N[(t - z), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-59}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-77}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 10^{+36}:\\
\;\;\;\;x + \left(t - z\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.09999999999999995e42 or 1.00000000000000004e36 < z Initial program 99.9%
+-commutative99.9%
associate-*r/76.2%
associate-*l/90.8%
*-commutative90.8%
fma-def90.7%
Simplified90.7%
Taylor expanded in a around 0 67.2%
associate-/l*90.2%
Simplified90.2%
if -2.09999999999999995e42 < z < -4.0000000000000001e-59Initial program 99.9%
+-commutative99.9%
associate-*r/89.9%
associate-*l/99.8%
*-commutative99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in t around 0 90.4%
if -4.0000000000000001e-59 < z < -7.2e-77Initial program 89.3%
+-commutative89.3%
associate-*r/100.0%
associate-*l/99.7%
*-commutative99.7%
fma-def99.8%
Simplified99.8%
Taylor expanded in a around 0 88.9%
if -7.2e-77 < z < 1.00000000000000004e36Initial program 97.9%
Taylor expanded in a around inf 83.1%
associate-*r/83.1%
neg-mul-183.1%
Simplified83.1%
Taylor expanded in y around 0 79.9%
associate-/l*82.4%
associate-/r/80.6%
Simplified80.6%
Final simplification86.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ z (- z t))))))
(if (<= z -2.8e+40)
t_1
(if (<= z -3.7e-59)
(+ x (/ (* y z) (- z a)))
(if (<= z -1.65e-80)
(+ x (/ (* y (- z t)) z))
(if (<= z 1.7e+39) (- x (/ y (/ a (- z t)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (z / (z - t)));
double tmp;
if (z <= -2.8e+40) {
tmp = t_1;
} else if (z <= -3.7e-59) {
tmp = x + ((y * z) / (z - a));
} else if (z <= -1.65e-80) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 1.7e+39) {
tmp = x - (y / (a / (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 / (z - t)))
if (z <= (-2.8d+40)) then
tmp = t_1
else if (z <= (-3.7d-59)) then
tmp = x + ((y * z) / (z - a))
else if (z <= (-1.65d-80)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 1.7d+39) then
tmp = x - (y / (a / (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 / (z - t)));
double tmp;
if (z <= -2.8e+40) {
tmp = t_1;
} else if (z <= -3.7e-59) {
tmp = x + ((y * z) / (z - a));
} else if (z <= -1.65e-80) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 1.7e+39) {
tmp = x - (y / (a / (z - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (z / (z - t))) tmp = 0 if z <= -2.8e+40: tmp = t_1 elif z <= -3.7e-59: tmp = x + ((y * z) / (z - a)) elif z <= -1.65e-80: tmp = x + ((y * (z - t)) / z) elif z <= 1.7e+39: tmp = x - (y / (a / (z - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(z / Float64(z - t)))) tmp = 0.0 if (z <= -2.8e+40) tmp = t_1; elseif (z <= -3.7e-59) tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a))); elseif (z <= -1.65e-80) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 1.7e+39) tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (z / (z - t))); tmp = 0.0; if (z <= -2.8e+40) tmp = t_1; elseif (z <= -3.7e-59) tmp = x + ((y * z) / (z - a)); elseif (z <= -1.65e-80) tmp = x + ((y * (z - t)) / z); elseif (z <= 1.7e+39) tmp = x - (y / (a / (z - t))); 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 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+40], t$95$1, If[LessEqual[z, -3.7e-59], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.65e-80], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+39], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-59}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-80}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+39}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.8000000000000001e40 or 1.6999999999999999e39 < z Initial program 99.9%
+-commutative99.9%
associate-*r/76.2%
associate-*l/90.8%
*-commutative90.8%
fma-def90.7%
Simplified90.7%
Taylor expanded in a around 0 67.2%
associate-/l*90.2%
Simplified90.2%
if -2.8000000000000001e40 < z < -3.6999999999999999e-59Initial program 99.9%
+-commutative99.9%
associate-*r/89.9%
associate-*l/99.8%
*-commutative99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in t around 0 90.4%
if -3.6999999999999999e-59 < z < -1.65e-80Initial program 89.3%
+-commutative89.3%
associate-*r/100.0%
associate-*l/99.7%
*-commutative99.7%
fma-def99.8%
Simplified99.8%
Taylor expanded in a around 0 88.9%
if -1.65e-80 < z < 1.6999999999999999e39Initial program 97.9%
+-commutative97.9%
associate-*r/92.8%
associate-*l/93.7%
*-commutative93.7%
fma-def93.7%
Simplified93.7%
Taylor expanded in a around inf 79.9%
+-commutative79.9%
mul-1-neg79.9%
unsub-neg79.9%
associate-/l*82.4%
Simplified82.4%
Final simplification86.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ z (- z t))))))
(if (<= z -4.6e+40)
t_1
(if (<= z -4.2e-59)
(+ x (/ (* y z) (- z a)))
(if (<= z -2.7e-80)
(+ x (/ (* y (- z t)) z))
(if (<= z 5e+34) (- x (* y (/ (- z t) a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (z / (z - t)));
double tmp;
if (z <= -4.6e+40) {
tmp = t_1;
} else if (z <= -4.2e-59) {
tmp = x + ((y * z) / (z - a));
} else if (z <= -2.7e-80) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 5e+34) {
tmp = x - (y * ((z - t) / 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 - t)))
if (z <= (-4.6d+40)) then
tmp = t_1
else if (z <= (-4.2d-59)) then
tmp = x + ((y * z) / (z - a))
else if (z <= (-2.7d-80)) then
tmp = x + ((y * (z - t)) / z)
else if (z <= 5d+34) then
tmp = x - (y * ((z - t) / 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 - t)));
double tmp;
if (z <= -4.6e+40) {
tmp = t_1;
} else if (z <= -4.2e-59) {
tmp = x + ((y * z) / (z - a));
} else if (z <= -2.7e-80) {
tmp = x + ((y * (z - t)) / z);
} else if (z <= 5e+34) {
tmp = x - (y * ((z - t) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (z / (z - t))) tmp = 0 if z <= -4.6e+40: tmp = t_1 elif z <= -4.2e-59: tmp = x + ((y * z) / (z - a)) elif z <= -2.7e-80: tmp = x + ((y * (z - t)) / z) elif z <= 5e+34: tmp = x - (y * ((z - t) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(z / Float64(z - t)))) tmp = 0.0 if (z <= -4.6e+40) tmp = t_1; elseif (z <= -4.2e-59) tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a))); elseif (z <= -2.7e-80) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / z)); elseif (z <= 5e+34) tmp = Float64(x - Float64(y * Float64(Float64(z - t) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (z / (z - t))); tmp = 0.0; if (z <= -4.6e+40) tmp = t_1; elseif (z <= -4.2e-59) tmp = x + ((y * z) / (z - a)); elseif (z <= -2.7e-80) tmp = x + ((y * (z - t)) / z); elseif (z <= 5e+34) tmp = x - (y * ((z - t) / 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 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+40], t$95$1, If[LessEqual[z, -4.2e-59], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e-80], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+34], N[(x - N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-59}:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-80}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+34}:\\
\;\;\;\;x - y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.59999999999999987e40 or 4.9999999999999998e34 < z Initial program 99.9%
+-commutative99.9%
associate-*r/76.2%
associate-*l/90.8%
*-commutative90.8%
fma-def90.7%
Simplified90.7%
Taylor expanded in a around 0 67.2%
associate-/l*90.2%
Simplified90.2%
if -4.59999999999999987e40 < z < -4.19999999999999993e-59Initial program 99.9%
+-commutative99.9%
associate-*r/89.9%
associate-*l/99.8%
*-commutative99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in t around 0 90.4%
if -4.19999999999999993e-59 < z < -2.7000000000000002e-80Initial program 89.3%
+-commutative89.3%
associate-*r/100.0%
associate-*l/99.7%
*-commutative99.7%
fma-def99.8%
Simplified99.8%
Taylor expanded in a around 0 88.9%
if -2.7000000000000002e-80 < z < 4.9999999999999998e34Initial program 97.9%
Taylor expanded in a around inf 83.1%
associate-*r/83.1%
neg-mul-183.1%
Simplified83.1%
Final simplification87.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e-20) (not (<= z 8e-135))) (+ x (* y (/ z (- z a)))) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e-20) || !(z <= 8e-135)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (t / 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 <= (-1.45d-20)) .or. (.not. (z <= 8d-135))) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (y * (t / 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 <= -1.45e-20) || !(z <= 8e-135)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e-20) or not (z <= 8e-135): tmp = x + (y * (z / (z - a))) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e-20) || !(z <= 8e-135)) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e-20) || ~((z <= 8e-135))) tmp = x + (y * (z / (z - a))); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e-20], N[Not[LessEqual[z, 8e-135]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-20} \lor \neg \left(z \leq 8 \cdot 10^{-135}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.45e-20 or 8.0000000000000003e-135 < z Initial program 99.9%
Taylor expanded in t around 0 80.4%
if -1.45e-20 < z < 8.0000000000000003e-135Initial program 96.8%
Taylor expanded in z around 0 78.6%
Final simplification79.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e-20) (not (<= z 0.00088))) (+ x (* y (/ z (- z a)))) (+ x (* (- t z) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e-20) || !(z <= 0.00088)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + ((t - z) * (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 <= (-1.45d-20)) .or. (.not. (z <= 0.00088d0))) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + ((t - z) * (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 <= -1.45e-20) || !(z <= 0.00088)) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + ((t - z) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e-20) or not (z <= 0.00088): tmp = x + (y * (z / (z - a))) else: tmp = x + ((t - z) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e-20) || !(z <= 0.00088)) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(Float64(t - z) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e-20) || ~((z <= 0.00088))) tmp = x + (y * (z / (z - a))); else tmp = x + ((t - z) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e-20], N[Not[LessEqual[z, 0.00088]], $MachinePrecision]], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - z), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-20} \lor \neg \left(z \leq 0.00088\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - z\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.45e-20 or 8.80000000000000031e-4 < z Initial program 99.9%
Taylor expanded in t around 0 81.4%
if -1.45e-20 < z < 8.80000000000000031e-4Initial program 97.2%
Taylor expanded in a around inf 82.1%
associate-*r/82.1%
neg-mul-182.1%
Simplified82.1%
Taylor expanded in y around 0 78.3%
associate-/l*81.4%
associate-/r/79.8%
Simplified79.8%
Final simplification80.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.12e+142) (not (<= t 2.15e-40))) (- x (/ (* y t) (- z a))) (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.12e+142) || !(t <= 2.15e-40)) {
tmp = x - ((y * t) / (z - 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 ((t <= (-1.12d+142)) .or. (.not. (t <= 2.15d-40))) then
tmp = x - ((y * t) / (z - 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 ((t <= -1.12e+142) || !(t <= 2.15e-40)) {
tmp = x - ((y * t) / (z - a));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.12e+142) or not (t <= 2.15e-40): tmp = x - ((y * t) / (z - a)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.12e+142) || !(t <= 2.15e-40)) tmp = Float64(x - Float64(Float64(y * t) / Float64(z - 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 ((t <= -1.12e+142) || ~((t <= 2.15e-40))) tmp = x - ((y * t) / (z - a)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.12e+142], N[Not[LessEqual[t, 2.15e-40]], $MachinePrecision]], N[(x - N[(N[(y * t), $MachinePrecision] / N[(z - 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}\;t \leq -1.12 \cdot 10^{+142} \lor \neg \left(t \leq 2.15 \cdot 10^{-40}\right):\\
\;\;\;\;x - \frac{y \cdot t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -1.11999999999999996e142 or 2.1500000000000001e-40 < t Initial program 97.0%
Taylor expanded in t around inf 81.5%
associate-*r/81.5%
mul-1-neg81.5%
distribute-rgt-neg-out81.5%
Simplified81.5%
if -1.11999999999999996e142 < t < 2.1500000000000001e-40Initial program 99.7%
Taylor expanded in t around 0 87.5%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.5e-20) (+ x y) (if (<= z 3.05e+41) (+ x (* y (/ t a))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e-20) {
tmp = x + y;
} else if (z <= 3.05e+41) {
tmp = x + (y * (t / 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 <= (-8.5d-20)) then
tmp = x + y
else if (z <= 3.05d+41) then
tmp = x + (y * (t / 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 <= -8.5e-20) {
tmp = x + y;
} else if (z <= 3.05e+41) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.5e-20: tmp = x + y elif z <= 3.05e+41: tmp = x + (y * (t / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e-20) tmp = Float64(x + y); elseif (z <= 3.05e+41) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.5e-20) tmp = x + y; elseif (z <= 3.05e+41) tmp = x + (y * (t / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e-20], N[(x + y), $MachinePrecision], If[LessEqual[z, 3.05e+41], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{-20}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+41}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -8.5000000000000005e-20 or 3.04999999999999999e41 < z Initial program 99.9%
+-commutative99.9%
associate-*r/77.1%
associate-*l/91.4%
*-commutative91.4%
fma-def91.4%
Simplified91.4%
Taylor expanded in z around inf 74.5%
if -8.5000000000000005e-20 < z < 3.04999999999999999e41Initial program 97.4%
Taylor expanded in z around 0 74.4%
Final simplification74.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -5e-84) x (if (<= a 1.65e+189) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5e-84) {
tmp = x;
} else if (a <= 1.65e+189) {
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 <= (-5d-84)) then
tmp = x
else if (a <= 1.65d+189) 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 <= -5e-84) {
tmp = x;
} else if (a <= 1.65e+189) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5e-84: tmp = x elif a <= 1.65e+189: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5e-84) tmp = x; elseif (a <= 1.65e+189) 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 <= -5e-84) tmp = x; elseif (a <= 1.65e+189) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5e-84], x, If[LessEqual[a, 1.65e+189], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{-84}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{+189}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.0000000000000002e-84 or 1.6500000000000001e189 < a Initial program 99.6%
+-commutative99.6%
associate-*r/84.5%
associate-*l/94.3%
*-commutative94.3%
fma-def94.3%
Simplified94.3%
Taylor expanded in y around 0 63.5%
if -5.0000000000000002e-84 < a < 1.6500000000000001e189Initial program 98.1%
+-commutative98.1%
associate-*r/85.4%
associate-*l/92.3%
*-commutative92.3%
fma-def92.2%
Simplified92.2%
Taylor expanded in z around inf 59.0%
Final simplification60.7%
(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 98.7%
+-commutative98.7%
associate-*r/85.1%
associate-*l/93.0%
*-commutative93.0%
fma-def93.0%
Simplified93.0%
Taylor expanded in y around 0 48.1%
Final simplification48.1%
(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 2023181
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))