
(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 15 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 (* (/ (- x y) (- z t)) 60.0)))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, (((x - y) / (z - t)) * 60.0));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0)) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{x - y}{z - t} \cdot 60\right)
\end{array}
Initial program 99.0%
+-commutative99.0%
fma-def99.1%
*-commutative99.1%
associate-*l/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) * (60.0 / (z - t))));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{60}{z - t}\right)
\end{array}
Initial program 99.0%
+-commutative99.0%
fma-def99.1%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (/ -60.0 (/ t (- x y))) (* a 120.0)))
(t_2 (+ (/ (* x 60.0) z) (* a 120.0))))
(if (<= z -1e-93)
t_2
(if (<= z 4.8e-58)
t_1
(if (<= z 5.4e-21)
(* 60.0 (/ (- x y) z))
(if (<= z 1.75e+39)
t_1
(if (<= z 4.3e+170) t_2 (+ (* -60.0 (/ y z)) (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (-60.0 / (t / (x - y))) + (a * 120.0);
double t_2 = ((x * 60.0) / z) + (a * 120.0);
double tmp;
if (z <= -1e-93) {
tmp = t_2;
} else if (z <= 4.8e-58) {
tmp = t_1;
} else if (z <= 5.4e-21) {
tmp = 60.0 * ((x - y) / z);
} else if (z <= 1.75e+39) {
tmp = t_1;
} else if (z <= 4.3e+170) {
tmp = t_2;
} else {
tmp = (-60.0 * (y / z)) + (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((-60.0d0) / (t / (x - y))) + (a * 120.0d0)
t_2 = ((x * 60.0d0) / z) + (a * 120.0d0)
if (z <= (-1d-93)) then
tmp = t_2
else if (z <= 4.8d-58) then
tmp = t_1
else if (z <= 5.4d-21) then
tmp = 60.0d0 * ((x - y) / z)
else if (z <= 1.75d+39) then
tmp = t_1
else if (z <= 4.3d+170) then
tmp = t_2
else
tmp = ((-60.0d0) * (y / z)) + (a * 120.0d0)
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 / (t / (x - y))) + (a * 120.0);
double t_2 = ((x * 60.0) / z) + (a * 120.0);
double tmp;
if (z <= -1e-93) {
tmp = t_2;
} else if (z <= 4.8e-58) {
tmp = t_1;
} else if (z <= 5.4e-21) {
tmp = 60.0 * ((x - y) / z);
} else if (z <= 1.75e+39) {
tmp = t_1;
} else if (z <= 4.3e+170) {
tmp = t_2;
} else {
tmp = (-60.0 * (y / z)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (-60.0 / (t / (x - y))) + (a * 120.0) t_2 = ((x * 60.0) / z) + (a * 120.0) tmp = 0 if z <= -1e-93: tmp = t_2 elif z <= 4.8e-58: tmp = t_1 elif z <= 5.4e-21: tmp = 60.0 * ((x - y) / z) elif z <= 1.75e+39: tmp = t_1 elif z <= 4.3e+170: tmp = t_2 else: tmp = (-60.0 * (y / z)) + (a * 120.0) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-60.0 / Float64(t / Float64(x - y))) + Float64(a * 120.0)) t_2 = Float64(Float64(Float64(x * 60.0) / z) + Float64(a * 120.0)) tmp = 0.0 if (z <= -1e-93) tmp = t_2; elseif (z <= 4.8e-58) tmp = t_1; elseif (z <= 5.4e-21) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (z <= 1.75e+39) tmp = t_1; elseif (z <= 4.3e+170) tmp = t_2; else tmp = Float64(Float64(-60.0 * Float64(y / z)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (-60.0 / (t / (x - y))) + (a * 120.0); t_2 = ((x * 60.0) / z) + (a * 120.0); tmp = 0.0; if (z <= -1e-93) tmp = t_2; elseif (z <= 4.8e-58) tmp = t_1; elseif (z <= 5.4e-21) tmp = 60.0 * ((x - y) / z); elseif (z <= 1.75e+39) tmp = t_1; elseif (z <= 4.3e+170) tmp = t_2; else tmp = (-60.0 * (y / z)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(-60.0 / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * 60.0), $MachinePrecision] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-93], t$95$2, If[LessEqual[z, 4.8e-58], t$95$1, If[LessEqual[z, 5.4e-21], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+39], t$95$1, If[LessEqual[z, 4.3e+170], t$95$2, N[(N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-60}{\frac{t}{x - y}} + a \cdot 120\\
t_2 := \frac{x \cdot 60}{z} + a \cdot 120\\
\mathbf{if}\;z \leq -1 \cdot 10^{-93}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-21}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+170}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z} + a \cdot 120\\
\end{array}
\end{array}
if z < -9.999999999999999e-94 or 1.7500000000000001e39 < z < 4.2999999999999999e170Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 85.2%
associate-*r/84.2%
*-commutative84.2%
associate-/l*85.1%
Simplified85.1%
Taylor expanded in z around inf 80.9%
*-commutative80.9%
associate-*l/80.0%
Simplified80.0%
if -9.999999999999999e-94 < z < 4.8000000000000001e-58 or 5.4000000000000002e-21 < z < 1.7500000000000001e39Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 88.5%
associate-*r/88.5%
associate-/l*88.6%
Simplified88.6%
if 4.8000000000000001e-58 < z < 5.4000000000000002e-21Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 85.9%
Taylor expanded in z around inf 86.5%
if 4.2999999999999999e170 < z Initial program 97.1%
Taylor expanded in x around 0 89.9%
Taylor expanded in z around inf 87.4%
Final simplification84.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e-34) (not (<= (* a 120.0) 4e-177))) (+ (/ 60.0 (/ (- z t) x)) (* a 120.0)) (* (/ (- x y) (- z t)) 60.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5e-34) || !((a * 120.0) <= 4e-177)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = ((x - y) / (z - t)) * 60.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 (((a * 120.0d0) <= (-5d-34)) .or. (.not. ((a * 120.0d0) <= 4d-177))) then
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
else
tmp = ((x - y) / (z - t)) * 60.0d0
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) <= -5e-34) || !((a * 120.0) <= 4e-177)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = ((x - y) / (z - t)) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5e-34) or not ((a * 120.0) <= 4e-177): tmp = (60.0 / ((z - t) / x)) + (a * 120.0) else: tmp = ((x - y) / (z - t)) * 60.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -5e-34) || !(Float64(a * 120.0) <= 4e-177)) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -5e-34) || ~(((a * 120.0) <= 4e-177))) tmp = (60.0 / ((z - t) / x)) + (a * 120.0); else tmp = ((x - y) / (z - t)) * 60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-34], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-177]], $MachinePrecision]], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-34} \lor \neg \left(a \cdot 120 \leq 4 \cdot 10^{-177}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.0000000000000003e-34 or 3.99999999999999981e-177 < (*.f64 a 120) Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 87.4%
if -5.0000000000000003e-34 < (*.f64 a 120) < 3.99999999999999981e-177Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.6%
Final simplification86.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- x y) -5e+82) (not (<= (- x y) 1e+103))) (* (/ (- x y) (- z t)) 60.0) (+ (* -60.0 (/ y z)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x - y) <= -5e+82) || !((x - y) <= 1e+103)) {
tmp = ((x - y) / (z - t)) * 60.0;
} else {
tmp = (-60.0 * (y / z)) + (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 (((x - y) <= (-5d+82)) .or. (.not. ((x - y) <= 1d+103))) then
tmp = ((x - y) / (z - t)) * 60.0d0
else
tmp = ((-60.0d0) * (y / z)) + (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 (((x - y) <= -5e+82) || !((x - y) <= 1e+103)) {
tmp = ((x - y) / (z - t)) * 60.0;
} else {
tmp = (-60.0 * (y / z)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x - y) <= -5e+82) or not ((x - y) <= 1e+103): tmp = ((x - y) / (z - t)) * 60.0 else: tmp = (-60.0 * (y / z)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(x - y) <= -5e+82) || !(Float64(x - y) <= 1e+103)) tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0); else tmp = Float64(Float64(-60.0 * Float64(y / z)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((x - y) <= -5e+82) || ~(((x - y) <= 1e+103))) tmp = ((x - y) / (z - t)) * 60.0; else tmp = (-60.0 * (y / z)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(x - y), $MachinePrecision], -5e+82], N[Not[LessEqual[N[(x - y), $MachinePrecision], 1e+103]], $MachinePrecision]], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision], N[(N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -5 \cdot 10^{+82} \lor \neg \left(x - y \leq 10^{+103}\right):\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z} + a \cdot 120\\
\end{array}
\end{array}
if (-.f64 x y) < -5.00000000000000015e82 or 1e103 < (-.f64 x y) Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 70.9%
if -5.00000000000000015e82 < (-.f64 x y) < 1e103Initial program 99.9%
Taylor expanded in x around 0 93.6%
Taylor expanded in z around inf 83.2%
Final simplification76.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (- x y) -5e+82)
(/ -60.0 (/ (- t z) (- x y)))
(if (<= (- x y) 1e+103)
(+ (* -60.0 (/ y z)) (* a 120.0))
(* (/ (- x y) (- z t)) 60.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -5e+82) {
tmp = -60.0 / ((t - z) / (x - y));
} else if ((x - y) <= 1e+103) {
tmp = (-60.0 * (y / z)) + (a * 120.0);
} else {
tmp = ((x - y) / (z - t)) * 60.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 ((x - y) <= (-5d+82)) then
tmp = (-60.0d0) / ((t - z) / (x - y))
else if ((x - y) <= 1d+103) then
tmp = ((-60.0d0) * (y / z)) + (a * 120.0d0)
else
tmp = ((x - y) / (z - t)) * 60.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -5e+82) {
tmp = -60.0 / ((t - z) / (x - y));
} else if ((x - y) <= 1e+103) {
tmp = (-60.0 * (y / z)) + (a * 120.0);
} else {
tmp = ((x - y) / (z - t)) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -5e+82: tmp = -60.0 / ((t - z) / (x - y)) elif (x - y) <= 1e+103: tmp = (-60.0 * (y / z)) + (a * 120.0) else: tmp = ((x - y) / (z - t)) * 60.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x - y) <= -5e+82) tmp = Float64(-60.0 / Float64(Float64(t - z) / Float64(x - y))); elseif (Float64(x - y) <= 1e+103) tmp = Float64(Float64(-60.0 * Float64(y / z)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x - y) <= -5e+82) tmp = -60.0 / ((t - z) / (x - y)); elseif ((x - y) <= 1e+103) tmp = (-60.0 * (y / z)) + (a * 120.0); else tmp = ((x - y) / (z - t)) * 60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x - y), $MachinePrecision], -5e+82], N[(-60.0 / N[(N[(t - z), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 1e+103], N[(N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -5 \cdot 10^{+82}:\\
\;\;\;\;\frac{-60}{\frac{t - z}{x - y}}\\
\mathbf{elif}\;x - y \leq 10^{+103}:\\
\;\;\;\;-60 \cdot \frac{y}{z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\
\end{array}
\end{array}
if (-.f64 x y) < -5.00000000000000015e82Initial program 98.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.9%
associate-*r/71.8%
frac-2neg71.8%
sub-neg71.8%
distribute-neg-in71.8%
remove-double-neg71.8%
Applied egg-rr71.8%
distribute-lft-neg-in71.8%
metadata-eval71.8%
associate-/l*71.9%
+-commutative71.9%
unsub-neg71.9%
Simplified71.9%
if -5.00000000000000015e82 < (-.f64 x y) < 1e103Initial program 99.9%
Taylor expanded in x around 0 93.6%
Taylor expanded in z around inf 83.2%
if 1e103 < (-.f64 x y) Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 69.9%
Final simplification76.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.5e-37)
(* a 120.0)
(if (<= a 2.4e-284)
(* -60.0 (/ (- x y) t))
(if (<= a 2.7e-135) (* 60.0 (/ (- x y) z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.5e-37) {
tmp = a * 120.0;
} else if (a <= 2.4e-284) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 2.7e-135) {
tmp = 60.0 * ((x - y) / z);
} 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 (a <= (-5.5d-37)) then
tmp = a * 120.0d0
else if (a <= 2.4d-284) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 2.7d-135) then
tmp = 60.0d0 * ((x - y) / z)
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 (a <= -5.5e-37) {
tmp = a * 120.0;
} else if (a <= 2.4e-284) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 2.7e-135) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.5e-37: tmp = a * 120.0 elif a <= 2.4e-284: tmp = -60.0 * ((x - y) / t) elif a <= 2.7e-135: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.5e-37) tmp = Float64(a * 120.0); elseif (a <= 2.4e-284) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 2.7e-135) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.5e-37) tmp = a * 120.0; elseif (a <= 2.4e-284) tmp = -60.0 * ((x - y) / t); elseif (a <= 2.7e-135) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.5e-37], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.4e-284], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e-135], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-37}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-284}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-135}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -5.4999999999999998e-37 or 2.69999999999999999e-135 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.9%
if -5.4999999999999998e-37 < a < 2.40000000000000003e-284Initial program 98.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.1%
Taylor expanded in z around 0 53.1%
if 2.40000000000000003e-284 < a < 2.69999999999999999e-135Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 85.8%
Taylor expanded in z around inf 57.7%
Final simplification65.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -5.5e+42) (not (<= x 3.2e+63))) (+ (/ 60.0 (/ (- z t) x)) (* a 120.0)) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -5.5e+42) || !(x <= 3.2e+63)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (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 ((x <= (-5.5d+42)) .or. (.not. (x <= 3.2d+63))) then
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / (z - t)) + (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 ((x <= -5.5e+42) || !(x <= 3.2e+63)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -5.5e+42) or not (x <= 3.2e+63): tmp = (60.0 / ((z - t) / x)) + (a * 120.0) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -5.5e+42) || !(x <= 3.2e+63)) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -5.5e+42) || ~((x <= 3.2e+63))) tmp = (60.0 / ((z - t) / x)) + (a * 120.0); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -5.5e+42], N[Not[LessEqual[x, 3.2e+63]], $MachinePrecision]], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+42} \lor \neg \left(x \leq 3.2 \cdot 10^{+63}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -5.50000000000000001e42 or 3.20000000000000011e63 < x Initial program 97.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 90.3%
if -5.50000000000000001e42 < x < 3.20000000000000011e63Initial program 99.9%
Taylor expanded in x around 0 97.5%
Final simplification94.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.1e-36) (not (<= a 4.6e-36))) (* a 120.0) (* (/ (- x y) (- z t)) 60.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.1e-36) || !(a <= 4.6e-36)) {
tmp = a * 120.0;
} else {
tmp = ((x - y) / (z - t)) * 60.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 ((a <= (-5.1d-36)) .or. (.not. (a <= 4.6d-36))) then
tmp = a * 120.0d0
else
tmp = ((x - y) / (z - t)) * 60.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.1e-36) || !(a <= 4.6e-36)) {
tmp = a * 120.0;
} else {
tmp = ((x - y) / (z - t)) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.1e-36) or not (a <= 4.6e-36): tmp = a * 120.0 else: tmp = ((x - y) / (z - t)) * 60.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.1e-36) || !(a <= 4.6e-36)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.1e-36) || ~((a <= 4.6e-36))) tmp = a * 120.0; else tmp = ((x - y) / (z - t)) * 60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.1e-36], N[Not[LessEqual[a, 4.6e-36]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.1 \cdot 10^{-36} \lor \neg \left(a \leq 4.6 \cdot 10^{-36}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\
\end{array}
\end{array}
if a < -5.09999999999999973e-36 or 4.59999999999999993e-36 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.8%
if -5.09999999999999973e-36 < a < 4.59999999999999993e-36Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 80.4%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.8e-37) (not (<= a 4.1e-187))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.8e-37) || !(a <= 4.1e-187)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - 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 ((a <= (-4.8d-37)) .or. (.not. (a <= 4.1d-187))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - 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 ((a <= -4.8e-37) || !(a <= 4.1e-187)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.8e-37) or not (a <= 4.1e-187): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.8e-37) || !(a <= 4.1e-187)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.8e-37) || ~((a <= 4.1e-187))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.8e-37], N[Not[LessEqual[a, 4.1e-187]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{-37} \lor \neg \left(a \leq 4.1 \cdot 10^{-187}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -4.79999999999999982e-37 or 4.1000000000000002e-187 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.0%
if -4.79999999999999982e-37 < a < 4.1000000000000002e-187Initial program 98.4%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 86.3%
Taylor expanded in z around 0 50.2%
Final simplification63.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.7e-43) (not (<= a 4.1e-167))) (* a 120.0) (/ -60.0 (/ (- z t) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.7e-43) || !(a <= 4.1e-167)) {
tmp = a * 120.0;
} else {
tmp = -60.0 / ((z - t) / 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 ((a <= (-4.7d-43)) .or. (.not. (a <= 4.1d-167))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) / ((z - t) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.7e-43) || !(a <= 4.1e-167)) {
tmp = a * 120.0;
} else {
tmp = -60.0 / ((z - t) / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.7e-43) or not (a <= 4.1e-167): tmp = a * 120.0 else: tmp = -60.0 / ((z - t) / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.7e-43) || !(a <= 4.1e-167)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 / Float64(Float64(z - t) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.7e-43) || ~((a <= 4.1e-167))) tmp = a * 120.0; else tmp = -60.0 / ((z - t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.7e-43], N[Not[LessEqual[a, 4.1e-167]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.7 \cdot 10^{-43} \lor \neg \left(a \leq 4.1 \cdot 10^{-167}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}}\\
\end{array}
\end{array}
if a < -4.7000000000000001e-43 or 4.10000000000000018e-167 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.2%
if -4.7000000000000001e-43 < a < 4.10000000000000018e-167Initial program 98.4%
Taylor expanded in x around 0 68.0%
+-commutative68.0%
fma-def68.0%
Applied egg-rr68.0%
Taylor expanded in a around 0 54.4%
associate-*r/54.4%
associate-/l*54.4%
Simplified54.4%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.3e-85) (not (<= a 2e-225))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.3e-85) || !(a <= 2e-225)) {
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 <= (-3.3d-85)) .or. (.not. (a <= 2d-225))) 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 <= -3.3e-85) || !(a <= 2e-225)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.3e-85) or not (a <= 2e-225): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.3e-85) || !(a <= 2e-225)) 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 <= -3.3e-85) || ~((a <= 2e-225))) 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, -3.3e-85], N[Not[LessEqual[a, 2e-225]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{-85} \lor \neg \left(a \leq 2 \cdot 10^{-225}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -3.29999999999999973e-85 or 1.9999999999999999e-225 < a Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.6%
if -3.29999999999999973e-85 < a < 1.9999999999999999e-225Initial program 98.0%
Taylor expanded in x around 0 65.0%
+-commutative65.0%
fma-def65.0%
Applied egg-rr65.0%
Taylor expanded in a around 0 55.3%
associate-*r/55.3%
associate-/l*55.3%
Simplified55.3%
Taylor expanded in z around inf 30.4%
Final simplification57.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.46e-43) (not (<= a 6.8e-192))) (* a 120.0) (* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.46e-43) || !(a <= 6.8e-192)) {
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 ((a <= (-1.46d-43)) .or. (.not. (a <= 6.8d-192))) 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 ((a <= -1.46e-43) || !(a <= 6.8e-192)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.46e-43) or not (a <= 6.8e-192): tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.46e-43) || !(a <= 6.8e-192)) 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 ((a <= -1.46e-43) || ~((a <= 6.8e-192))) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.46e-43], N[Not[LessEqual[a, 6.8e-192]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.46 \cdot 10^{-43} \lor \neg \left(a \leq 6.8 \cdot 10^{-192}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -1.45999999999999997e-43 or 6.80000000000000003e-192 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 68.7%
if -1.45999999999999997e-43 < a < 6.80000000000000003e-192Initial program 98.4%
Taylor expanded in x around 0 66.7%
Taylor expanded in z around 0 42.1%
Taylor expanded in y around inf 33.0%
Final simplification58.4%
(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}
Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(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.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 53.5%
Final simplification53.5%
(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 2024040
(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)))