
(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 18 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(60.0 / Float64(Float64(z - t) / Float64(x - y)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{\frac{z - t}{x - y}}\right)
\end{array}
Initial program 99.4%
+-commutative99.4%
fma-def99.5%
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 (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.4%
+-commutative99.4%
fma-def99.5%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_2 -400000000.0)
t_1
(if (<= t_2 2e-76)
(* a 120.0)
(if (<= t_2 4e-33)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= t_2 200000000.0)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= t_2 5e+21)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= t_2 5e+45) (+ (* a 120.0) (* -60.0 (/ x t))) t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -400000000.0) {
tmp = t_1;
} else if (t_2 <= 2e-76) {
tmp = a * 120.0;
} else if (t_2 <= 4e-33) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (t_2 <= 200000000.0) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (t_2 <= 5e+21) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if (t_2 <= 5e+45) {
tmp = (a * 120.0) + (-60.0 * (x / 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) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-400000000.0d0)) then
tmp = t_1
else if (t_2 <= 2d-76) then
tmp = a * 120.0d0
else if (t_2 <= 4d-33) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (t_2 <= 200000000.0d0) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if (t_2 <= 5d+21) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if (t_2 <= 5d+45) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / 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 = 60.0 * ((x - y) / (z - t));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -400000000.0) {
tmp = t_1;
} else if (t_2 <= 2e-76) {
tmp = a * 120.0;
} else if (t_2 <= 4e-33) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (t_2 <= 200000000.0) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if (t_2 <= 5e+21) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if (t_2 <= 5e+45) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -400000000.0: tmp = t_1 elif t_2 <= 2e-76: tmp = a * 120.0 elif t_2 <= 4e-33: tmp = 60.0 / ((z - t) / (x - y)) elif t_2 <= 200000000.0: tmp = (a * 120.0) + (60.0 * (y / t)) elif t_2 <= 5e+21: tmp = (a * 120.0) + (60.0 * (x / z)) elif t_2 <= 5e+45: tmp = (a * 120.0) + (-60.0 * (x / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -400000000.0) tmp = t_1; elseif (t_2 <= 2e-76) tmp = Float64(a * 120.0); elseif (t_2 <= 4e-33) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (t_2 <= 200000000.0) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (t_2 <= 5e+21) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (t_2 <= 5e+45) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -400000000.0) tmp = t_1; elseif (t_2 <= 2e-76) tmp = a * 120.0; elseif (t_2 <= 4e-33) tmp = 60.0 / ((z - t) / (x - y)); elseif (t_2 <= 200000000.0) tmp = (a * 120.0) + (60.0 * (y / t)); elseif (t_2 <= 5e+21) tmp = (a * 120.0) + (60.0 * (x / z)); elseif (t_2 <= 5e+45) tmp = (a * 120.0) + (-60.0 * (x / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -400000000.0], t$95$1, If[LessEqual[t$95$2, 2e-76], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$2, 4e-33], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 200000000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+21], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+45], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_2 \leq -400000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-76}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t_2 \leq 4 \cdot 10^{-33}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;t_2 \leq 200000000:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+21}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+45}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4e8 or 5e45 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 98.8%
+-commutative98.8%
fma-def98.9%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 82.1%
if -4e8 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 1.99999999999999985e-76Initial program 99.9%
Taylor expanded in z around inf 85.7%
if 1.99999999999999985e-76 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.0000000000000002e-33Initial program 99.6%
+-commutative99.6%
fma-def99.6%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 99.3%
clear-num99.1%
un-div-inv99.6%
Applied egg-rr99.6%
if 4.0000000000000002e-33 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 2e8Initial program 99.8%
Taylor expanded in z around 0 79.1%
Taylor expanded in x around 0 79.7%
if 2e8 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5e21Initial program 99.2%
Taylor expanded in z around inf 74.5%
Taylor expanded in x around inf 74.5%
if 5e21 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5e45Initial program 100.0%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around inf 89.8%
Final simplification84.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (or (<= t_1 -5e+60) (not (<= t_1 4e+177)))
(/ 60.0 (/ (- z t) (- x y)))
(+ (* -60.0 (/ y (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if ((t_1 <= -5e+60) || !(t_1 <= 4e+177)) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (-60.0 * (y / (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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if ((t_1 <= (-5d+60)) .or. (.not. (t_1 <= 4d+177))) then
tmp = 60.0d0 / ((z - t) / (x - y))
else
tmp = ((-60.0d0) * (y / (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 t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if ((t_1 <= -5e+60) || !(t_1 <= 4e+177)) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if (t_1 <= -5e+60) or not (t_1 <= 4e+177): tmp = 60.0 / ((z - t) / (x - y)) else: tmp = (-60.0 * (y / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if ((t_1 <= -5e+60) || !(t_1 <= 4e+177)) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); else tmp = Float64(Float64(-60.0 * Float64(y / Float64(z - t))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if ((t_1 <= -5e+60) || ~((t_1 <= 4e+177))) tmp = 60.0 / ((z - t) / (x - y)); else tmp = (-60.0 * (y / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+60], N[Not[LessEqual[t$95$1, 4e+177]], $MachinePrecision]], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+60} \lor \neg \left(t_1 \leq 4 \cdot 10^{+177}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.99999999999999975e60 or 4e177 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 98.4%
+-commutative98.4%
fma-def98.4%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 91.1%
clear-num91.1%
un-div-inv91.2%
Applied egg-rr91.2%
if -4.99999999999999975e60 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4e177Initial program 99.8%
Taylor expanded in x around 0 87.7%
Final simplification88.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -2e+53)
(* a 120.0)
(if (<= (* a 120.0) -1e-100)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) 2e-148)
t_1
(if (<= (* a 120.0) 5e-125)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 1000000.0) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -2e+53) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-100) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 2e-148) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-2d+53)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-100)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= 2d-148) then
tmp = t_1
else if ((a * 120.0d0) <= 5d-125) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 1000000.0d0) then
tmp = t_1
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 t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -2e+53) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-100) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 2e-148) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -2e+53: tmp = a * 120.0 elif (a * 120.0) <= -1e-100: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= 2e-148: tmp = t_1 elif (a * 120.0) <= 5e-125: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 1000000.0: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -2e+53) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-100) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= 2e-148) tmp = t_1; elseif (Float64(a * 120.0) <= 5e-125) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 1000000.0) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -2e+53) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-100) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= 2e-148) tmp = t_1; elseif ((a * 120.0) <= 5e-125) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 1000000.0) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+53], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-100], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-148], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 1000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e53 or 1e6 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in z around inf 84.2%
if -2e53 < (*.f64 a 120) < -1e-100Initial program 99.9%
Taylor expanded in z around inf 67.7%
Taylor expanded in x around inf 69.5%
if -1e-100 < (*.f64 a 120) < 1.99999999999999987e-148 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6Initial program 98.8%
+-commutative98.8%
fma-def98.8%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 83.0%
if 1.99999999999999987e-148 < (*.f64 a 120) < 4.99999999999999967e-125Initial program 100.0%
Taylor expanded in z around 0 88.6%
Taylor expanded in x around inf 88.6%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -2e+53)
(* a 120.0)
(if (<= (* a 120.0) -1e-100)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) 2e-152)
t_1
(if (<= (* a 120.0) 5e-125)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 1000000.0) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -2e+53) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-100) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 2e-152) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-2d+53)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-100)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= 2d-152) then
tmp = t_1
else if ((a * 120.0d0) <= 5d-125) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 1000000.0d0) then
tmp = t_1
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 t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -2e+53) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-100) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 2e-152) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -2e+53: tmp = a * 120.0 elif (a * 120.0) <= -1e-100: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= 2e-152: tmp = t_1 elif (a * 120.0) <= 5e-125: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 1000000.0: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -2e+53) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-100) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= 2e-152) tmp = t_1; elseif (Float64(a * 120.0) <= 5e-125) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 1000000.0) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -2e+53) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-100) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= 2e-152) tmp = t_1; elseif ((a * 120.0) <= 5e-125) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 1000000.0) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+53], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-100], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-152], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-152}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 1000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e53 or 1e6 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in z around inf 84.2%
if -2e53 < (*.f64 a 120) < -1e-100Initial program 99.9%
Taylor expanded in z around inf 67.7%
Taylor expanded in x around inf 69.5%
if -1e-100 < (*.f64 a 120) < 2.00000000000000013e-152 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6Initial program 98.8%
+-commutative98.8%
fma-def98.8%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 82.7%
if 2.00000000000000013e-152 < (*.f64 a 120) < 4.99999999999999967e-125Initial program 99.8%
Taylor expanded in z around 0 90.8%
Taylor expanded in x around 0 94.1%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e-10)
(* a 120.0)
(if (<= (* a 120.0) 2e-148)
t_1
(if (<= (* a 120.0) 5e-125)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 1000000.0) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e-10) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-148) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-1d-10)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-148) then
tmp = t_1
else if ((a * 120.0d0) <= 5d-125) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 1000000.0d0) then
tmp = t_1
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 t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e-10) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-148) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e-10: tmp = a * 120.0 elif (a * 120.0) <= 2e-148: tmp = t_1 elif (a * 120.0) <= 5e-125: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 1000000.0: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e-10) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-148) tmp = t_1; elseif (Float64(a * 120.0) <= 5e-125) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 1000000.0) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -1e-10) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-148) tmp = t_1; elseif ((a * 120.0) <= 5e-125) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 1000000.0) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-10], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-148], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-10}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 1000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.00000000000000004e-10 or 1e6 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in z around inf 80.7%
if -1.00000000000000004e-10 < (*.f64 a 120) < 1.99999999999999987e-148 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6Initial program 99.0%
+-commutative99.0%
fma-def99.0%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 79.6%
if 1.99999999999999987e-148 < (*.f64 a 120) < 4.99999999999999967e-125Initial program 100.0%
Taylor expanded in z around 0 88.6%
Taylor expanded in x around inf 88.6%
Final simplification80.4%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -1.5e-119)
(and (not (<= a 1e-149)) (or (<= a 3.3e-133) (not (<= a 6.2e-40)))))
(* a 120.0)
(* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.5e-119) || (!(a <= 1e-149) && ((a <= 3.3e-133) || !(a <= 6.2e-40)))) {
tmp = a * 120.0;
} else {
tmp = -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 ((a <= (-1.5d-119)) .or. (.not. (a <= 1d-149)) .and. (a <= 3.3d-133) .or. (.not. (a <= 6.2d-40))) then
tmp = a * 120.0d0
else
tmp = (-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 ((a <= -1.5e-119) || (!(a <= 1e-149) && ((a <= 3.3e-133) || !(a <= 6.2e-40)))) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.5e-119) or (not (a <= 1e-149) and ((a <= 3.3e-133) or not (a <= 6.2e-40))): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.5e-119) || (!(a <= 1e-149) && ((a <= 3.3e-133) || !(a <= 6.2e-40)))) tmp = Float64(a * 120.0); else tmp = 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 ((a <= -1.5e-119) || (~((a <= 1e-149)) && ((a <= 3.3e-133) || ~((a <= 6.2e-40))))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.5e-119], And[N[Not[LessEqual[a, 1e-149]], $MachinePrecision], Or[LessEqual[a, 3.3e-133], N[Not[LessEqual[a, 6.2e-40]], $MachinePrecision]]]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{-119} \lor \neg \left(a \leq 10^{-149}\right) \land \left(a \leq 3.3 \cdot 10^{-133} \lor \neg \left(a \leq 6.2 \cdot 10^{-40}\right)\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -1.5000000000000001e-119 or 9.99999999999999979e-150 < a < 3.30000000000000009e-133 or 6.20000000000000021e-40 < a Initial program 99.3%
Taylor expanded in z around inf 74.2%
if -1.5000000000000001e-119 < a < 9.99999999999999979e-150 or 3.30000000000000009e-133 < a < 6.20000000000000021e-40Initial program 99.7%
+-commutative99.7%
fma-def99.7%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 88.3%
clear-num88.2%
un-div-inv88.4%
Applied egg-rr88.4%
Taylor expanded in x around 0 54.2%
Final simplification67.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.02e-112)
(* a 120.0)
(if (<= a 9.4e-150)
(* -60.0 (/ y (- z t)))
(if (or (<= a 2.46e-132) (not (<= a 3.8e-38)))
(* a 120.0)
(* -60.0 (/ (- x y) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.02e-112) {
tmp = a * 120.0;
} else if (a <= 9.4e-150) {
tmp = -60.0 * (y / (z - t));
} else if ((a <= 2.46e-132) || !(a <= 3.8e-38)) {
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 <= (-1.02d-112)) then
tmp = a * 120.0d0
else if (a <= 9.4d-150) then
tmp = (-60.0d0) * (y / (z - t))
else if ((a <= 2.46d-132) .or. (.not. (a <= 3.8d-38))) 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 <= -1.02e-112) {
tmp = a * 120.0;
} else if (a <= 9.4e-150) {
tmp = -60.0 * (y / (z - t));
} else if ((a <= 2.46e-132) || !(a <= 3.8e-38)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.02e-112: tmp = a * 120.0 elif a <= 9.4e-150: tmp = -60.0 * (y / (z - t)) elif (a <= 2.46e-132) or not (a <= 3.8e-38): 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 <= -1.02e-112) tmp = Float64(a * 120.0); elseif (a <= 9.4e-150) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif ((a <= 2.46e-132) || !(a <= 3.8e-38)) 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 <= -1.02e-112) tmp = a * 120.0; elseif (a <= 9.4e-150) tmp = -60.0 * (y / (z - t)); elseif ((a <= 2.46e-132) || ~((a <= 3.8e-38))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.02e-112], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 9.4e-150], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 2.46e-132], N[Not[LessEqual[a, 3.8e-38]], $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 -1.02 \cdot 10^{-112}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 9.4 \cdot 10^{-150}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \leq 2.46 \cdot 10^{-132} \lor \neg \left(a \leq 3.8 \cdot 10^{-38}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -1.01999999999999996e-112 or 9.3999999999999998e-150 < a < 2.45999999999999998e-132 or 3.8e-38 < a Initial program 99.3%
Taylor expanded in z around inf 74.2%
if -1.01999999999999996e-112 < a < 9.3999999999999998e-150Initial program 99.7%
+-commutative99.7%
fma-def99.7%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 89.7%
clear-num89.6%
un-div-inv89.8%
Applied egg-rr89.8%
Taylor expanded in x around 0 58.1%
if 2.45999999999999998e-132 < a < 3.8e-38Initial program 99.6%
+-commutative99.6%
fma-def99.6%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 84.6%
Taylor expanded in z around 0 54.9%
Final simplification68.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.4e-114)
(* a 120.0)
(if (<= a 1.25e-149)
(/ 60.0 (/ (- t z) y))
(if (or (<= a 5e-132) (not (<= a 2.1e-41)))
(* a 120.0)
(* -60.0 (/ (- x y) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.4e-114) {
tmp = a * 120.0;
} else if (a <= 1.25e-149) {
tmp = 60.0 / ((t - z) / y);
} else if ((a <= 5e-132) || !(a <= 2.1e-41)) {
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 <= (-3.4d-114)) then
tmp = a * 120.0d0
else if (a <= 1.25d-149) then
tmp = 60.0d0 / ((t - z) / y)
else if ((a <= 5d-132) .or. (.not. (a <= 2.1d-41))) 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 <= -3.4e-114) {
tmp = a * 120.0;
} else if (a <= 1.25e-149) {
tmp = 60.0 / ((t - z) / y);
} else if ((a <= 5e-132) || !(a <= 2.1e-41)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.4e-114: tmp = a * 120.0 elif a <= 1.25e-149: tmp = 60.0 / ((t - z) / y) elif (a <= 5e-132) or not (a <= 2.1e-41): 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 <= -3.4e-114) tmp = Float64(a * 120.0); elseif (a <= 1.25e-149) tmp = Float64(60.0 / Float64(Float64(t - z) / y)); elseif ((a <= 5e-132) || !(a <= 2.1e-41)) 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 <= -3.4e-114) tmp = a * 120.0; elseif (a <= 1.25e-149) tmp = 60.0 / ((t - z) / y); elseif ((a <= 5e-132) || ~((a <= 2.1e-41))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.4e-114], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.25e-149], N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 5e-132], N[Not[LessEqual[a, 2.1e-41]], $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 -3.4 \cdot 10^{-114}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-149}:\\
\;\;\;\;\frac{60}{\frac{t - z}{y}}\\
\mathbf{elif}\;a \leq 5 \cdot 10^{-132} \lor \neg \left(a \leq 2.1 \cdot 10^{-41}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -3.39999999999999981e-114 or 1.24999999999999992e-149 < a < 4.9999999999999999e-132 or 2.10000000000000013e-41 < a Initial program 99.3%
Taylor expanded in z around inf 74.2%
if -3.39999999999999981e-114 < a < 1.24999999999999992e-149Initial program 99.7%
+-commutative99.7%
fma-def99.7%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 89.7%
clear-num89.6%
un-div-inv89.8%
Applied egg-rr89.8%
Taylor expanded in x around 0 58.1%
associate-*r/58.1%
neg-mul-158.1%
Simplified58.1%
if 4.9999999999999999e-132 < a < 2.10000000000000013e-41Initial program 99.6%
+-commutative99.6%
fma-def99.6%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 84.6%
Taylor expanded in z around 0 54.9%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.7e+75) (not (<= x 2.5e+175))) (+ (/ (* 60.0 x) (- z t)) (* a 120.0)) (+ (* -60.0 (/ y (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.7e+75) || !(x <= 2.5e+175)) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else {
tmp = (-60.0 * (y / (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 <= (-4.7d+75)) .or. (.not. (x <= 2.5d+175))) then
tmp = ((60.0d0 * x) / (z - t)) + (a * 120.0d0)
else
tmp = ((-60.0d0) * (y / (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 <= -4.7e+75) || !(x <= 2.5e+175)) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.7e+75) or not (x <= 2.5e+175): tmp = ((60.0 * x) / (z - t)) + (a * 120.0) else: tmp = (-60.0 * (y / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.7e+75) || !(x <= 2.5e+175)) tmp = Float64(Float64(Float64(60.0 * x) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 * Float64(y / 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 <= -4.7e+75) || ~((x <= 2.5e+175))) tmp = ((60.0 * x) / (z - t)) + (a * 120.0); else tmp = (-60.0 * (y / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.7e+75], N[Not[LessEqual[x, 2.5e+175]], $MachinePrecision]], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+75} \lor \neg \left(x \leq 2.5 \cdot 10^{+175}\right):\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -4.69999999999999984e75 or 2.5e175 < x Initial program 98.4%
Taylor expanded in x around inf 93.3%
associate-*r/92.0%
Simplified92.0%
if -4.69999999999999984e75 < x < 2.5e175Initial program 99.8%
Taylor expanded in x around 0 92.3%
Final simplification92.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.25e-16) (not (<= a 38000000.0))) (* 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 <= -1.25e-16) || !(a <= 38000000.0)) {
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 <= (-1.25d-16)) .or. (.not. (a <= 38000000.0d0))) 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 <= -1.25e-16) || !(a <= 38000000.0)) {
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 <= -1.25e-16) or not (a <= 38000000.0): 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 <= -1.25e-16) || !(a <= 38000000.0)) 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 <= -1.25e-16) || ~((a <= 38000000.0))) 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, -1.25e-16], N[Not[LessEqual[a, 38000000.0]], $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.25 \cdot 10^{-16} \lor \neg \left(a \leq 38000000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -1.2500000000000001e-16 or 3.8e7 < a Initial program 99.9%
Taylor expanded in z around inf 80.7%
if -1.2500000000000001e-16 < a < 3.8e7Initial program 99.0%
+-commutative99.0%
fma-def99.0%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 76.6%
Final simplification78.6%
(FPCore (x y z t a) :precision binary64 (+ (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (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 = ((x - y) * (60.0d0 / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) * (60.0 / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) * (60.0 / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120
\end{array}
Initial program 99.4%
associate-*l/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (/ (- y x) (* (- z t) -0.016666666666666666)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((y - x) / ((z - t) * -0.016666666666666666)) + (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 = ((y - x) / ((z - t) * (-0.016666666666666666d0))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((y - x) / ((z - t) * -0.016666666666666666)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((y - x) / ((z - t) * -0.016666666666666666)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(y - x) / Float64(Float64(z - t) * -0.016666666666666666)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((y - x) / ((z - t) * -0.016666666666666666)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(y - x), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * -0.016666666666666666), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{y - x}{\left(z - t\right) \cdot -0.016666666666666666} + a \cdot 120
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-/l*99.8%
frac-2neg99.8%
distribute-frac-neg99.8%
div-inv99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.8e-183) (not (<= a 6.5e-206))) (* a 120.0) (* 60.0 (/ x z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e-183) || !(a <= 6.5e-206)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / 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.8d-183)) .or. (.not. (a <= 6.5d-206))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / 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.8e-183) || !(a <= 6.5e-206)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.8e-183) or not (a <= 6.5e-206): tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.8e-183) || !(a <= 6.5e-206)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.8e-183) || ~((a <= 6.5e-206))) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.8e-183], N[Not[LessEqual[a, 6.5e-206]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{-183} \lor \neg \left(a \leq 6.5 \cdot 10^{-206}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if a < -1.8000000000000001e-183 or 6.4999999999999996e-206 < a Initial program 99.4%
Taylor expanded in z around inf 61.5%
if -1.8000000000000001e-183 < a < 6.4999999999999996e-206Initial program 99.7%
Taylor expanded in z around inf 51.6%
Taylor expanded in x around inf 25.7%
Final simplification56.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.3e-187) (not (<= a 5.8e-207))) (* a 120.0) (* x (/ 60.0 z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.3e-187) || !(a <= 5.8e-207)) {
tmp = a * 120.0;
} else {
tmp = x * (60.0 / 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 <= (-8.3d-187)) .or. (.not. (a <= 5.8d-207))) then
tmp = a * 120.0d0
else
tmp = x * (60.0d0 / 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 <= -8.3e-187) || !(a <= 5.8e-207)) {
tmp = a * 120.0;
} else {
tmp = x * (60.0 / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.3e-187) or not (a <= 5.8e-207): tmp = a * 120.0 else: tmp = x * (60.0 / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.3e-187) || !(a <= 5.8e-207)) tmp = Float64(a * 120.0); else tmp = Float64(x * Float64(60.0 / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8.3e-187) || ~((a <= 5.8e-207))) tmp = a * 120.0; else tmp = x * (60.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.3e-187], N[Not[LessEqual[a, 5.8e-207]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.3 \cdot 10^{-187} \lor \neg \left(a \leq 5.8 \cdot 10^{-207}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z}\\
\end{array}
\end{array}
if a < -8.2999999999999995e-187 or 5.80000000000000022e-207 < a Initial program 99.4%
Taylor expanded in z around inf 61.5%
if -8.2999999999999995e-187 < a < 5.80000000000000022e-207Initial program 99.7%
Taylor expanded in z around inf 51.6%
Taylor expanded in x around inf 28.1%
Taylor expanded in x around inf 25.7%
associate-*r/25.8%
associate-*l/25.8%
Simplified25.8%
Final simplification56.0%
(FPCore (x y z t a) :precision binary64 (if (<= y 9.5e+193) (* a 120.0) (* 60.0 (- (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 9.5e+193) {
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 (y <= 9.5d+193) 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 (y <= 9.5e+193) {
tmp = a * 120.0;
} else {
tmp = 60.0 * -(y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 9.5e+193: tmp = a * 120.0 else: tmp = 60.0 * -(y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 9.5e+193) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(-Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 9.5e+193) tmp = a * 120.0; else tmp = 60.0 * -(y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 9.5e+193], N[(a * 120.0), $MachinePrecision], N[(60.0 * (-N[(y / z), $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9.5 \cdot 10^{+193}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \left(-\frac{y}{z}\right)\\
\end{array}
\end{array}
if y < 9.4999999999999997e193Initial program 99.4%
Taylor expanded in z around inf 57.6%
if 9.4999999999999997e193 < y Initial program 99.7%
+-commutative99.7%
fma-def99.7%
associate-*l/99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 79.4%
Taylor expanded in z around inf 45.7%
Taylor expanded in x around 0 41.9%
neg-mul-141.9%
Simplified41.9%
Final simplification55.6%
(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%
Taylor expanded in z around inf 52.8%
Final simplification52.8%
(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 2023336
(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)))