
(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 17 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.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.1
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (or (<= t_1 -2e+142) (not (<= t_1 2e+93)))
(* (- x y) (/ -60.0 t))
(* 120.0 a))))
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 <= -2e+142) || !(t_1 <= 2e+93)) {
tmp = (x - y) * (-60.0 / t);
} else {
tmp = 120.0 * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if ((t_1 <= (-2d+142)) .or. (.not. (t_1 <= 2d+93))) then
tmp = (x - y) * ((-60.0d0) / t)
else
tmp = 120.0d0 * a
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 <= -2e+142) || !(t_1 <= 2e+93)) {
tmp = (x - y) * (-60.0 / t);
} else {
tmp = 120.0 * a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if (t_1 <= -2e+142) or not (t_1 <= 2e+93): tmp = (x - y) * (-60.0 / t) else: tmp = 120.0 * a 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 <= -2e+142) || !(t_1 <= 2e+93)) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); else tmp = Float64(120.0 * a); 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 <= -2e+142) || ~((t_1 <= 2e+93))) tmp = (x - y) * (-60.0 / t); else tmp = 120.0 * a; 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, -2e+142], N[Not[LessEqual[t$95$1, 2e+93]], $MachinePrecision]], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+142} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+93}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{else}:\\
\;\;\;\;120 \cdot a\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e142 or 2.00000000000000009e93 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 97.2%
Taylor expanded in a around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6479.7
Applied rewrites79.7%
Taylor expanded in z around 0
Applied rewrites45.8%
if -2.0000000000000001e142 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.00000000000000009e93Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6468.8
Applied rewrites68.8%
Final simplification61.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -2e+142)
(* (- x y) (/ -60.0 t))
(if (<= t_1 2e+118) (* 120.0 a) (* (- x y) (/ 60.0 z))))))
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 <= -2e+142) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= 2e+118) {
tmp = 120.0 * a;
} else {
tmp = (x - y) * (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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-2d+142)) then
tmp = (x - y) * ((-60.0d0) / t)
else if (t_1 <= 2d+118) then
tmp = 120.0d0 * a
else
tmp = (x - y) * (60.0d0 / z)
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 <= -2e+142) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= 2e+118) {
tmp = 120.0 * a;
} else {
tmp = (x - y) * (60.0 / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -2e+142: tmp = (x - y) * (-60.0 / t) elif t_1 <= 2e+118: tmp = 120.0 * a else: tmp = (x - y) * (60.0 / z) 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 <= -2e+142) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (t_1 <= 2e+118) tmp = Float64(120.0 * a); else tmp = Float64(Float64(x - y) * Float64(60.0 / z)); 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 <= -2e+142) tmp = (x - y) * (-60.0 / t); elseif (t_1 <= 2e+118) tmp = 120.0 * a; else tmp = (x - y) * (60.0 / z); 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[LessEqual[t$95$1, -2e+142], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+118], N[(120.0 * a), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+142}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+118}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e142Initial program 94.0%
Taylor expanded in a around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6478.7
Applied rewrites78.7%
Taylor expanded in z around 0
Applied rewrites49.5%
if -2.0000000000000001e142 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999993e118Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6467.4
Applied rewrites67.4%
if 1.99999999999999993e118 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6484.2
Applied rewrites84.2%
Taylor expanded in z around inf
Applied rewrites57.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (or (<= t_1 -1e+227) (not (<= t_1 1e+238)))
(* (/ y t) 60.0)
(* 120.0 a))))
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 <= -1e+227) || !(t_1 <= 1e+238)) {
tmp = (y / t) * 60.0;
} else {
tmp = 120.0 * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if ((t_1 <= (-1d+227)) .or. (.not. (t_1 <= 1d+238))) then
tmp = (y / t) * 60.0d0
else
tmp = 120.0d0 * a
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 <= -1e+227) || !(t_1 <= 1e+238)) {
tmp = (y / t) * 60.0;
} else {
tmp = 120.0 * a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if (t_1 <= -1e+227) or not (t_1 <= 1e+238): tmp = (y / t) * 60.0 else: tmp = 120.0 * a 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 <= -1e+227) || !(t_1 <= 1e+238)) tmp = Float64(Float64(y / t) * 60.0); else tmp = Float64(120.0 * a); 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 <= -1e+227) || ~((t_1 <= 1e+238))) tmp = (y / t) * 60.0; else tmp = 120.0 * a; 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, -1e+227], N[Not[LessEqual[t$95$1, 1e+238]], $MachinePrecision]], N[(N[(y / t), $MachinePrecision] * 60.0), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+227} \lor \neg \left(t\_1 \leq 10^{+238}\right):\\
\;\;\;\;\frac{y}{t} \cdot 60\\
\mathbf{else}:\\
\;\;\;\;120 \cdot a\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.0000000000000001e227 or 1e238 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 94.0%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6461.5
Applied rewrites61.5%
Taylor expanded in y around inf
Applied rewrites43.9%
if -1.0000000000000001e227 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e238Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6461.0
Applied rewrites61.0%
Final simplification58.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -4e+272)
(* (- y) (/ 60.0 z))
(if (<= t_1 5e+159) (* 120.0 a) (* (/ x z) 60.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 <= -4e+272) {
tmp = -y * (60.0 / z);
} else if (t_1 <= 5e+159) {
tmp = 120.0 * a;
} else {
tmp = (x / z) * 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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-4d+272)) then
tmp = -y * (60.0d0 / z)
else if (t_1 <= 5d+159) then
tmp = 120.0d0 * a
else
tmp = (x / z) * 60.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 <= -4e+272) {
tmp = -y * (60.0 / z);
} else if (t_1 <= 5e+159) {
tmp = 120.0 * a;
} else {
tmp = (x / z) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -4e+272: tmp = -y * (60.0 / z) elif t_1 <= 5e+159: tmp = 120.0 * a else: tmp = (x / z) * 60.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 <= -4e+272) tmp = Float64(Float64(-y) * Float64(60.0 / z)); elseif (t_1 <= 5e+159) tmp = Float64(120.0 * a); else tmp = Float64(Float64(x / z) * 60.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 <= -4e+272) tmp = -y * (60.0 / z); elseif (t_1 <= 5e+159) tmp = 120.0 * a; else tmp = (x / z) * 60.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[LessEqual[t$95$1, -4e+272], N[((-y) * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+159], N[(120.0 * a), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * 60.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+272}:\\
\;\;\;\;\left(-y\right) \cdot \frac{60}{z}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+159}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot 60\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.0000000000000003e272Initial program 85.8%
Taylor expanded in a around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6489.2
Applied rewrites89.2%
Taylor expanded in z around inf
Applied rewrites56.8%
Taylor expanded in x around 0
Applied rewrites42.7%
if -4.0000000000000003e272 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000003e159Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6462.7
Applied rewrites62.7%
if 5.00000000000000003e159 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
Taylor expanded in z around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6470.9
Applied rewrites70.9%
Taylor expanded in x around inf
Applied rewrites43.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -4e+272)
(* (/ y z) -60.0)
(if (<= t_1 5e+159) (* 120.0 a) (* (/ x z) 60.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 <= -4e+272) {
tmp = (y / z) * -60.0;
} else if (t_1 <= 5e+159) {
tmp = 120.0 * a;
} else {
tmp = (x / z) * 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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-4d+272)) then
tmp = (y / z) * (-60.0d0)
else if (t_1 <= 5d+159) then
tmp = 120.0d0 * a
else
tmp = (x / z) * 60.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 <= -4e+272) {
tmp = (y / z) * -60.0;
} else if (t_1 <= 5e+159) {
tmp = 120.0 * a;
} else {
tmp = (x / z) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -4e+272: tmp = (y / z) * -60.0 elif t_1 <= 5e+159: tmp = 120.0 * a else: tmp = (x / z) * 60.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 <= -4e+272) tmp = Float64(Float64(y / z) * -60.0); elseif (t_1 <= 5e+159) tmp = Float64(120.0 * a); else tmp = Float64(Float64(x / z) * 60.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 <= -4e+272) tmp = (y / z) * -60.0; elseif (t_1 <= 5e+159) tmp = 120.0 * a; else tmp = (x / z) * 60.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[LessEqual[t$95$1, -4e+272], N[(N[(y / z), $MachinePrecision] * -60.0), $MachinePrecision], If[LessEqual[t$95$1, 5e+159], N[(120.0 * a), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * 60.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+272}:\\
\;\;\;\;\frac{y}{z} \cdot -60\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+159}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot 60\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.0000000000000003e272Initial program 85.8%
Taylor expanded in z around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6457.9
Applied rewrites57.9%
Taylor expanded in y around inf
Applied rewrites42.6%
if -4.0000000000000003e272 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000003e159Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6462.7
Applied rewrites62.7%
if 5.00000000000000003e159 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
Taylor expanded in z around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6470.9
Applied rewrites70.9%
Taylor expanded in x around inf
Applied rewrites43.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e+23)
(* 120.0 a)
(if (<= (* a 120.0) 50000000000000.0)
(* (- x y) (/ 60.0 (- z t)))
(if (<= (* a 120.0) 1e+128)
(fma (/ x z) 60.0 (* 120.0 a))
(fma a 120.0 (* (/ y t) 60.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e+23) {
tmp = 120.0 * a;
} else if ((a * 120.0) <= 50000000000000.0) {
tmp = (x - y) * (60.0 / (z - t));
} else if ((a * 120.0) <= 1e+128) {
tmp = fma((x / z), 60.0, (120.0 * a));
} else {
tmp = fma(a, 120.0, ((y / t) * 60.0));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e+23) tmp = Float64(120.0 * a); elseif (Float64(a * 120.0) <= 50000000000000.0) tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); elseif (Float64(a * 120.0) <= 1e+128) tmp = fma(Float64(x / z), 60.0, Float64(120.0 * a)); else tmp = fma(a, 120.0, Float64(Float64(y / t) * 60.0)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+23], N[(120.0 * a), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 50000000000000.0], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+128], N[(N[(x / z), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(a * 120.0 + N[(N[(y / t), $MachinePrecision] * 60.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+23}:\\
\;\;\;\;120 \cdot a\\
\mathbf{elif}\;a \cdot 120 \leq 50000000000000:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+128}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, 60, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{y}{t} \cdot 60\right)\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.9999999999999992e22Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6475.3
Applied rewrites75.3%
if -9.9999999999999992e22 < (*.f64 a #s(literal 120 binary64)) < 5e13Initial program 98.9%
Taylor expanded in a around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6473.5
Applied rewrites73.5%
if 5e13 < (*.f64 a #s(literal 120 binary64)) < 1.0000000000000001e128Initial program 99.8%
Taylor expanded in z around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6481.0
Applied rewrites81.0%
Taylor expanded in x around inf
Applied rewrites77.8%
if 1.0000000000000001e128 < (*.f64 a #s(literal 120 binary64)) Initial program 97.3%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6486.5
Applied rewrites86.5%
Taylor expanded in x around 0
Applied rewrites92.2%
Applied rewrites92.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -1e+23) (not (<= (* a 120.0) 4e+15))) (* 120.0 a) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -1e+23) || !((a * 120.0) <= 4e+15)) {
tmp = 120.0 * a;
} else {
tmp = (x - 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 (((a * 120.0d0) <= (-1d+23)) .or. (.not. ((a * 120.0d0) <= 4d+15))) then
tmp = 120.0d0 * a
else
tmp = (x - 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 (((a * 120.0) <= -1e+23) || !((a * 120.0) <= 4e+15)) {
tmp = 120.0 * a;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -1e+23) or not ((a * 120.0) <= 4e+15): tmp = 120.0 * a else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -1e+23) || !(Float64(a * 120.0) <= 4e+15)) tmp = Float64(120.0 * a); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -1e+23) || ~(((a * 120.0) <= 4e+15))) tmp = 120.0 * a; else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+23], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 4e+15]], $MachinePrecision]], N[(120.0 * a), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+23} \lor \neg \left(a \cdot 120 \leq 4 \cdot 10^{+15}\right):\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -9.9999999999999992e22 or 4e15 < (*.f64 a #s(literal 120 binary64)) Initial program 99.1%
Taylor expanded in z around inf
lower-*.f6477.3
Applied rewrites77.3%
if -9.9999999999999992e22 < (*.f64 a #s(literal 120 binary64)) < 4e15Initial program 99.0%
Taylor expanded in a around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6473.7
Applied rewrites73.7%
Final simplification75.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -6.2e+59) (not (<= x 2e+119))) (fma a 120.0 (/ (* x 60.0) (- z t))) (fma 120.0 a (* (/ y (- z t)) -60.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -6.2e+59) || !(x <= 2e+119)) {
tmp = fma(a, 120.0, ((x * 60.0) / (z - t)));
} else {
tmp = fma(120.0, a, ((y / (z - t)) * -60.0));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -6.2e+59) || !(x <= 2e+119)) tmp = fma(a, 120.0, Float64(Float64(x * 60.0) / Float64(z - t))); else tmp = fma(120.0, a, Float64(Float64(y / Float64(z - t)) * -60.0)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -6.2e+59], N[Not[LessEqual[x, 2e+119]], $MachinePrecision]], N[(a * 120.0 + N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(120.0 * a + N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+59} \lor \neg \left(x \leq 2 \cdot 10^{+119}\right):\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{x \cdot 60}{z - t}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(120, a, \frac{y}{z - t} \cdot -60\right)\\
\end{array}
\end{array}
if x < -6.20000000000000029e59 or 1.99999999999999989e119 < x Initial program 99.7%
Taylor expanded in x around inf
lower-*.f6494.2
Applied rewrites94.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6494.2
Applied rewrites94.2%
if -6.20000000000000029e59 < x < 1.99999999999999989e119Initial program 98.8%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6492.5
Applied rewrites92.5%
Final simplification93.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4e+52) (not (<= t 2e-43))) (fma (/ (- x y) t) -60.0 (* 120.0 a)) (fma (/ (- x y) z) 60.0 (* 120.0 a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4e+52) || !(t <= 2e-43)) {
tmp = fma(((x - y) / t), -60.0, (120.0 * a));
} else {
tmp = fma(((x - y) / z), 60.0, (120.0 * a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4e+52) || !(t <= 2e-43)) tmp = fma(Float64(Float64(x - y) / t), -60.0, Float64(120.0 * a)); else tmp = fma(Float64(Float64(x - y) / z), 60.0, Float64(120.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4e+52], N[Not[LessEqual[t, 2e-43]], $MachinePrecision]], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+52} \lor \neg \left(t \leq 2 \cdot 10^{-43}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\
\end{array}
\end{array}
if t < -4e52 or 2.00000000000000015e-43 < t Initial program 99.0%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6490.3
Applied rewrites90.3%
if -4e52 < t < 2.00000000000000015e-43Initial program 99.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6486.5
Applied rewrites86.5%
Final simplification88.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4e+52) (not (<= t 2e-43))) (fma (/ (- x y) t) -60.0 (* 120.0 a)) (fma 120.0 a (/ (* -60.0 (- y x)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4e+52) || !(t <= 2e-43)) {
tmp = fma(((x - y) / t), -60.0, (120.0 * a));
} else {
tmp = fma(120.0, a, ((-60.0 * (y - x)) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4e+52) || !(t <= 2e-43)) tmp = fma(Float64(Float64(x - y) / t), -60.0, Float64(120.0 * a)); else tmp = fma(120.0, a, Float64(Float64(-60.0 * Float64(y - x)) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4e+52], N[Not[LessEqual[t, 2e-43]], $MachinePrecision]], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(120.0 * a + N[(N[(-60.0 * N[(y - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+52} \lor \neg \left(t \leq 2 \cdot 10^{-43}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(120, a, \frac{-60 \cdot \left(y - x\right)}{z}\right)\\
\end{array}
\end{array}
if t < -4e52 or 2.00000000000000015e-43 < t Initial program 99.0%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6490.3
Applied rewrites90.3%
if -4e52 < t < 2.00000000000000015e-43Initial program 99.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6486.5
Applied rewrites86.5%
Taylor expanded in x around 0
Applied rewrites85.8%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.1e-61) (not (<= t 9.2e-52))) (fma 120.0 a (* (/ y (- z t)) -60.0)) (fma 120.0 a (/ (* -60.0 (- y x)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.1e-61) || !(t <= 9.2e-52)) {
tmp = fma(120.0, a, ((y / (z - t)) * -60.0));
} else {
tmp = fma(120.0, a, ((-60.0 * (y - x)) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.1e-61) || !(t <= 9.2e-52)) tmp = fma(120.0, a, Float64(Float64(y / Float64(z - t)) * -60.0)); else tmp = fma(120.0, a, Float64(Float64(-60.0 * Float64(y - x)) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.1e-61], N[Not[LessEqual[t, 9.2e-52]], $MachinePrecision]], N[(120.0 * a + N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision], N[(120.0 * a + N[(N[(-60.0 * N[(y - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-61} \lor \neg \left(t \leq 9.2 \cdot 10^{-52}\right):\\
\;\;\;\;\mathsf{fma}\left(120, a, \frac{y}{z - t} \cdot -60\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(120, a, \frac{-60 \cdot \left(y - x\right)}{z}\right)\\
\end{array}
\end{array}
if t < -2.0999999999999999e-61 or 9.19999999999999977e-52 < t Initial program 99.1%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6482.4
Applied rewrites82.4%
if -2.0999999999999999e-61 < t < 9.19999999999999977e-52Initial program 99.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6490.3
Applied rewrites90.3%
Taylor expanded in x around 0
Applied rewrites89.5%
Final simplification85.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.5e+55) (not (<= t 4.5e-41))) (fma a 120.0 (* (/ y t) 60.0)) (fma 120.0 a (/ (* -60.0 (- y x)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e+55) || !(t <= 4.5e-41)) {
tmp = fma(a, 120.0, ((y / t) * 60.0));
} else {
tmp = fma(120.0, a, ((-60.0 * (y - x)) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.5e+55) || !(t <= 4.5e-41)) tmp = fma(a, 120.0, Float64(Float64(y / t) * 60.0)); else tmp = fma(120.0, a, Float64(Float64(-60.0 * Float64(y - x)) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e+55], N[Not[LessEqual[t, 4.5e-41]], $MachinePrecision]], N[(a * 120.0 + N[(N[(y / t), $MachinePrecision] * 60.0), $MachinePrecision]), $MachinePrecision], N[(120.0 * a + N[(N[(-60.0 * N[(y - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+55} \lor \neg \left(t \leq 4.5 \cdot 10^{-41}\right):\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{y}{t} \cdot 60\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(120, a, \frac{-60 \cdot \left(y - x\right)}{z}\right)\\
\end{array}
\end{array}
if t < -6.50000000000000027e55 or 4.5e-41 < t Initial program 99.0%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6490.3
Applied rewrites90.3%
Taylor expanded in x around 0
Applied rewrites79.6%
Applied rewrites79.7%
if -6.50000000000000027e55 < t < 4.5e-41Initial program 99.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6486.5
Applied rewrites86.5%
Taylor expanded in x around 0
Applied rewrites85.8%
Final simplification83.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.5e+55) (not (<= t 2.4e-57))) (fma a 120.0 (* (/ y t) 60.0)) (fma (/ y z) -60.0 (* 120.0 a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.5e+55) || !(t <= 2.4e-57)) {
tmp = fma(a, 120.0, ((y / t) * 60.0));
} else {
tmp = fma((y / z), -60.0, (120.0 * a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.5e+55) || !(t <= 2.4e-57)) tmp = fma(a, 120.0, Float64(Float64(y / t) * 60.0)); else tmp = fma(Float64(y / z), -60.0, Float64(120.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.5e+55], N[Not[LessEqual[t, 2.4e-57]], $MachinePrecision]], N[(a * 120.0 + N[(N[(y / t), $MachinePrecision] * 60.0), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+55} \lor \neg \left(t \leq 2.4 \cdot 10^{-57}\right):\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{y}{t} \cdot 60\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, -60, 120 \cdot a\right)\\
\end{array}
\end{array}
if t < -5.5000000000000004e55 or 2.40000000000000006e-57 < t Initial program 99.0%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6489.6
Applied rewrites89.6%
Taylor expanded in x around 0
Applied rewrites79.0%
Applied rewrites79.0%
if -5.5000000000000004e55 < t < 2.40000000000000006e-57Initial program 99.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6486.4
Applied rewrites86.4%
Taylor expanded in x around 0
Applied rewrites66.4%
Final simplification72.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.5e+20) (not (<= z 8e-45))) (* 120.0 a) (fma a 120.0 (* (/ y t) 60.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.5e+20) || !(z <= 8e-45)) {
tmp = 120.0 * a;
} else {
tmp = fma(a, 120.0, ((y / t) * 60.0));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.5e+20) || !(z <= 8e-45)) tmp = Float64(120.0 * a); else tmp = fma(a, 120.0, Float64(Float64(y / t) * 60.0)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.5e+20], N[Not[LessEqual[z, 8e-45]], $MachinePrecision]], N[(120.0 * a), $MachinePrecision], N[(a * 120.0 + N[(N[(y / t), $MachinePrecision] * 60.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+20} \lor \neg \left(z \leq 8 \cdot 10^{-45}\right):\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{y}{t} \cdot 60\right)\\
\end{array}
\end{array}
if z < -5.5e20 or 7.99999999999999987e-45 < z Initial program 99.1%
Taylor expanded in z around inf
lower-*.f6462.4
Applied rewrites62.4%
if -5.5e20 < z < 7.99999999999999987e-45Initial program 99.0%
Taylor expanded in z around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6480.7
Applied rewrites80.7%
Taylor expanded in x around 0
Applied rewrites66.2%
Applied rewrites66.2%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.7e+234) (not (<= x 3.7e+141))) (* (/ x z) 60.0) (* 120.0 a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.7e+234) || !(x <= 3.7e+141)) {
tmp = (x / z) * 60.0;
} else {
tmp = 120.0 * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-4.7d+234)) .or. (.not. (x <= 3.7d+141))) then
tmp = (x / z) * 60.0d0
else
tmp = 120.0d0 * a
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+234) || !(x <= 3.7e+141)) {
tmp = (x / z) * 60.0;
} else {
tmp = 120.0 * a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.7e+234) or not (x <= 3.7e+141): tmp = (x / z) * 60.0 else: tmp = 120.0 * a return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.7e+234) || !(x <= 3.7e+141)) tmp = Float64(Float64(x / z) * 60.0); else tmp = Float64(120.0 * a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -4.7e+234) || ~((x <= 3.7e+141))) tmp = (x / z) * 60.0; else tmp = 120.0 * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.7e+234], N[Not[LessEqual[x, 3.7e+141]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * 60.0), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+234} \lor \neg \left(x \leq 3.7 \cdot 10^{+141}\right):\\
\;\;\;\;\frac{x}{z} \cdot 60\\
\mathbf{else}:\\
\;\;\;\;120 \cdot a\\
\end{array}
\end{array}
if x < -4.6999999999999999e234 or 3.7000000000000003e141 < x Initial program 99.8%
Taylor expanded in z around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6470.3
Applied rewrites70.3%
Taylor expanded in x around inf
Applied rewrites55.2%
if -4.6999999999999999e234 < x < 3.7000000000000003e141Initial program 98.9%
Taylor expanded in z around inf
lower-*.f6459.9
Applied rewrites59.9%
Final simplification59.1%
(FPCore (x y z t a) :precision binary64 (* 120.0 a))
double code(double x, double y, double z, double t, double a) {
return 120.0 * a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 120.0d0 * a
end function
public static double code(double x, double y, double z, double t, double a) {
return 120.0 * a;
}
def code(x, y, z, t, a): return 120.0 * a
function code(x, y, z, t, a) return Float64(120.0 * a) end
function tmp = code(x, y, z, t, a) tmp = 120.0 * a; end
code[x_, y_, z_, t_, a_] := N[(120.0 * a), $MachinePrecision]
\begin{array}{l}
\\
120 \cdot a
\end{array}
Initial program 99.1%
Taylor expanded in z around inf
lower-*.f6454.1
Applied rewrites54.1%
(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 2024320
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))