
(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 19 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 (/ 60.0 (- z t)) (- x y) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma((60.0 / (z - t)), (x - y), (a * 120.0));
}
function code(x, y, z, t, a) return fma(Float64(60.0 / Float64(z - t)), Float64(x - y), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{60}{z - t}, x - y, a \cdot 120\right)
\end{array}
Initial program 99.8%
lift-+.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.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 (<= t_1 -5e+139)
(* (- x y) (/ -60.0 t))
(if (<= t_1 -2e-59)
(fma -60.0 (/ y z) (* a 120.0))
(if (<= t_1 1e+62)
(* a 120.0)
(if (<= t_1 1e+144)
(* 60.0 (/ x (- z t)))
(/ (* y -60.0) (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+139) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= -2e-59) {
tmp = fma(-60.0, (y / z), (a * 120.0));
} else if (t_1 <= 1e+62) {
tmp = a * 120.0;
} else if (t_1 <= 1e+144) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = (y * -60.0) / (z - t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+139) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (t_1 <= -2e-59) tmp = fma(-60.0, Float64(y / z), Float64(a * 120.0)); elseif (t_1 <= 1e+62) tmp = Float64(a * 120.0); elseif (t_1 <= 1e+144) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(Float64(y * -60.0) / Float64(z - t)); end return 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, -5e+139], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-59], N[(-60.0 * N[(y / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+62], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+144], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+139}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-59}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{y}{z}, a \cdot 120\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+62}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_1 \leq 10^{+144}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000003e139Initial program 99.7%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6470.2
Applied rewrites70.2%
Taylor expanded in t around 0
Applied rewrites70.1%
Applied rewrites70.4%
if -5.0000000000000003e139 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e-59Initial program 99.6%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6475.3
Applied rewrites75.3%
Taylor expanded in x around 0
Applied rewrites65.6%
if -2.0000000000000001e-59 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000004e62Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6472.9
Applied rewrites72.9%
if 1.00000000000000004e62 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000002e144Initial program 99.6%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6459.3
Applied rewrites59.3%
Applied rewrites59.4%
if 1.00000000000000002e144 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
Taylor expanded in z around inf
lower-*.f645.6
Applied rewrites5.6%
Taylor expanded in y around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.5
Applied rewrites73.5%
Final simplification70.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+139)
(* (- x y) (/ -60.0 t))
(if (<= t_1 1e+62)
(* a 120.0)
(if (<= t_1 1e+144) (* 60.0 (/ x (- z t))) (/ (* y -60.0) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+139) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= 1e+62) {
tmp = a * 120.0;
} else if (t_1 <= 1e+144) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = (y * -60.0) / (z - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d+139)) then
tmp = (x - y) * ((-60.0d0) / t)
else if (t_1 <= 1d+62) then
tmp = a * 120.0d0
else if (t_1 <= 1d+144) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = (y * (-60.0d0)) / (z - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+139) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= 1e+62) {
tmp = a * 120.0;
} else if (t_1 <= 1e+144) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = (y * -60.0) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+139: tmp = (x - y) * (-60.0 / t) elif t_1 <= 1e+62: tmp = a * 120.0 elif t_1 <= 1e+144: tmp = 60.0 * (x / (z - t)) else: tmp = (y * -60.0) / (z - t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+139) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (t_1 <= 1e+62) tmp = Float64(a * 120.0); elseif (t_1 <= 1e+144) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(Float64(y * -60.0) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e+139) tmp = (x - y) * (-60.0 / t); elseif (t_1 <= 1e+62) tmp = a * 120.0; elseif (t_1 <= 1e+144) tmp = 60.0 * (x / (z - t)); else tmp = (y * -60.0) / (z - t); 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, -5e+139], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+62], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+144], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+139}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;t\_1 \leq 10^{+62}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_1 \leq 10^{+144}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000003e139Initial program 99.7%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6470.2
Applied rewrites70.2%
Taylor expanded in t around 0
Applied rewrites70.1%
Applied rewrites70.4%
if -5.0000000000000003e139 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000004e62Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6467.8
Applied rewrites67.8%
if 1.00000000000000004e62 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000002e144Initial program 99.6%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6459.3
Applied rewrites59.3%
Applied rewrites59.4%
if 1.00000000000000002e144 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
Taylor expanded in z around inf
lower-*.f645.6
Applied rewrites5.6%
Taylor expanded in y around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.5
Applied rewrites73.5%
Final simplification68.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+139)
(* (- x y) (/ -60.0 t))
(if (<= t_1 1e+62)
(* a 120.0)
(if (<= t_1 1e+144) (* 60.0 (/ x (- z t))) (* y (/ 60.0 (- t 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 <= -5e+139) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= 1e+62) {
tmp = a * 120.0;
} else if (t_1 <= 1e+144) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = y * (60.0 / (t - 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 <= (-5d+139)) then
tmp = (x - y) * ((-60.0d0) / t)
else if (t_1 <= 1d+62) then
tmp = a * 120.0d0
else if (t_1 <= 1d+144) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = y * (60.0d0 / (t - 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 <= -5e+139) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= 1e+62) {
tmp = a * 120.0;
} else if (t_1 <= 1e+144) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = y * (60.0 / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+139: tmp = (x - y) * (-60.0 / t) elif t_1 <= 1e+62: tmp = a * 120.0 elif t_1 <= 1e+144: tmp = 60.0 * (x / (z - t)) else: tmp = y * (60.0 / (t - 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 <= -5e+139) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (t_1 <= 1e+62) tmp = Float64(a * 120.0); elseif (t_1 <= 1e+144) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(y * Float64(60.0 / Float64(t - 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 <= -5e+139) tmp = (x - y) * (-60.0 / t); elseif (t_1 <= 1e+62) tmp = a * 120.0; elseif (t_1 <= 1e+144) tmp = 60.0 * (x / (z - t)); else tmp = y * (60.0 / (t - 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, -5e+139], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+62], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+144], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+139}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;t\_1 \leq 10^{+62}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_1 \leq 10^{+144}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{60}{t - z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000003e139Initial program 99.7%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6470.2
Applied rewrites70.2%
Taylor expanded in t around 0
Applied rewrites70.1%
Applied rewrites70.4%
if -5.0000000000000003e139 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000004e62Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6467.8
Applied rewrites67.8%
if 1.00000000000000004e62 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000002e144Initial program 99.6%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6459.3
Applied rewrites59.3%
Applied rewrites59.4%
if 1.00000000000000002e144 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
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.8
Applied rewrites99.8%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6473.4
Applied rewrites73.4%
Final simplification68.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+139)
(* (- x y) (/ -60.0 t))
(if (<= t_1 1e+62)
(* a 120.0)
(if (<= t_1 1e+144) (* (/ 60.0 (- z t)) x) (* y (/ 60.0 (- t 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 <= -5e+139) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= 1e+62) {
tmp = a * 120.0;
} else if (t_1 <= 1e+144) {
tmp = (60.0 / (z - t)) * x;
} else {
tmp = y * (60.0 / (t - 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 <= (-5d+139)) then
tmp = (x - y) * ((-60.0d0) / t)
else if (t_1 <= 1d+62) then
tmp = a * 120.0d0
else if (t_1 <= 1d+144) then
tmp = (60.0d0 / (z - t)) * x
else
tmp = y * (60.0d0 / (t - 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 <= -5e+139) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= 1e+62) {
tmp = a * 120.0;
} else if (t_1 <= 1e+144) {
tmp = (60.0 / (z - t)) * x;
} else {
tmp = y * (60.0 / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+139: tmp = (x - y) * (-60.0 / t) elif t_1 <= 1e+62: tmp = a * 120.0 elif t_1 <= 1e+144: tmp = (60.0 / (z - t)) * x else: tmp = y * (60.0 / (t - 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 <= -5e+139) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (t_1 <= 1e+62) tmp = Float64(a * 120.0); elseif (t_1 <= 1e+144) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); else tmp = Float64(y * Float64(60.0 / Float64(t - 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 <= -5e+139) tmp = (x - y) * (-60.0 / t); elseif (t_1 <= 1e+62) tmp = a * 120.0; elseif (t_1 <= 1e+144) tmp = (60.0 / (z - t)) * x; else tmp = y * (60.0 / (t - 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, -5e+139], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+62], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+144], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(y * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+139}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;t\_1 \leq 10^{+62}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_1 \leq 10^{+144}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{60}{t - z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000003e139Initial program 99.7%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6470.2
Applied rewrites70.2%
Taylor expanded in t around 0
Applied rewrites70.1%
Applied rewrites70.4%
if -5.0000000000000003e139 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000004e62Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6467.8
Applied rewrites67.8%
if 1.00000000000000004e62 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000002e144Initial program 99.6%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6459.3
Applied rewrites59.3%
Applied rewrites59.4%
if 1.00000000000000002e144 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
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.8
Applied rewrites99.8%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6473.4
Applied rewrites73.4%
Final simplification68.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+139)
(* (- x y) (/ -60.0 t))
(if (<= t_1 5e+76) (* a 120.0) (* y (/ 60.0 (- t 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 <= -5e+139) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= 5e+76) {
tmp = a * 120.0;
} else {
tmp = y * (60.0 / (t - 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 <= (-5d+139)) then
tmp = (x - y) * ((-60.0d0) / t)
else if (t_1 <= 5d+76) then
tmp = a * 120.0d0
else
tmp = y * (60.0d0 / (t - 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 <= -5e+139) {
tmp = (x - y) * (-60.0 / t);
} else if (t_1 <= 5e+76) {
tmp = a * 120.0;
} else {
tmp = y * (60.0 / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+139: tmp = (x - y) * (-60.0 / t) elif t_1 <= 5e+76: tmp = a * 120.0 else: tmp = y * (60.0 / (t - 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 <= -5e+139) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (t_1 <= 5e+76) tmp = Float64(a * 120.0); else tmp = Float64(y * Float64(60.0 / Float64(t - 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 <= -5e+139) tmp = (x - y) * (-60.0 / t); elseif (t_1 <= 5e+76) tmp = a * 120.0; else tmp = y * (60.0 / (t - 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, -5e+139], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+76], N[(a * 120.0), $MachinePrecision], N[(y * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+139}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+76}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{60}{t - z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000003e139Initial program 99.7%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6470.2
Applied rewrites70.2%
Taylor expanded in t around 0
Applied rewrites70.1%
Applied rewrites70.4%
if -5.0000000000000003e139 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999991e76Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6466.7
Applied rewrites66.7%
if 4.99999999999999991e76 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.7
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.7
Applied rewrites99.7%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6459.1
Applied rewrites59.1%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ 60.0 (- t z)))) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -5e+78) t_1 (if (<= t_2 5e+76) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (60.0 / (t - z));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+78) {
tmp = t_1;
} else if (t_2 <= 5e+76) {
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 = y * (60.0d0 / (t - z))
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-5d+78)) then
tmp = t_1
else if (t_2 <= 5d+76) 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 = y * (60.0 / (t - z));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+78) {
tmp = t_1;
} else if (t_2 <= 5e+76) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (60.0 / (t - z)) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -5e+78: tmp = t_1 elif t_2 <= 5e+76: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(60.0 / Float64(t - z))) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -5e+78) tmp = t_1; elseif (t_2 <= 5e+76) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (60.0 / (t - z)); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -5e+78) tmp = t_1; elseif (t_2 <= 5e+76) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+78], t$95$1, If[LessEqual[t$95$2, 5e+76], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{60}{t - z}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+76}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.99999999999999984e78 or 4.99999999999999991e76 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.7
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.7
Applied rewrites99.7%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6452.8
Applied rewrites52.8%
if -4.99999999999999984e78 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999991e76Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6469.4
Applied rewrites69.4%
Final simplification63.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+139)
(* y (/ 60.0 t))
(if (<= t_1 1e+111) (* a 120.0) (/ (* 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 <= -5e+139) {
tmp = y * (60.0 / t);
} else if (t_1 <= 1e+111) {
tmp = a * 120.0;
} else {
tmp = (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 <= (-5d+139)) then
tmp = y * (60.0d0 / t)
else if (t_1 <= 1d+111) then
tmp = a * 120.0d0
else
tmp = (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 <= -5e+139) {
tmp = y * (60.0 / t);
} else if (t_1 <= 1e+111) {
tmp = a * 120.0;
} else {
tmp = (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 <= -5e+139: tmp = y * (60.0 / t) elif t_1 <= 1e+111: tmp = a * 120.0 else: tmp = (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 <= -5e+139) tmp = Float64(y * Float64(60.0 / t)); elseif (t_1 <= 1e+111) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y * -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 <= -5e+139) tmp = y * (60.0 / t); elseif (t_1 <= 1e+111) tmp = a * 120.0; else tmp = (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, -5e+139], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+111], N[(a * 120.0), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+139}:\\
\;\;\;\;y \cdot \frac{60}{t}\\
\mathbf{elif}\;t\_1 \leq 10^{+111}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000003e139Initial program 99.7%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6470.2
Applied rewrites70.2%
Taylor expanded in y around inf
Applied rewrites40.7%
Applied rewrites40.8%
if -5.0000000000000003e139 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999957e110Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6463.6
Applied rewrites63.6%
if 9.99999999999999957e110 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around inf
lower-*.f647.4
Applied rewrites7.4%
Taylor expanded in y around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6466.0
Applied rewrites66.0%
Taylor expanded in z around inf
Applied rewrites44.0%
Final simplification57.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+139)
(* y (/ 60.0 t))
(if (<= t_1 1e+144) (* a 120.0) (/ (* 60.0 y) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+139) {
tmp = y * (60.0 / t);
} else if (t_1 <= 1e+144) {
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 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d+139)) then
tmp = y * (60.0d0 / t)
else if (t_1 <= 1d+144) 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 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+139) {
tmp = y * (60.0 / t);
} else if (t_1 <= 1e+144) {
tmp = a * 120.0;
} else {
tmp = (60.0 * y) / t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+139: tmp = y * (60.0 / t) elif t_1 <= 1e+144: tmp = a * 120.0 else: tmp = (60.0 * y) / t return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+139) tmp = Float64(y * Float64(60.0 / t)); elseif (t_1 <= 1e+144) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 * y) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e+139) tmp = y * (60.0 / t); elseif (t_1 <= 1e+144) 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[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+139], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+144], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+139}:\\
\;\;\;\;y \cdot \frac{60}{t}\\
\mathbf{elif}\;t\_1 \leq 10^{+144}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot y}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000003e139Initial program 99.7%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6470.2
Applied rewrites70.2%
Taylor expanded in y around inf
Applied rewrites40.7%
Applied rewrites40.8%
if -5.0000000000000003e139 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000002e144Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6462.2
Applied rewrites62.2%
if 1.00000000000000002e144 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6454.5
Applied rewrites54.5%
Taylor expanded in y around inf
Applied rewrites39.1%
Final simplification56.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ 60.0 t))) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -5e+139) t_1 (if (<= t_2 1e+144) (* a 120.0) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (60.0 / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+139) {
tmp = t_1;
} else if (t_2 <= 1e+144) {
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 = y * (60.0d0 / t)
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-5d+139)) then
tmp = t_1
else if (t_2 <= 1d+144) 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 = y * (60.0 / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+139) {
tmp = t_1;
} else if (t_2 <= 1e+144) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (60.0 / t) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -5e+139: tmp = t_1 elif t_2 <= 1e+144: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(60.0 / t)) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -5e+139) tmp = t_1; elseif (t_2 <= 1e+144) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (60.0 / t); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -5e+139) tmp = t_1; elseif (t_2 <= 1e+144) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+139], t$95$1, If[LessEqual[t$95$2, 1e+144], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{60}{t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+144}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000003e139 or 1.00000000000000002e144 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6461.6
Applied rewrites61.6%
Taylor expanded in y around inf
Applied rewrites39.8%
Applied rewrites39.8%
if -5.0000000000000003e139 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000002e144Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6462.2
Applied rewrites62.2%
Final simplification56.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma -60.0 (/ y z) (* a 120.0))))
(if (<= (* a 120.0) -5e+135)
t_1
(if (<= (* a 120.0) -4e-30)
(fma -60.0 (/ (- x y) t) (* a 120.0))
(if (<= (* a 120.0) 0.003)
(/ (* 60.0 (- x y)) (- z t))
(if (<= (* a 120.0) 5e+130) (fma 60.0 (/ x z) (* a 120.0)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, (y / z), (a * 120.0));
double tmp;
if ((a * 120.0) <= -5e+135) {
tmp = t_1;
} else if ((a * 120.0) <= -4e-30) {
tmp = fma(-60.0, ((x - y) / t), (a * 120.0));
} else if ((a * 120.0) <= 0.003) {
tmp = (60.0 * (x - y)) / (z - t);
} else if ((a * 120.0) <= 5e+130) {
tmp = fma(60.0, (x / z), (a * 120.0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(y / z), Float64(a * 120.0)) tmp = 0.0 if (Float64(a * 120.0) <= -5e+135) tmp = t_1; elseif (Float64(a * 120.0) <= -4e-30) tmp = fma(-60.0, Float64(Float64(x - y) / t), Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 0.003) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); elseif (Float64(a * 120.0) <= 5e+130) tmp = fma(60.0, Float64(x / 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[(y / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+135], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-30], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 0.003], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+130], N[(60.0 * N[(x / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{y}{z}, a \cdot 120\right)\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-30}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\
\mathbf{elif}\;a \cdot 120 \leq 0.003:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+130}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x}{z}, a \cdot 120\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.00000000000000029e135 or 4.9999999999999996e130 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6478.9
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites85.5%
if -5.00000000000000029e135 < (*.f64 a #s(literal 120 binary64)) < -4e-30Initial program 99.9%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6481.1
Applied rewrites81.1%
if -4e-30 < (*.f64 a #s(literal 120 binary64)) < 0.0030000000000000001Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6483.9
Applied rewrites83.9%
if 0.0030000000000000001 < (*.f64 a #s(literal 120 binary64)) < 4.9999999999999996e130Initial program 99.8%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6477.5
Applied rewrites77.5%
Taylor expanded in x around inf
Applied rewrites81.1%
Final simplification83.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma -60.0 (/ y z) (* a 120.0))))
(if (<= (* a 120.0) -5e+135)
t_1
(if (<= (* a 120.0) -4e-30)
(fma -60.0 (/ x t) (* a 120.0))
(if (<= (* a 120.0) 0.003)
(/ (* 60.0 (- x y)) (- z t))
(if (<= (* a 120.0) 5e+130) (fma 60.0 (/ x z) (* a 120.0)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, (y / z), (a * 120.0));
double tmp;
if ((a * 120.0) <= -5e+135) {
tmp = t_1;
} else if ((a * 120.0) <= -4e-30) {
tmp = fma(-60.0, (x / t), (a * 120.0));
} else if ((a * 120.0) <= 0.003) {
tmp = (60.0 * (x - y)) / (z - t);
} else if ((a * 120.0) <= 5e+130) {
tmp = fma(60.0, (x / z), (a * 120.0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(y / z), Float64(a * 120.0)) tmp = 0.0 if (Float64(a * 120.0) <= -5e+135) tmp = t_1; elseif (Float64(a * 120.0) <= -4e-30) tmp = fma(-60.0, Float64(x / t), Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 0.003) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); elseif (Float64(a * 120.0) <= 5e+130) tmp = fma(60.0, Float64(x / 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[(y / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+135], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-30], N[(-60.0 * N[(x / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 0.003], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+130], N[(60.0 * N[(x / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{y}{z}, a \cdot 120\right)\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-30}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x}{t}, a \cdot 120\right)\\
\mathbf{elif}\;a \cdot 120 \leq 0.003:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+130}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x}{z}, a \cdot 120\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.00000000000000029e135 or 4.9999999999999996e130 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6478.9
Applied rewrites78.9%
Taylor expanded in x around 0
Applied rewrites85.5%
if -5.00000000000000029e135 < (*.f64 a #s(literal 120 binary64)) < -4e-30Initial program 99.9%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6481.1
Applied rewrites81.1%
Taylor expanded in x around inf
Applied rewrites80.7%
if -4e-30 < (*.f64 a #s(literal 120 binary64)) < 0.0030000000000000001Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6483.9
Applied rewrites83.9%
if 0.0030000000000000001 < (*.f64 a #s(literal 120 binary64)) < 4.9999999999999996e130Initial program 99.8%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6477.5
Applied rewrites77.5%
Taylor expanded in x around inf
Applied rewrites81.1%
Final simplification83.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma -60.0 (/ y z) (* a 120.0))))
(if (<= (* a 120.0) -5e+135)
t_1
(if (<= (* a 120.0) -4e-30)
(fma -60.0 (/ x t) (* a 120.0))
(if (<= (* a 120.0) 0.003) (/ (* 60.0 (- x y)) (- z t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, (y / z), (a * 120.0));
double tmp;
if ((a * 120.0) <= -5e+135) {
tmp = t_1;
} else if ((a * 120.0) <= -4e-30) {
tmp = fma(-60.0, (x / t), (a * 120.0));
} else if ((a * 120.0) <= 0.003) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(y / z), Float64(a * 120.0)) tmp = 0.0 if (Float64(a * 120.0) <= -5e+135) tmp = t_1; elseif (Float64(a * 120.0) <= -4e-30) tmp = fma(-60.0, Float64(x / t), Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 0.003) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+135], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-30], N[(-60.0 * N[(x / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 0.003], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{y}{z}, a \cdot 120\right)\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-30}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x}{t}, a \cdot 120\right)\\
\mathbf{elif}\;a \cdot 120 \leq 0.003:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5.00000000000000029e135 or 0.0030000000000000001 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6478.5
Applied rewrites78.5%
Taylor expanded in x around 0
Applied rewrites78.9%
if -5.00000000000000029e135 < (*.f64 a #s(literal 120 binary64)) < -4e-30Initial program 99.9%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6481.1
Applied rewrites81.1%
Taylor expanded in x around inf
Applied rewrites80.7%
if -4e-30 < (*.f64 a #s(literal 120 binary64)) < 0.0030000000000000001Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6483.9
Applied rewrites83.9%
Final simplification81.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma -60.0 (/ y z) (* a 120.0))))
(if (<= (* a 120.0) -5e-52)
t_1
(if (<= (* a 120.0) 0.003) (/ (* 60.0 (- x y)) (- z t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, (y / z), (a * 120.0));
double tmp;
if ((a * 120.0) <= -5e-52) {
tmp = t_1;
} else if ((a * 120.0) <= 0.003) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(y / z), Float64(a * 120.0)) tmp = 0.0 if (Float64(a * 120.0) <= -5e-52) tmp = t_1; elseif (Float64(a * 120.0) <= 0.003) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-52], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 0.003], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{y}{z}, a \cdot 120\right)\\
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \cdot 120 \leq 0.003:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -5e-52 or 0.0030000000000000001 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6475.3
Applied rewrites75.3%
Taylor expanded in x around 0
Applied rewrites74.7%
if -5e-52 < (*.f64 a #s(literal 120 binary64)) < 0.0030000000000000001Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6484.8
Applied rewrites84.8%
Final simplification79.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.2e+56)
(fma 60.0 (/ (- x y) z) (* a 120.0))
(if (<= z 4.5e-116)
(+ (* a 120.0) (* (- x y) (/ -60.0 t)))
(fma a 120.0 (/ (* 60.0 (- x y)) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+56) {
tmp = fma(60.0, ((x - y) / z), (a * 120.0));
} else if (z <= 4.5e-116) {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
} else {
tmp = fma(a, 120.0, ((60.0 * (x - y)) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+56) tmp = fma(60.0, Float64(Float64(x - y) / z), Float64(a * 120.0)); elseif (z <= 4.5e-116) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); else tmp = fma(a, 120.0, Float64(Float64(60.0 * Float64(x - y)) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+56], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-116], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0 + N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x - y}{z}, a \cdot 120\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-116}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{60 \cdot \left(x - y\right)}{z}\right)\\
\end{array}
\end{array}
if z < -3.20000000000000003e56Initial program 99.8%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6488.8
Applied rewrites88.8%
if -3.20000000000000003e56 < z < 4.50000000000000012e-116Initial program 99.7%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
Taylor expanded in z around 0
lower-/.f6481.5
Applied rewrites81.5%
if 4.50000000000000012e-116 < z Initial program 99.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.9
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.9
Applied rewrites99.9%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6487.8
Applied rewrites87.8%
Final simplification84.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.2e+56)
(fma 60.0 (/ (- x y) z) (* a 120.0))
(if (<= z 4.5e-116)
(fma -60.0 (/ (- x y) t) (* a 120.0))
(fma a 120.0 (/ (* 60.0 (- x y)) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+56) {
tmp = fma(60.0, ((x - y) / z), (a * 120.0));
} else if (z <= 4.5e-116) {
tmp = fma(-60.0, ((x - y) / t), (a * 120.0));
} else {
tmp = fma(a, 120.0, ((60.0 * (x - y)) / z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+56) tmp = fma(60.0, Float64(Float64(x - y) / z), Float64(a * 120.0)); elseif (z <= 4.5e-116) tmp = fma(-60.0, Float64(Float64(x - y) / t), Float64(a * 120.0)); else tmp = fma(a, 120.0, Float64(Float64(60.0 * Float64(x - y)) / z)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+56], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-116], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(a * 120.0 + N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x - y}{z}, a \cdot 120\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{60 \cdot \left(x - y\right)}{z}\right)\\
\end{array}
\end{array}
if z < -3.20000000000000003e56Initial program 99.8%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6488.8
Applied rewrites88.8%
if -3.20000000000000003e56 < z < 4.50000000000000012e-116Initial program 99.7%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6481.5
Applied rewrites81.5%
if 4.50000000000000012e-116 < z Initial program 99.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.9
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.9
Applied rewrites99.9%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6487.8
Applied rewrites87.8%
Final simplification84.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma 60.0 (/ (- x y) z) (* a 120.0))))
(if (<= z -3.2e+56)
t_1
(if (<= z 4.5e-116) (fma -60.0 (/ (- x y) t) (* 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) / z), (a * 120.0));
double tmp;
if (z <= -3.2e+56) {
tmp = t_1;
} else if (z <= 4.5e-116) {
tmp = fma(-60.0, ((x - y) / t), (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) / z), Float64(a * 120.0)) tmp = 0.0 if (z <= -3.2e+56) tmp = t_1; elseif (z <= 4.5e-116) tmp = fma(-60.0, Float64(Float64(x - y) / t), 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] / z), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+56], t$95$1, If[LessEqual[z, 4.5e-116], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $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}{z}, a \cdot 120\right)\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-116}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, a \cdot 120\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.20000000000000003e56 or 4.50000000000000012e-116 < z Initial program 99.9%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6488.2
Applied rewrites88.2%
if -3.20000000000000003e56 < z < 4.50000000000000012e-116Initial program 99.7%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6481.5
Applied rewrites81.5%
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.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
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.8
Applied rewrites99.8%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6447.3
Applied rewrites47.3%
Final simplification47.3%
(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 2024226
(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)))