
(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 (/ (- x y) (* (- z t) 0.016666666666666666))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) / ((z - t) * 0.016666666666666666)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\right)
\end{array}
Initial program 99.4%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
metadata-evalN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
lift--.f64N/A
frac-2negN/A
un-div-invN/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-fma.f6499.7
Applied rewrites99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x y) 60.0)) (t_2 (/ t_1 (- z t))))
(if (<= t_2 -2e+233)
(* -60.0 (/ y (- z t)))
(if (<= t_2 -2e+125)
(/ t_1 z)
(if (<= t_2 -2e+14)
(* (- x y) (/ -60.0 t))
(if (<= t_2 6e+103)
(* a 120.0)
(/ (- x y) (* z 0.016666666666666666))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * 60.0;
double t_2 = t_1 / (z - t);
double tmp;
if (t_2 <= -2e+233) {
tmp = -60.0 * (y / (z - t));
} else if (t_2 <= -2e+125) {
tmp = t_1 / z;
} else if (t_2 <= -2e+14) {
tmp = (x - y) * (-60.0 / t);
} else if (t_2 <= 6e+103) {
tmp = a * 120.0;
} else {
tmp = (x - y) / (z * 0.016666666666666666);
}
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 = (x - y) * 60.0d0
t_2 = t_1 / (z - t)
if (t_2 <= (-2d+233)) then
tmp = (-60.0d0) * (y / (z - t))
else if (t_2 <= (-2d+125)) then
tmp = t_1 / z
else if (t_2 <= (-2d+14)) then
tmp = (x - y) * ((-60.0d0) / t)
else if (t_2 <= 6d+103) then
tmp = a * 120.0d0
else
tmp = (x - y) / (z * 0.016666666666666666d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * 60.0;
double t_2 = t_1 / (z - t);
double tmp;
if (t_2 <= -2e+233) {
tmp = -60.0 * (y / (z - t));
} else if (t_2 <= -2e+125) {
tmp = t_1 / z;
} else if (t_2 <= -2e+14) {
tmp = (x - y) * (-60.0 / t);
} else if (t_2 <= 6e+103) {
tmp = a * 120.0;
} else {
tmp = (x - y) / (z * 0.016666666666666666);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * 60.0 t_2 = t_1 / (z - t) tmp = 0 if t_2 <= -2e+233: tmp = -60.0 * (y / (z - t)) elif t_2 <= -2e+125: tmp = t_1 / z elif t_2 <= -2e+14: tmp = (x - y) * (-60.0 / t) elif t_2 <= 6e+103: tmp = a * 120.0 else: tmp = (x - y) / (z * 0.016666666666666666) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * 60.0) t_2 = Float64(t_1 / Float64(z - t)) tmp = 0.0 if (t_2 <= -2e+233) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (t_2 <= -2e+125) tmp = Float64(t_1 / z); elseif (t_2 <= -2e+14) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (t_2 <= 6e+103) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x - y) / Float64(z * 0.016666666666666666)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * 60.0; t_2 = t_1 / (z - t); tmp = 0.0; if (t_2 <= -2e+233) tmp = -60.0 * (y / (z - t)); elseif (t_2 <= -2e+125) tmp = t_1 / z; elseif (t_2 <= -2e+14) tmp = (x - y) * (-60.0 / t); elseif (t_2 <= 6e+103) tmp = a * 120.0; else tmp = (x - y) / (z * 0.016666666666666666); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+233], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e+125], N[(t$95$1 / z), $MachinePrecision], If[LessEqual[t$95$2, -2e+14], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 6e+103], N[(a * 120.0), $MachinePrecision], N[(N[(x - y), $MachinePrecision] / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot 60\\
t_2 := \frac{t\_1}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+233}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{+125}:\\
\;\;\;\;\frac{t\_1}{z}\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{+14}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;t\_2 \leq 6 \cdot 10^{+103}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z \cdot 0.016666666666666666}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.99999999999999995e233Initial program 99.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6474.2
Applied rewrites74.2%
if -1.99999999999999995e233 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999998e125Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6483.7
Applied rewrites83.7%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6462.2
Applied rewrites62.2%
if -1.9999999999999998e125 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e14Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6478.5
Applied rewrites78.5%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6450.7
Applied rewrites50.7%
lift--.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6450.7
Applied rewrites50.7%
if -2e14 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 6e103Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6470.6
Applied rewrites70.6%
if 6e103 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 97.5%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6486.5
Applied rewrites86.5%
lift--.f64N/A
*-commutativeN/A
lift--.f64N/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval88.6
Applied rewrites88.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f6458.0
Applied rewrites58.0%
Final simplification65.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x y) 60.0)) (t_2 (/ t_1 (- z t))) (t_3 (/ t_1 z)))
(if (<= t_2 -2e+233)
(* -60.0 (/ y (- z t)))
(if (<= t_2 -2e+125)
t_3
(if (<= t_2 -2e+14)
(* (- x y) (/ -60.0 t))
(if (<= t_2 1e+107) (* a 120.0) t_3))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * 60.0;
double t_2 = t_1 / (z - t);
double t_3 = t_1 / z;
double tmp;
if (t_2 <= -2e+233) {
tmp = -60.0 * (y / (z - t));
} else if (t_2 <= -2e+125) {
tmp = t_3;
} else if (t_2 <= -2e+14) {
tmp = (x - y) * (-60.0 / t);
} else if (t_2 <= 1e+107) {
tmp = a * 120.0;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = (x - y) * 60.0d0
t_2 = t_1 / (z - t)
t_3 = t_1 / z
if (t_2 <= (-2d+233)) then
tmp = (-60.0d0) * (y / (z - t))
else if (t_2 <= (-2d+125)) then
tmp = t_3
else if (t_2 <= (-2d+14)) then
tmp = (x - y) * ((-60.0d0) / t)
else if (t_2 <= 1d+107) then
tmp = a * 120.0d0
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * 60.0;
double t_2 = t_1 / (z - t);
double t_3 = t_1 / z;
double tmp;
if (t_2 <= -2e+233) {
tmp = -60.0 * (y / (z - t));
} else if (t_2 <= -2e+125) {
tmp = t_3;
} else if (t_2 <= -2e+14) {
tmp = (x - y) * (-60.0 / t);
} else if (t_2 <= 1e+107) {
tmp = a * 120.0;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * 60.0 t_2 = t_1 / (z - t) t_3 = t_1 / z tmp = 0 if t_2 <= -2e+233: tmp = -60.0 * (y / (z - t)) elif t_2 <= -2e+125: tmp = t_3 elif t_2 <= -2e+14: tmp = (x - y) * (-60.0 / t) elif t_2 <= 1e+107: tmp = a * 120.0 else: tmp = t_3 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * 60.0) t_2 = Float64(t_1 / Float64(z - t)) t_3 = Float64(t_1 / z) tmp = 0.0 if (t_2 <= -2e+233) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (t_2 <= -2e+125) tmp = t_3; elseif (t_2 <= -2e+14) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (t_2 <= 1e+107) tmp = Float64(a * 120.0); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * 60.0; t_2 = t_1 / (z - t); t_3 = t_1 / z; tmp = 0.0; if (t_2 <= -2e+233) tmp = -60.0 * (y / (z - t)); elseif (t_2 <= -2e+125) tmp = t_3; elseif (t_2 <= -2e+14) tmp = (x - y) * (-60.0 / t); elseif (t_2 <= 1e+107) tmp = a * 120.0; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / z), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+233], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e+125], t$95$3, If[LessEqual[t$95$2, -2e+14], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+107], N[(a * 120.0), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot 60\\
t_2 := \frac{t\_1}{z - t}\\
t_3 := \frac{t\_1}{z}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+233}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{+125}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{+14}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;t\_2 \leq 10^{+107}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.99999999999999995e233Initial program 99.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6474.2
Applied rewrites74.2%
if -1.99999999999999995e233 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999998e125 or 9.9999999999999997e106 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 98.1%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6486.6
Applied rewrites86.6%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6460.5
Applied rewrites60.5%
if -1.9999999999999998e125 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e14Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6478.5
Applied rewrites78.5%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6450.7
Applied rewrites50.7%
lift--.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6450.7
Applied rewrites50.7%
if -2e14 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999997e106Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6469.8
Applied rewrites69.8%
Final simplification65.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y -60.0) (- z t))) (t_2 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_2 -2e+33)
t_1
(if (<= t_2 5e+14)
(* a 120.0)
(if (<= t_2 1e+214) t_1 (/ (* x 60.0) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * -60.0) / (z - t);
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+33) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = a * 120.0;
} else if (t_2 <= 1e+214) {
tmp = t_1;
} else {
tmp = (x * 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * (-60.0d0)) / (z - t)
t_2 = ((x - y) * 60.0d0) / (z - t)
if (t_2 <= (-2d+33)) then
tmp = t_1
else if (t_2 <= 5d+14) then
tmp = a * 120.0d0
else if (t_2 <= 1d+214) then
tmp = t_1
else
tmp = (x * 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 t_1 = (y * -60.0) / (z - t);
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+33) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = a * 120.0;
} else if (t_2 <= 1e+214) {
tmp = t_1;
} else {
tmp = (x * 60.0) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * -60.0) / (z - t) t_2 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_2 <= -2e+33: tmp = t_1 elif t_2 <= 5e+14: tmp = a * 120.0 elif t_2 <= 1e+214: tmp = t_1 else: tmp = (x * 60.0) / (z - t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * -60.0) / Float64(z - t)) t_2 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_2 <= -2e+33) tmp = t_1; elseif (t_2 <= 5e+14) tmp = Float64(a * 120.0); elseif (t_2 <= 1e+214) tmp = t_1; else tmp = Float64(Float64(x * 60.0) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * -60.0) / (z - t); t_2 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_2 <= -2e+33) tmp = t_1; elseif (t_2 <= 5e+14) tmp = a * 120.0; elseif (t_2 <= 1e+214) tmp = t_1; else tmp = (x * 60.0) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+33], t$95$1, If[LessEqual[t$95$2, 5e+14], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$2, 1e+214], t$95$1, N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot -60}{z - t}\\
t_2 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_2 \leq 10^{+214}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 60}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999999e33 or 5e14 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999995e213Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6480.0
Applied rewrites80.0%
Taylor expanded in x around 0
lower-*.f6451.3
Applied rewrites51.3%
if -1.9999999999999999e33 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5e14Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6474.7
Applied rewrites74.7%
if 9.9999999999999995e213 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 94.5%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6462.1
Applied rewrites62.1%
Final simplification63.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y -60.0) (- z t))) (t_2 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_2 -2e+33)
t_1
(if (<= t_2 5e+14)
(* a 120.0)
(if (<= t_2 2e+214) t_1 (* (- x y) (/ -60.0 t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * -60.0) / (z - t);
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+33) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = a * 120.0;
} else if (t_2 <= 2e+214) {
tmp = t_1;
} else {
tmp = (x - y) * (-60.0 / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * (-60.0d0)) / (z - t)
t_2 = ((x - y) * 60.0d0) / (z - t)
if (t_2 <= (-2d+33)) then
tmp = t_1
else if (t_2 <= 5d+14) then
tmp = a * 120.0d0
else if (t_2 <= 2d+214) then
tmp = t_1
else
tmp = (x - y) * ((-60.0d0) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * -60.0) / (z - t);
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+33) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = a * 120.0;
} else if (t_2 <= 2e+214) {
tmp = t_1;
} else {
tmp = (x - y) * (-60.0 / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * -60.0) / (z - t) t_2 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_2 <= -2e+33: tmp = t_1 elif t_2 <= 5e+14: tmp = a * 120.0 elif t_2 <= 2e+214: tmp = t_1 else: tmp = (x - y) * (-60.0 / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * -60.0) / Float64(z - t)) t_2 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_2 <= -2e+33) tmp = t_1; elseif (t_2 <= 5e+14) tmp = Float64(a * 120.0); elseif (t_2 <= 2e+214) tmp = t_1; else tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * -60.0) / (z - t); t_2 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_2 <= -2e+33) tmp = t_1; elseif (t_2 <= 5e+14) tmp = a * 120.0; elseif (t_2 <= 2e+214) tmp = t_1; else tmp = (x - y) * (-60.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+33], t$95$1, If[LessEqual[t$95$2, 5e+14], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$2, 2e+214], t$95$1, N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot -60}{z - t}\\
t_2 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+214}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999999e33 or 5e14 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.9999999999999999e214Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6480.2
Applied rewrites80.2%
Taylor expanded in x around 0
lower-*.f6450.8
Applied rewrites50.8%
if -1.9999999999999999e33 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5e14Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6474.7
Applied rewrites74.7%
if 1.9999999999999999e214 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 94.1%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6488.8
Applied rewrites88.8%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6455.4
Applied rewrites55.4%
lift--.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6461.2
Applied rewrites61.2%
Final simplification63.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_2 -2e+33)
t_1
(if (<= t_2 5e+14)
(* a 120.0)
(if (<= t_2 2e+214) t_1 (* (- x y) (/ -60.0 t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+33) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = a * 120.0;
} else if (t_2 <= 2e+214) {
tmp = t_1;
} else {
tmp = (x - y) * (-60.0 / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
t_2 = ((x - y) * 60.0d0) / (z - t)
if (t_2 <= (-2d+33)) then
tmp = t_1
else if (t_2 <= 5d+14) then
tmp = a * 120.0d0
else if (t_2 <= 2d+214) then
tmp = t_1
else
tmp = (x - y) * ((-60.0d0) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+33) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = a * 120.0;
} else if (t_2 <= 2e+214) {
tmp = t_1;
} else {
tmp = (x - y) * (-60.0 / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) t_2 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_2 <= -2e+33: tmp = t_1 elif t_2 <= 5e+14: tmp = a * 120.0 elif t_2 <= 2e+214: tmp = t_1 else: tmp = (x - y) * (-60.0 / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) t_2 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_2 <= -2e+33) tmp = t_1; elseif (t_2 <= 5e+14) tmp = Float64(a * 120.0); elseif (t_2 <= 2e+214) tmp = t_1; else tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); t_2 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_2 <= -2e+33) tmp = t_1; elseif (t_2 <= 5e+14) tmp = a * 120.0; elseif (t_2 <= 2e+214) tmp = t_1; else tmp = (x - y) * (-60.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+33], t$95$1, If[LessEqual[t$95$2, 5e+14], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$2, 2e+214], t$95$1, N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
t_2 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+214}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999999e33 or 5e14 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.9999999999999999e214Initial program 99.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6450.8
Applied rewrites50.8%
if -1.9999999999999999e33 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5e14Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6474.7
Applied rewrites74.7%
if 1.9999999999999999e214 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 94.1%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6488.8
Applied rewrites88.8%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6455.4
Applied rewrites55.4%
lift--.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6461.2
Applied rewrites61.2%
Final simplification63.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_1 -1e+33)
t_1
(if (<= t_1 2e+124)
(fma 120.0 a (* 60.0 (/ y (- t z))))
(* (- x y) (/ 60.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -1e+33) {
tmp = t_1;
} else if (t_1 <= 2e+124) {
tmp = fma(120.0, a, (60.0 * (y / (t - z))));
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_1 <= -1e+33) tmp = t_1; elseif (t_1 <= 2e+124) tmp = fma(120.0, a, Float64(60.0 * Float64(y / Float64(t - z)))); else tmp = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+33], t$95$1, If[LessEqual[t$95$1, 2e+124], N[(120.0 * a + N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+124}:\\
\;\;\;\;\mathsf{fma}\left(120, a, 60 \cdot \frac{y}{t - z}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999995e32Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6484.9
Applied rewrites84.9%
if -9.9999999999999995e32 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.9999999999999999e124Initial program 99.8%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
div-invN/A
lift-*.f64N/A
div-invN/A
frac-2negN/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
associate-*l*N/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6487.9
Applied rewrites87.9%
if 1.9999999999999999e124 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 97.1%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6489.5
Applied rewrites89.5%
lift--.f64N/A
lift--.f64N/A
associate-*l/N/A
lift-/.f64N/A
lower-*.f6492.2
Applied rewrites92.2%
Final simplification87.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_1 -2e+14)
t_1
(if (<= t_1 1e-16)
(* a 120.0)
(/ (- x y) (fma z 0.016666666666666666 (* t -0.016666666666666666)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -2e+14) {
tmp = t_1;
} else if (t_1 <= 1e-16) {
tmp = a * 120.0;
} else {
tmp = (x - y) / fma(z, 0.016666666666666666, (t * -0.016666666666666666));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+14) tmp = t_1; elseif (t_1 <= 1e-16) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x - y) / fma(z, 0.016666666666666666, Float64(t * -0.016666666666666666))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+14], t$95$1, If[LessEqual[t$95$1, 1e-16], N[(a * 120.0), $MachinePrecision], N[(N[(x - y), $MachinePrecision] / N[(z * 0.016666666666666666 + N[(t * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{-16}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{\mathsf{fma}\left(z, 0.016666666666666666, t \cdot -0.016666666666666666\right)}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e14Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6483.1
Applied rewrites83.1%
if -2e14 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999998e-17Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6478.8
Applied rewrites78.8%
if 9.9999999999999998e-17 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 98.4%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6477.0
Applied rewrites77.0%
lift--.f64N/A
*-commutativeN/A
lift--.f64N/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
div-invN/A
lower-*.f64N/A
metadata-eval78.2
Applied rewrites78.2%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6478.3
Applied rewrites78.3%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_1 -2e+14)
t_1
(if (<= t_1 1e-16) (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -2e+14) {
tmp = t_1;
} else if (t_1 <= 1e-16) {
tmp = a * 120.0;
} 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) :: t_1
real(8) :: tmp
t_1 = ((x - y) * 60.0d0) / (z - t)
if (t_1 <= (-2d+14)) then
tmp = t_1
else if (t_1 <= 1d-16) then
tmp = a * 120.0d0
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 t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -2e+14) {
tmp = t_1;
} else if (t_1 <= 1e-16) {
tmp = a * 120.0;
} else {
tmp = (x - y) * (60.0 / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_1 <= -2e+14: tmp = t_1 elif t_1 <= 1e-16: tmp = a * 120.0 else: tmp = (x - y) * (60.0 / (z - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+14) tmp = t_1; elseif (t_1 <= 1e-16) tmp = Float64(a * 120.0); 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) t_1 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_1 <= -2e+14) tmp = t_1; elseif (t_1 <= 1e-16) tmp = a * 120.0; else tmp = (x - y) * (60.0 / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+14], t$95$1, If[LessEqual[t$95$1, 1e-16], N[(a * 120.0), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{-16}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e14Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6483.1
Applied rewrites83.1%
if -2e14 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999998e-17Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6478.8
Applied rewrites78.8%
if 9.9999999999999998e-17 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 98.4%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6477.0
Applied rewrites77.0%
lift--.f64N/A
lift--.f64N/A
associate-*l/N/A
lift-/.f64N/A
lower-*.f6478.3
Applied rewrites78.3%
Final simplification79.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (- x y) (/ 60.0 (- z t)))) (t_2 (/ (* (- x y) 60.0) (- z t)))) (if (<= t_2 -2e+14) t_1 (if (<= t_2 1e-16) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (60.0 / (z - t));
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+14) {
tmp = t_1;
} else if (t_2 <= 1e-16) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x - y) * (60.0d0 / (z - t))
t_2 = ((x - y) * 60.0d0) / (z - t)
if (t_2 <= (-2d+14)) then
tmp = t_1
else if (t_2 <= 1d-16) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (60.0 / (z - t));
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+14) {
tmp = t_1;
} else if (t_2 <= 1e-16) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * (60.0 / (z - t)) t_2 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_2 <= -2e+14: tmp = t_1 elif t_2 <= 1e-16: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))) t_2 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_2 <= -2e+14) tmp = t_1; elseif (t_2 <= 1e-16) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * (60.0 / (z - t)); t_2 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_2 <= -2e+14) tmp = t_1; elseif (t_2 <= 1e-16) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+14], t$95$1, If[LessEqual[t$95$2, 1e-16], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{60}{z - t}\\
t_2 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-16}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e14 or 9.9999999999999998e-17 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.0%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6480.0
Applied rewrites80.0%
lift--.f64N/A
lift--.f64N/A
associate-*l/N/A
lift-/.f64N/A
lower-*.f6480.6
Applied rewrites80.6%
if -2e14 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999998e-17Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6478.8
Applied rewrites78.8%
Final simplification79.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (/ (* (- x y) 60.0) (- z t)))) (if (<= t_2 -2e+33) t_1 (if (<= t_2 5e+14) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+33) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
t_2 = ((x - y) * 60.0d0) / (z - t)
if (t_2 <= (-2d+33)) then
tmp = t_1
else if (t_2 <= 5d+14) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+33) {
tmp = t_1;
} else if (t_2 <= 5e+14) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) t_2 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_2 <= -2e+33: tmp = t_1 elif t_2 <= 5e+14: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) t_2 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_2 <= -2e+33) tmp = t_1; elseif (t_2 <= 5e+14) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); t_2 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_2 <= -2e+33) tmp = t_1; elseif (t_2 <= 5e+14) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+33], t$95$1, If[LessEqual[t$95$2, 5e+14], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
t_2 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999999e33 or 5e14 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6448.2
Applied rewrites48.2%
if -1.9999999999999999e33 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5e14Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6474.7
Applied rewrites74.7%
Final simplification61.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_1 -4e+65)
(/ (* y -60.0) z)
(if (<= t_1 2e+124) (* a 120.0) (* x (/ 60.0 z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = (y * -60.0) / z;
} else if (t_1 <= 2e+124) {
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) :: t_1
real(8) :: tmp
t_1 = ((x - y) * 60.0d0) / (z - t)
if (t_1 <= (-4d+65)) then
tmp = (y * (-60.0d0)) / z
else if (t_1 <= 2d+124) 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 t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = (y * -60.0) / z;
} else if (t_1 <= 2e+124) {
tmp = a * 120.0;
} else {
tmp = x * (60.0 / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_1 <= -4e+65: tmp = (y * -60.0) / z elif t_1 <= 2e+124: tmp = a * 120.0 else: tmp = x * (60.0 / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+65) tmp = Float64(Float64(y * -60.0) / z); elseif (t_1 <= 2e+124) 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) t_1 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_1 <= -4e+65) tmp = (y * -60.0) / z; elseif (t_1 <= 2e+124) tmp = a * 120.0; else tmp = x * (60.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+65], N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 2e+124], N[(a * 120.0), $MachinePrecision], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;\frac{y \cdot -60}{z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+124}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65Initial program 99.7%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6453.4
Applied rewrites53.4%
Taylor expanded in y around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f6431.4
Applied rewrites31.4%
if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.9999999999999999e124Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6466.2
Applied rewrites66.2%
if 1.9999999999999999e124 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 97.1%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6464.1
Applied rewrites64.1%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6440.3
Applied rewrites40.3%
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6440.3
Applied rewrites40.3%
Final simplification55.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_1 -4e+65)
(* y (/ -60.0 z))
(if (<= t_1 2e+124) (* a 120.0) (* x (/ 60.0 z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = y * (-60.0 / z);
} else if (t_1 <= 2e+124) {
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) :: t_1
real(8) :: tmp
t_1 = ((x - y) * 60.0d0) / (z - t)
if (t_1 <= (-4d+65)) then
tmp = y * ((-60.0d0) / z)
else if (t_1 <= 2d+124) 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 t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = y * (-60.0 / z);
} else if (t_1 <= 2e+124) {
tmp = a * 120.0;
} else {
tmp = x * (60.0 / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_1 <= -4e+65: tmp = y * (-60.0 / z) elif t_1 <= 2e+124: tmp = a * 120.0 else: tmp = x * (60.0 / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+65) tmp = Float64(y * Float64(-60.0 / z)); elseif (t_1 <= 2e+124) 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) t_1 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_1 <= -4e+65) tmp = y * (-60.0 / z); elseif (t_1 <= 2e+124) tmp = a * 120.0; else tmp = x * (60.0 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+65], N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+124], N[(a * 120.0), $MachinePrecision], N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+124}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65Initial program 99.7%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6453.4
Applied rewrites53.4%
Taylor expanded in y around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f6431.4
Applied rewrites31.4%
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6431.3
Applied rewrites31.3%
if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.9999999999999999e124Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6466.2
Applied rewrites66.2%
if 1.9999999999999999e124 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 97.1%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6464.1
Applied rewrites64.1%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6440.3
Applied rewrites40.3%
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6440.3
Applied rewrites40.3%
Final simplification55.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_1 -4e+65)
(* y (/ -60.0 z))
(if (<= t_1 4e+165) (* a 120.0) (* 60.0 (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = y * (-60.0 / z);
} else if (t_1 <= 4e+165) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((x - y) * 60.0d0) / (z - t)
if (t_1 <= (-4d+65)) then
tmp = y * ((-60.0d0) / z)
else if (t_1 <= 4d+165) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = y * (-60.0 / z);
} else if (t_1 <= 4e+165) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_1 <= -4e+65: tmp = y * (-60.0 / z) elif t_1 <= 4e+165: tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+65) tmp = Float64(y * Float64(-60.0 / z)); elseif (t_1 <= 4e+165) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_1 <= -4e+65) tmp = y * (-60.0 / z); elseif (t_1 <= 4e+165) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+65], N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+165], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+165}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65Initial program 99.7%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6453.4
Applied rewrites53.4%
Taylor expanded in y around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f6431.4
Applied rewrites31.4%
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6431.3
Applied rewrites31.3%
if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.9999999999999996e165Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6463.7
Applied rewrites63.7%
if 3.9999999999999996e165 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 96.5%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
metadata-evalN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
lift--.f64N/A
frac-2negN/A
un-div-invN/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-fma.f6499.7
Applied rewrites99.8%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f6452.2
Applied rewrites52.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-/.f6436.2
Applied rewrites36.2%
Final simplification53.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* 60.0 (/ y t))) (t_2 (/ (* (- x y) 60.0) (- z t)))) (if (<= t_2 -2e+205) t_1 (if (<= t_2 4e+165) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (y / t);
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+205) {
tmp = t_1;
} else if (t_2 <= 4e+165) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * (y / t)
t_2 = ((x - y) * 60.0d0) / (z - t)
if (t_2 <= (-2d+205)) then
tmp = t_1
else if (t_2 <= 4d+165) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (y / t);
double t_2 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_2 <= -2e+205) {
tmp = t_1;
} else if (t_2 <= 4e+165) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (y / t) t_2 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_2 <= -2e+205: tmp = t_1 elif t_2 <= 4e+165: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(y / t)) t_2 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_2 <= -2e+205) tmp = t_1; elseif (t_2 <= 4e+165) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (y / t); t_2 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_2 <= -2e+205) tmp = t_1; elseif (t_2 <= 4e+165) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+205], t$95$1, If[LessEqual[t$95$2, 4e+165], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{y}{t}\\
t_2 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+165}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.00000000000000003e205 or 3.9999999999999996e165 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 97.9%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
div-invN/A
lift-*.f64N/A
div-invN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
metadata-evalN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
lift--.f64N/A
frac-2negN/A
un-div-invN/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-fma.f6499.6
Applied rewrites99.8%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f6456.4
Applied rewrites56.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-/.f6437.9
Applied rewrites37.9%
if -2.00000000000000003e205 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.9999999999999996e165Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6456.4
Applied rewrites56.4%
Final simplification52.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma -60.0 (/ (- x y) t) (* a 120.0))))
(if (<= t -1.3e-10)
t_1
(if (<= t 7.5e-9) (fma 60.0 (/ (- x y) z) (* a 120.0)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, ((x - y) / t), (a * 120.0));
double tmp;
if (t <= -1.3e-10) {
tmp = t_1;
} else if (t <= 7.5e-9) {
tmp = fma(60.0, ((x - y) / z), (a * 120.0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(Float64(x - y) / t), Float64(a * 120.0)) tmp = 0.0 if (t <= -1.3e-10) tmp = t_1; elseif (t <= 7.5e-9) tmp = fma(60.0, Float64(Float64(x - y) / z), Float64(a * 120.0)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e-10], t$95$1, If[LessEqual[t, 7.5e-9], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x - y}{z}, a \cdot 120\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.29999999999999991e-10 or 7.49999999999999933e-9 < t Initial program 99.1%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6486.1
Applied rewrites86.1%
if -1.29999999999999991e-10 < t < 7.49999999999999933e-9Initial program 99.7%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6483.7
Applied rewrites83.7%
Final simplification84.9%
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (/ (* (- x y) -60.0) (- t z))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, (((x - y) * -60.0) / (t - z)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(Float64(x - y) * -60.0) / Float64(t - z))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(N[(x - y), $MachinePrecision] * -60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{\left(x - y\right) \cdot -60}{t - z}\right)
\end{array}
Initial program 99.4%
lift--.f64N/A
lift-*.f64N/A
remove-double-negN/A
lift--.f64N/A
remove-double-negN/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.4
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
metadata-evalN/A
neg-sub0N/A
lift--.f64N/A
sub-negN/A
+-commutativeN/A
associate--r+N/A
neg-sub0N/A
remove-double-negN/A
lower--.f6499.4
Applied rewrites99.4%
(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
lower-*.f6446.9
Applied rewrites46.9%
Final simplification46.9%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024214
(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)))