
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
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 = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.4%
+-commutative99.4%
fma-def99.5%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-227) (not (<= (* a 120.0) 2e-10))) (+ (* a 120.0) (* -60.0 (/ y (- z t)))) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-227) || !((a * 120.0) <= 2e-10)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - 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 (((a * 120.0d0) <= (-2d-227)) .or. (.not. ((a * 120.0d0) <= 2d-10))) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-227) || !((a * 120.0) <= 2e-10)) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e-227) or not ((a * 120.0) <= 2e-10): tmp = (a * 120.0) + (-60.0 * (y / (z - t))) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-227) || !(Float64(a * 120.0) <= 2e-10)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2e-227) || ~(((a * 120.0) <= 2e-10))) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-227], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-10]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-227} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-10}\right):\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.99999999999999989e-227 or 2.00000000000000007e-10 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 82.7%
if -1.99999999999999989e-227 < (*.f64 a 120) < 2.00000000000000007e-10Initial program 98.3%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.0%
Final simplification82.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e+32)
(* a 120.0)
(if (<= (* a 120.0) 1e+98)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e+32) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+98) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / 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 ((a * 120.0d0) <= (-1d+32)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d+98) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e+32) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+98) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e+32: tmp = a * 120.0 elif (a * 120.0) <= 1e+98: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (-60.0 * (x / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e+32) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e+98) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e+32) tmp = a * 120.0; elseif ((a * 120.0) <= 1e+98) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (-60.0 * (x / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+32], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+98], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+32}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+98}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.00000000000000005e32Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 76.9%
if -1.00000000000000005e32 < (*.f64 a 120) < 9.99999999999999998e97Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 72.4%
if 9.99999999999999998e97 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in x around inf 92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in z around 0 82.5%
Final simplification75.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -8e+220)
t_1
(if (<= y 6.9e-94)
(* a 120.0)
(if (<= y 2.9e-64)
(* 60.0 (/ x (- z t)))
(if (<= y 6.8e+55) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -8e+220) {
tmp = t_1;
} else if (y <= 6.9e-94) {
tmp = a * 120.0;
} else if (y <= 2.9e-64) {
tmp = 60.0 * (x / (z - t));
} else if (y <= 6.8e+55) {
tmp = a * 120.0;
} 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 = (-60.0d0) * (y / (z - t))
if (y <= (-8d+220)) then
tmp = t_1
else if (y <= 6.9d-94) then
tmp = a * 120.0d0
else if (y <= 2.9d-64) then
tmp = 60.0d0 * (x / (z - t))
else if (y <= 6.8d+55) then
tmp = a * 120.0d0
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 = -60.0 * (y / (z - t));
double tmp;
if (y <= -8e+220) {
tmp = t_1;
} else if (y <= 6.9e-94) {
tmp = a * 120.0;
} else if (y <= 2.9e-64) {
tmp = 60.0 * (x / (z - t));
} else if (y <= 6.8e+55) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if y <= -8e+220: tmp = t_1 elif y <= 6.9e-94: tmp = a * 120.0 elif y <= 2.9e-64: tmp = 60.0 * (x / (z - t)) elif y <= 6.8e+55: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (y <= -8e+220) tmp = t_1; elseif (y <= 6.9e-94) tmp = Float64(a * 120.0); elseif (y <= 2.9e-64) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (y <= 6.8e+55) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); tmp = 0.0; if (y <= -8e+220) tmp = t_1; elseif (y <= 6.9e-94) tmp = a * 120.0; elseif (y <= 2.9e-64) tmp = 60.0 * (x / (z - t)); elseif (y <= 6.8e+55) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8e+220], t$95$1, If[LessEqual[y, 6.9e-94], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 2.9e-64], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+55], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -8 \cdot 10^{+220}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.9 \cdot 10^{-94}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-64}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+55}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -8e220 or 6.7999999999999996e55 < y Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 63.0%
if -8e220 < y < 6.9000000000000003e-94 or 2.8999999999999999e-64 < y < 6.7999999999999996e55Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 60.3%
if 6.9000000000000003e-94 < y < 2.8999999999999999e-64Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 73.2%
Final simplification61.5%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.1e+222)
(* -60.0 (/ y (- z t)))
(if (<= y 1.9e-92)
(* a 120.0)
(if (<= y 2.9e-64)
(* 60.0 (/ x (- z t)))
(if (<= y 6.8e+55) (* a 120.0) (/ (* y -60.0) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.1e+222) {
tmp = -60.0 * (y / (z - t));
} else if (y <= 1.9e-92) {
tmp = a * 120.0;
} else if (y <= 2.9e-64) {
tmp = 60.0 * (x / (z - t));
} else if (y <= 6.8e+55) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / (z - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.1d+222)) then
tmp = (-60.0d0) * (y / (z - t))
else if (y <= 1.9d-92) then
tmp = a * 120.0d0
else if (y <= 2.9d-64) then
tmp = 60.0d0 * (x / (z - t))
else if (y <= 6.8d+55) then
tmp = a * 120.0d0
else
tmp = (y * (-60.0d0)) / (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.1e+222) {
tmp = -60.0 * (y / (z - t));
} else if (y <= 1.9e-92) {
tmp = a * 120.0;
} else if (y <= 2.9e-64) {
tmp = 60.0 * (x / (z - t));
} else if (y <= 6.8e+55) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.1e+222: tmp = -60.0 * (y / (z - t)) elif y <= 1.9e-92: tmp = a * 120.0 elif y <= 2.9e-64: tmp = 60.0 * (x / (z - t)) elif y <= 6.8e+55: tmp = a * 120.0 else: tmp = (y * -60.0) / (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.1e+222) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (y <= 1.9e-92) tmp = Float64(a * 120.0); elseif (y <= 2.9e-64) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (y <= 6.8e+55) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y * -60.0) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.1e+222) tmp = -60.0 * (y / (z - t)); elseif (y <= 1.9e-92) tmp = a * 120.0; elseif (y <= 2.9e-64) tmp = 60.0 * (x / (z - t)); elseif (y <= 6.8e+55) tmp = a * 120.0; else tmp = (y * -60.0) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.1e+222], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-92], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 2.9e-64], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+55], N[(a * 120.0), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+222}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-92}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-64}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+55}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -1.1000000000000001e222Initial program 94.3%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 88.8%
if -1.1000000000000001e222 < y < 1.9e-92 or 2.8999999999999999e-64 < y < 6.7999999999999996e55Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 60.3%
if 1.9e-92 < y < 2.8999999999999999e-64Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 73.2%
if 6.7999999999999996e55 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 55.3%
*-commutative55.3%
associate-*l/55.4%
Applied egg-rr55.4%
Final simplification61.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.2e+83) (not (<= x 1.05e+117))) (+ (* a 120.0) (* (/ 60.0 (- z t)) x)) (+ (* a 120.0) (* -60.0 (/ y (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.2e+83) || !(x <= 1.05e+117)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - 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 ((x <= (-4.2d+83)) .or. (.not. (x <= 1.05d+117))) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.2e+83) || !(x <= 1.05e+117)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.2e+83) or not (x <= 1.05e+117): tmp = (a * 120.0) + ((60.0 / (z - t)) * x) else: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.2e+83) || !(x <= 1.05e+117)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -4.2e+83) || ~((x <= 1.05e+117))) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); else tmp = (a * 120.0) + (-60.0 * (y / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.2e+83], N[Not[LessEqual[x, 1.05e+117]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+83} \lor \neg \left(x \leq 1.05 \cdot 10^{+117}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if x < -4.20000000000000005e83 or 1.0500000000000001e117 < x Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.9%
associate-*r/91.9%
associate-*l/91.8%
*-commutative91.8%
Simplified91.8%
if -4.20000000000000005e83 < x < 1.0500000000000001e117Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.3%
Final simplification92.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.8e+83) (not (<= x 3e+114))) (+ (* a 120.0) (* (/ 60.0 (- z t)) x)) (+ (* a 120.0) (/ (* y -60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.8e+83) || !(x <= 3e+114)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - 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 ((x <= (-2.8d+83)) .or. (.not. (x <= 3d+114))) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.8e+83) || !(x <= 3e+114)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.8e+83) or not (x <= 3e+114): tmp = (a * 120.0) + ((60.0 / (z - t)) * x) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.8e+83) || !(x <= 3e+114)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.8e+83) || ~((x <= 3e+114))) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.8e+83], N[Not[LessEqual[x, 3e+114]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+83} \lor \neg \left(x \leq 3 \cdot 10^{+114}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if x < -2.8e83 or 3e114 < x Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.9%
associate-*r/91.9%
associate-*l/91.8%
*-commutative91.8%
Simplified91.8%
if -2.8e83 < x < 3e114Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.3%
associate-*r/93.3%
Simplified93.3%
Final simplification92.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3.9e+83) (not (<= x 4.5e+117))) (+ (* a 120.0) (/ (* 60.0 x) (- z t))) (+ (* a 120.0) (/ (* y -60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.9e+83) || !(x <= 4.5e+117)) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - 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 ((x <= (-3.9d+83)) .or. (.not. (x <= 4.5d+117))) then
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - t))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.9e+83) || !(x <= 4.5e+117)) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3.9e+83) or not (x <= 4.5e+117): tmp = (a * 120.0) + ((60.0 * x) / (z - t)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -3.9e+83) || !(x <= 4.5e+117)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -3.9e+83) || ~((x <= 4.5e+117))) tmp = (a * 120.0) + ((60.0 * x) / (z - t)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -3.9e+83], N[Not[LessEqual[x, 4.5e+117]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{+83} \lor \neg \left(x \leq 4.5 \cdot 10^{+117}\right):\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if x < -3.9000000000000002e83 or 4.5e117 < x Initial program 98.8%
Taylor expanded in x around inf 91.9%
*-commutative91.9%
Simplified91.9%
if -3.9000000000000002e83 < x < 4.5e117Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.3%
associate-*r/93.3%
Simplified93.3%
Final simplification92.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1e+30) (not (<= a 1.45e+96))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1e+30) || !(a <= 1.45e+96)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - 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 ((a <= (-1d+30)) .or. (.not. (a <= 1.45d+96))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1e+30) || !(a <= 1.45e+96)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1e+30) or not (a <= 1.45e+96): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1e+30) || !(a <= 1.45e+96)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1e+30) || ~((a <= 1.45e+96))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1e+30], N[Not[LessEqual[a, 1.45e+96]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+30} \lor \neg \left(a \leq 1.45 \cdot 10^{+96}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1e30 or 1.44999999999999989e96 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 77.7%
if -1e30 < a < 1.44999999999999989e96Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 72.4%
Final simplification74.6%
(FPCore (x y z t a) :precision binary64 (+ (* (/ 60.0 (- z t)) (- x y)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
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 = ((60.0d0 / (z - t)) * (x - y)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 / (z - t)) * (x - y)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 / (z - t)) * (x - y)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.9e+220) (not (<= y 5.8e+55))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.9e+220) || !(y <= 5.8e+55)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.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 ((y <= (-2.9d+220)) .or. (.not. (y <= 5.8d+55))) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.9e+220) || !(y <= 5.8e+55)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.9e+220) or not (y <= 5.8e+55): tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.9e+220) || !(y <= 5.8e+55)) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.9e+220) || ~((y <= 5.8e+55))) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.9e+220], N[Not[LessEqual[y, 5.8e+55]], $MachinePrecision]], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+220} \lor \neg \left(y \leq 5.8 \cdot 10^{+55}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -2.89999999999999991e220 or 5.7999999999999997e55 < y Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 63.0%
if -2.89999999999999991e220 < y < 5.7999999999999997e55Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 58.2%
Final simplification59.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.06e-250) (not (<= a 1.18e-110))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.06e-250) || !(a <= 1.18e-110)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.06d-250)) .or. (.not. (a <= 1.18d-110))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.06e-250) || !(a <= 1.18e-110)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.06e-250) or not (a <= 1.18e-110): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.06e-250) || !(a <= 1.18e-110)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.06e-250) || ~((a <= 1.18e-110))) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.06e-250], N[Not[LessEqual[a, 1.18e-110]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.06 \cdot 10^{-250} \lor \neg \left(a \leq 1.18 \cdot 10^{-110}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -1.05999999999999993e-250 or 1.18e-110 < a Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.1%
if -1.05999999999999993e-250 < a < 1.18e-110Initial program 97.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around 0 63.9%
Taylor expanded in z around inf 43.7%
Taylor expanded in y around inf 34.5%
Final simplification52.9%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.3e+235) (* -60.0 (/ y z)) (if (<= y 4.4e+173) (* a 120.0) (* 60.0 (/ y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.3e+235) {
tmp = -60.0 * (y / z);
} else if (y <= 4.4e+173) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-2.3d+235)) then
tmp = (-60.0d0) * (y / z)
else if (y <= 4.4d+173) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.3e+235) {
tmp = -60.0 * (y / z);
} else if (y <= 4.4e+173) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.3e+235: tmp = -60.0 * (y / z) elif y <= 4.4e+173: tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.3e+235) tmp = Float64(-60.0 * Float64(y / z)); elseif (y <= 4.4e+173) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.3e+235) tmp = -60.0 * (y / z); elseif (y <= 4.4e+173) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.3e+235], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+173], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+235}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+173}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if y < -2.3e235Initial program 93.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 99.9%
Taylor expanded in z around inf 71.3%
Taylor expanded in y around inf 64.8%
if -2.3e235 < y < 4.4e173Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.5%
if 4.4e173 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 65.8%
Taylor expanded in z around 0 42.2%
Final simplification54.3%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
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 = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 48.9%
Final simplification48.9%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
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 = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023322
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))