
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (* 120.0 a) (/ (* (- y x) 60.0) (- t z))))
double code(double x, double y, double z, double t, double a) {
return (120.0 * a) + (((y - x) * 60.0) / (t - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (120.0d0 * a) + (((y - x) * 60.0d0) / (t - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return (120.0 * a) + (((y - x) * 60.0) / (t - z));
}
def code(x, y, z, t, a): return (120.0 * a) + (((y - x) * 60.0) / (t - z))
function code(x, y, z, t, a) return Float64(Float64(120.0 * a) + Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z))) end
function tmp = code(x, y, z, t, a) tmp = (120.0 * a) + (((y - x) * 60.0) / (t - z)); end
code[x_, y_, z_, t_, a_] := N[(N[(120.0 * a), $MachinePrecision] + N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
120 \cdot a + \frac{\left(y - x\right) \cdot 60}{t - z}
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y x) 60.0) (- t z))))
(if (<= t_1 -1e+70)
(/ (- y x) (* -0.016666666666666666 (- z t)))
(if (<= t_1 -5e-131)
(fma a 120.0 (/ (* y 60.0) t))
(if (<= t_1 5e-47)
(* 120.0 a)
(if (<= t_1 5e+72) (fma a 120.0 (* (/ x t) -60.0)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -1e+70) {
tmp = (y - x) / (-0.016666666666666666 * (z - t));
} else if (t_1 <= -5e-131) {
tmp = fma(a, 120.0, ((y * 60.0) / t));
} else if (t_1 <= 5e-47) {
tmp = 120.0 * a;
} else if (t_1 <= 5e+72) {
tmp = fma(a, 120.0, ((x / t) * -60.0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_1 <= -1e+70) tmp = Float64(Float64(y - x) / Float64(-0.016666666666666666 * Float64(z - t))); elseif (t_1 <= -5e-131) tmp = fma(a, 120.0, Float64(Float64(y * 60.0) / t)); elseif (t_1 <= 5e-47) tmp = Float64(120.0 * a); elseif (t_1 <= 5e+72) tmp = fma(a, 120.0, Float64(Float64(x / t) * -60.0)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+70], N[(N[(y - x), $MachinePrecision] / N[(-0.016666666666666666 * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-131], N[(a * 120.0 + N[(N[(y * 60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-47], N[(120.0 * a), $MachinePrecision], If[LessEqual[t$95$1, 5e+72], N[(a * 120.0 + N[(N[(x / t), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+70}:\\
\;\;\;\;\frac{y - x}{-0.016666666666666666 \cdot \left(z - t\right)}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-131}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{y \cdot 60}{t}\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-47}:\\
\;\;\;\;120 \cdot a\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{x}{t} \cdot -60\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000007e70Initial program 99.7%
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
clear-num-revN/A
lower-/.f64N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-evalN/A
metadata-eval99.7
Applied rewrites99.7%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
distribute-rgt-inN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6499.8
Applied rewrites99.8%
Taylor expanded in a around 0
sub-negN/A
mul-1-negN/A
associate-*r/N/A
div-add-revN/A
mul-1-negN/A
sub-negN/A
lower-/.f64N/A
lower--.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f6483.7
Applied rewrites83.7%
if -1.00000000000000007e70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000004e-131Initial program 100.0%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6472.8
Applied rewrites72.8%
Applied rewrites72.9%
Taylor expanded in x around 0
Applied rewrites82.2%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6482.2
Applied rewrites82.2%
if -5.0000000000000004e-131 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000011e-47Initial program 100.0%
Taylor expanded in z around inf
lower-*.f6488.2
Applied rewrites88.2%
if 5.00000000000000011e-47 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999992e72Initial program 99.6%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6473.2
Applied rewrites73.2%
Taylor expanded in x around inf
Applied rewrites76.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6476.7
Applied rewrites76.7%
if 4.99999999999999992e72 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around inf
lower-*.f6410.3
Applied rewrites10.3%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6492.1
Applied rewrites92.1%
Final simplification85.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y x) 60.0) (- t z))))
(if (<= t_1 -1e+70)
(/ (- y x) (* -0.016666666666666666 (- z t)))
(if (<= t_1 -5e-131)
(fma (/ y t) 60.0 (* 120.0 a))
(if (<= t_1 5e-47)
(* 120.0 a)
(if (<= t_1 5e+72) (fma a 120.0 (* (/ x t) -60.0)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -1e+70) {
tmp = (y - x) / (-0.016666666666666666 * (z - t));
} else if (t_1 <= -5e-131) {
tmp = fma((y / t), 60.0, (120.0 * a));
} else if (t_1 <= 5e-47) {
tmp = 120.0 * a;
} else if (t_1 <= 5e+72) {
tmp = fma(a, 120.0, ((x / t) * -60.0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_1 <= -1e+70) tmp = Float64(Float64(y - x) / Float64(-0.016666666666666666 * Float64(z - t))); elseif (t_1 <= -5e-131) tmp = fma(Float64(y / t), 60.0, Float64(120.0 * a)); elseif (t_1 <= 5e-47) tmp = Float64(120.0 * a); elseif (t_1 <= 5e+72) tmp = fma(a, 120.0, Float64(Float64(x / t) * -60.0)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+70], N[(N[(y - x), $MachinePrecision] / N[(-0.016666666666666666 * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-131], N[(N[(y / t), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-47], N[(120.0 * a), $MachinePrecision], If[LessEqual[t$95$1, 5e+72], N[(a * 120.0 + N[(N[(x / t), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+70}:\\
\;\;\;\;\frac{y - x}{-0.016666666666666666 \cdot \left(z - t\right)}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-131}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 60, 120 \cdot a\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-47}:\\
\;\;\;\;120 \cdot a\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{x}{t} \cdot -60\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000007e70Initial program 99.7%
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
clear-num-revN/A
lower-/.f64N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-evalN/A
metadata-eval99.7
Applied rewrites99.7%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
distribute-rgt-inN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6499.8
Applied rewrites99.8%
Taylor expanded in a around 0
sub-negN/A
mul-1-negN/A
associate-*r/N/A
div-add-revN/A
mul-1-negN/A
sub-negN/A
lower-/.f64N/A
lower--.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f6483.7
Applied rewrites83.7%
if -1.00000000000000007e70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000004e-131Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6486.6
Applied rewrites86.6%
Taylor expanded in z around 0
Applied rewrites82.2%
if -5.0000000000000004e-131 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000011e-47Initial program 100.0%
Taylor expanded in z around inf
lower-*.f6488.2
Applied rewrites88.2%
if 5.00000000000000011e-47 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999992e72Initial program 99.6%
Taylor expanded in z around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6473.2
Applied rewrites73.2%
Taylor expanded in x around inf
Applied rewrites76.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6476.7
Applied rewrites76.7%
if 4.99999999999999992e72 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around inf
lower-*.f6410.3
Applied rewrites10.3%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6492.1
Applied rewrites92.1%
Final simplification85.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y x) 60.0) (- t z))))
(if (<= t_1 -1e+70)
(/ (- y x) (* -0.016666666666666666 (- z t)))
(if (<= t_1 -5e-131)
(fma (/ y t) 60.0 (* 120.0 a))
(if (<= t_1 2e+52) (* 120.0 a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -1e+70) {
tmp = (y - x) / (-0.016666666666666666 * (z - t));
} else if (t_1 <= -5e-131) {
tmp = fma((y / t), 60.0, (120.0 * a));
} else if (t_1 <= 2e+52) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_1 <= -1e+70) tmp = Float64(Float64(y - x) / Float64(-0.016666666666666666 * Float64(z - t))); elseif (t_1 <= -5e-131) tmp = fma(Float64(y / t), 60.0, Float64(120.0 * a)); elseif (t_1 <= 2e+52) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+70], N[(N[(y - x), $MachinePrecision] / N[(-0.016666666666666666 * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-131], N[(N[(y / t), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+52], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+70}:\\
\;\;\;\;\frac{y - x}{-0.016666666666666666 \cdot \left(z - t\right)}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-131}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 60, 120 \cdot a\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+52}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000007e70Initial program 99.7%
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
clear-num-revN/A
lower-/.f64N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-evalN/A
metadata-eval99.7
Applied rewrites99.7%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
distribute-rgt-inN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6499.8
Applied rewrites99.8%
Taylor expanded in a around 0
sub-negN/A
mul-1-negN/A
associate-*r/N/A
div-add-revN/A
mul-1-negN/A
sub-negN/A
lower-/.f64N/A
lower--.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f6483.7
Applied rewrites83.7%
if -1.00000000000000007e70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000004e-131Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6486.6
Applied rewrites86.6%
Taylor expanded in z around 0
Applied rewrites82.2%
if -5.0000000000000004e-131 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e52Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6481.0
Applied rewrites81.0%
if 2e52 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around inf
lower-*.f6412.3
Applied rewrites12.3%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6490.2
Applied rewrites90.2%
Final simplification83.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y x) 60.0) (- t z))))
(if (<= t_1 -1e+70)
t_1
(if (<= t_1 -5e-131)
(fma (/ y t) 60.0 (* 120.0 a))
(if (<= t_1 2e+52) (* 120.0 a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -1e+70) {
tmp = t_1;
} else if (t_1 <= -5e-131) {
tmp = fma((y / t), 60.0, (120.0 * a));
} else if (t_1 <= 2e+52) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_1 <= -1e+70) tmp = t_1; elseif (t_1 <= -5e-131) tmp = fma(Float64(y / t), 60.0, Float64(120.0 * a)); elseif (t_1 <= 2e+52) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+70], t$95$1, If[LessEqual[t$95$1, -5e-131], N[(N[(y / t), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+52], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-131}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 60, 120 \cdot a\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+52}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000007e70 or 2e52 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around inf
lower-*.f6415.3
Applied rewrites15.3%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6486.2
Applied rewrites86.2%
if -1.00000000000000007e70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000004e-131Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6486.6
Applied rewrites86.6%
Taylor expanded in z around 0
Applied rewrites82.2%
if -5.0000000000000004e-131 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e52Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6481.0
Applied rewrites81.0%
Final simplification83.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y x) (/ 60.0 (- t z)))) (t_2 (/ (* (- y x) 60.0) (- t z))))
(if (<= t_2 -1e+70)
t_1
(if (<= t_2 -5e-131)
(fma (/ y t) 60.0 (* 120.0 a))
(if (<= t_2 2e+52) (* 120.0 a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - x) * (60.0 / (t - z));
double t_2 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_2 <= -1e+70) {
tmp = t_1;
} else if (t_2 <= -5e-131) {
tmp = fma((y / t), 60.0, (120.0 * a));
} else if (t_2 <= 2e+52) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(y - x) * Float64(60.0 / Float64(t - z))) t_2 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_2 <= -1e+70) tmp = t_1; elseif (t_2 <= -5e-131) tmp = fma(Float64(y / t), 60.0, Float64(120.0 * a)); elseif (t_2 <= 2e+52) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+70], t$95$1, If[LessEqual[t$95$2, -5e-131], N[(N[(y / t), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+52], N[(120.0 * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{60}{t - z}\\
t_2 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-131}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 60, 120 \cdot a\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+52}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000007e70 or 2e52 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6486.2
Applied rewrites86.2%
if -1.00000000000000007e70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000004e-131Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6486.6
Applied rewrites86.6%
Taylor expanded in z around 0
Applied rewrites82.2%
if -5.0000000000000004e-131 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e52Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6481.0
Applied rewrites81.0%
Final simplification83.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y x) 60.0) (- t z))))
(if (<= t_1 -1e+70)
(/ (- y x) (* -0.016666666666666666 (- z t)))
(if (<= t_1 5e+72) (fma 120.0 a (* (/ y (- z t)) -60.0)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -1e+70) {
tmp = (y - x) / (-0.016666666666666666 * (z - t));
} else if (t_1 <= 5e+72) {
tmp = fma(120.0, a, ((y / (z - t)) * -60.0));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_1 <= -1e+70) tmp = Float64(Float64(y - x) / Float64(-0.016666666666666666 * Float64(z - t))); elseif (t_1 <= 5e+72) tmp = fma(120.0, a, Float64(Float64(y / Float64(z - t)) * -60.0)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+70], N[(N[(y - x), $MachinePrecision] / N[(-0.016666666666666666 * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+72], N[(120.0 * a + N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+70}:\\
\;\;\;\;\frac{y - x}{-0.016666666666666666 \cdot \left(z - t\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(120, a, \frac{y}{z - t} \cdot -60\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000007e70Initial program 99.7%
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
clear-num-revN/A
lower-/.f64N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-evalN/A
metadata-eval99.7
Applied rewrites99.7%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negN/A
distribute-rgt-inN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f6499.8
Applied rewrites99.8%
Taylor expanded in a around 0
sub-negN/A
mul-1-negN/A
associate-*r/N/A
div-add-revN/A
mul-1-negN/A
sub-negN/A
lower-/.f64N/A
lower--.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
distribute-lft-out--N/A
lower-*.f64N/A
lower--.f6483.7
Applied rewrites83.7%
if -1.00000000000000007e70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999992e72Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6488.0
Applied rewrites88.0%
if 4.99999999999999992e72 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around inf
lower-*.f6410.3
Applied rewrites10.3%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6492.1
Applied rewrites92.1%
Final simplification87.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y x) 60.0) (- t z))))
(if (<= t_1 -1e+70)
(* (/ x (- z t)) 60.0)
(if (<= t_1 5e+72) (* 120.0 a) (* (/ y (- z t)) -60.0)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -1e+70) {
tmp = (x / (z - t)) * 60.0;
} else if (t_1 <= 5e+72) {
tmp = 120.0 * a;
} else {
tmp = (y / (z - t)) * -60.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((y - x) * 60.0d0) / (t - z)
if (t_1 <= (-1d+70)) then
tmp = (x / (z - t)) * 60.0d0
else if (t_1 <= 5d+72) then
tmp = 120.0d0 * a
else
tmp = (y / (z - t)) * (-60.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -1e+70) {
tmp = (x / (z - t)) * 60.0;
} else if (t_1 <= 5e+72) {
tmp = 120.0 * a;
} else {
tmp = (y / (z - t)) * -60.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - x) * 60.0) / (t - z) tmp = 0 if t_1 <= -1e+70: tmp = (x / (z - t)) * 60.0 elif t_1 <= 5e+72: tmp = 120.0 * a else: tmp = (y / (z - t)) * -60.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_1 <= -1e+70) tmp = Float64(Float64(x / Float64(z - t)) * 60.0); elseif (t_1 <= 5e+72) tmp = Float64(120.0 * a); else tmp = Float64(Float64(y / Float64(z - t)) * -60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y - x) * 60.0) / (t - z); tmp = 0.0; if (t_1 <= -1e+70) tmp = (x / (z - t)) * 60.0; elseif (t_1 <= 5e+72) tmp = 120.0 * a; else tmp = (y / (z - t)) * -60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+70], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision], If[LessEqual[t$95$1, 5e+72], N[(120.0 * a), $MachinePrecision], N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+70}:\\
\;\;\;\;\frac{x}{z - t} \cdot 60\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+72}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z - t} \cdot -60\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000007e70Initial program 99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6449.1
Applied rewrites49.1%
if -1.00000000000000007e70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999992e72Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6477.0
Applied rewrites77.0%
if 4.99999999999999992e72 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around inf
lower-*.f6410.3
Applied rewrites10.3%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6492.1
Applied rewrites92.1%
Taylor expanded in x around 0
Applied rewrites46.9%
Final simplification65.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y x) 60.0) (- t z))))
(if (<= t_1 -1e+70)
(* (/ 60.0 (- z t)) x)
(if (<= t_1 5e+72) (* 120.0 a) (* (/ y (- z t)) -60.0)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -1e+70) {
tmp = (60.0 / (z - t)) * x;
} else if (t_1 <= 5e+72) {
tmp = 120.0 * a;
} else {
tmp = (y / (z - t)) * -60.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((y - x) * 60.0d0) / (t - z)
if (t_1 <= (-1d+70)) then
tmp = (60.0d0 / (z - t)) * x
else if (t_1 <= 5d+72) then
tmp = 120.0d0 * a
else
tmp = (y / (z - t)) * (-60.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -1e+70) {
tmp = (60.0 / (z - t)) * x;
} else if (t_1 <= 5e+72) {
tmp = 120.0 * a;
} else {
tmp = (y / (z - t)) * -60.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - x) * 60.0) / (t - z) tmp = 0 if t_1 <= -1e+70: tmp = (60.0 / (z - t)) * x elif t_1 <= 5e+72: tmp = 120.0 * a else: tmp = (y / (z - t)) * -60.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_1 <= -1e+70) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (t_1 <= 5e+72) tmp = Float64(120.0 * a); else tmp = Float64(Float64(y / Float64(z - t)) * -60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y - x) * 60.0) / (t - z); tmp = 0.0; if (t_1 <= -1e+70) tmp = (60.0 / (z - t)) * x; elseif (t_1 <= 5e+72) tmp = 120.0 * a; else tmp = (y / (z - t)) * -60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+70], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 5e+72], N[(120.0 * a), $MachinePrecision], N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+70}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+72}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z - t} \cdot -60\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000007e70Initial program 99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6449.1
Applied rewrites49.1%
Applied rewrites49.0%
if -1.00000000000000007e70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999992e72Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6477.0
Applied rewrites77.0%
if 4.99999999999999992e72 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around inf
lower-*.f6410.3
Applied rewrites10.3%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6492.1
Applied rewrites92.1%
Taylor expanded in x around 0
Applied rewrites46.9%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ y (- z t)) -60.0)) (t_2 (/ (* (- y x) 60.0) (- t z)))) (if (<= t_2 -1e+108) t_1 (if (<= t_2 5e+72) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / (z - t)) * -60.0;
double t_2 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_2 <= -1e+108) {
tmp = t_1;
} else if (t_2 <= 5e+72) {
tmp = 120.0 * a;
} 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 / (z - t)) * (-60.0d0)
t_2 = ((y - x) * 60.0d0) / (t - z)
if (t_2 <= (-1d+108)) then
tmp = t_1
else if (t_2 <= 5d+72) then
tmp = 120.0d0 * a
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 / (z - t)) * -60.0;
double t_2 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_2 <= -1e+108) {
tmp = t_1;
} else if (t_2 <= 5e+72) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / (z - t)) * -60.0 t_2 = ((y - x) * 60.0) / (t - z) tmp = 0 if t_2 <= -1e+108: tmp = t_1 elif t_2 <= 5e+72: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / Float64(z - t)) * -60.0) t_2 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_2 <= -1e+108) tmp = t_1; elseif (t_2 <= 5e+72) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / (z - t)) * -60.0; t_2 = ((y - x) * 60.0) / (t - z); tmp = 0.0; if (t_2 <= -1e+108) tmp = t_1; elseif (t_2 <= 5e+72) tmp = 120.0 * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+108], t$95$1, If[LessEqual[t$95$2, 5e+72], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z - t} \cdot -60\\
t_2 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+72}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1e108 or 4.99999999999999992e72 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in z around inf
lower-*.f6411.9
Applied rewrites11.9%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6489.5
Applied rewrites89.5%
Taylor expanded in x around 0
Applied rewrites45.6%
if -1e108 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999992e72Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6474.4
Applied rewrites74.4%
Final simplification64.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y x) 60.0) (- t z))))
(if (<= t_1 -4e+189)
(/ (* -60.0 y) (- t))
(if (<= t_1 5e+72) (* 120.0 a) (* (/ x (- t)) 60.0)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -4e+189) {
tmp = (-60.0 * y) / -t;
} else if (t_1 <= 5e+72) {
tmp = 120.0 * a;
} else {
tmp = (x / -t) * 60.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((y - x) * 60.0d0) / (t - z)
if (t_1 <= (-4d+189)) then
tmp = ((-60.0d0) * y) / -t
else if (t_1 <= 5d+72) then
tmp = 120.0d0 * a
else
tmp = (x / -t) * 60.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_1 <= -4e+189) {
tmp = (-60.0 * y) / -t;
} else if (t_1 <= 5e+72) {
tmp = 120.0 * a;
} else {
tmp = (x / -t) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y - x) * 60.0) / (t - z) tmp = 0 if t_1 <= -4e+189: tmp = (-60.0 * y) / -t elif t_1 <= 5e+72: tmp = 120.0 * a else: tmp = (x / -t) * 60.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_1 <= -4e+189) tmp = Float64(Float64(-60.0 * y) / Float64(-t)); elseif (t_1 <= 5e+72) tmp = Float64(120.0 * a); else tmp = Float64(Float64(x / Float64(-t)) * 60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y - x) * 60.0) / (t - z); tmp = 0.0; if (t_1 <= -4e+189) tmp = (-60.0 * y) / -t; elseif (t_1 <= 5e+72) tmp = 120.0 * a; else tmp = (x / -t) * 60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+189], N[(N[(-60.0 * y), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[t$95$1, 5e+72], N[(120.0 * a), $MachinePrecision], N[(N[(x / (-t)), $MachinePrecision] * 60.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+189}:\\
\;\;\;\;\frac{-60 \cdot y}{-t}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+72}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-t} \cdot 60\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.0000000000000001e189Initial program 99.7%
Taylor expanded in z around inf
lower-*.f644.6
Applied rewrites4.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6496.6
Applied rewrites96.6%
Taylor expanded in x around 0
Applied rewrites49.5%
Taylor expanded in z around 0
Applied rewrites38.7%
if -4.0000000000000001e189 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999992e72Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6469.3
Applied rewrites69.3%
if 4.99999999999999992e72 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6445.9
Applied rewrites45.9%
Taylor expanded in z around 0
Applied rewrites44.0%
Final simplification61.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ x (- t)) 60.0)) (t_2 (/ (* (- y x) 60.0) (- t z)))) (if (<= t_2 -2e+173) t_1 (if (<= t_2 5e+72) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x / -t) * 60.0;
double t_2 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_2 <= -2e+173) {
tmp = t_1;
} else if (t_2 <= 5e+72) {
tmp = 120.0 * a;
} 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 / -t) * 60.0d0
t_2 = ((y - x) * 60.0d0) / (t - z)
if (t_2 <= (-2d+173)) then
tmp = t_1
else if (t_2 <= 5d+72) then
tmp = 120.0d0 * a
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 / -t) * 60.0;
double t_2 = ((y - x) * 60.0) / (t - z);
double tmp;
if (t_2 <= -2e+173) {
tmp = t_1;
} else if (t_2 <= 5e+72) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x / -t) * 60.0 t_2 = ((y - x) * 60.0) / (t - z) tmp = 0 if t_2 <= -2e+173: tmp = t_1 elif t_2 <= 5e+72: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x / Float64(-t)) * 60.0) t_2 = Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) tmp = 0.0 if (t_2 <= -2e+173) tmp = t_1; elseif (t_2 <= 5e+72) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x / -t) * 60.0; t_2 = ((y - x) * 60.0) / (t - z); tmp = 0.0; if (t_2 <= -2e+173) tmp = t_1; elseif (t_2 <= 5e+72) tmp = 120.0 * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / (-t)), $MachinePrecision] * 60.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+173], t$95$1, If[LessEqual[t$95$2, 5e+72], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{-t} \cdot 60\\
t_2 := \frac{\left(y - x\right) \cdot 60}{t - z}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+173}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+72}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e173 or 4.99999999999999992e72 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6449.9
Applied rewrites49.9%
Taylor expanded in z around 0
Applied rewrites38.7%
if -2e173 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999992e72Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6471.0
Applied rewrites71.0%
Final simplification61.3%
(FPCore (x y z t a) :precision binary64 (if (<= (/ (* (- y x) 60.0) (- t z)) -5e+165) (* (/ x z) 60.0) (* 120.0 a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((((y - x) * 60.0) / (t - z)) <= -5e+165) {
tmp = (x / z) * 60.0;
} else {
tmp = 120.0 * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((((y - x) * 60.0d0) / (t - z)) <= (-5d+165)) then
tmp = (x / z) * 60.0d0
else
tmp = 120.0d0 * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((((y - x) * 60.0) / (t - z)) <= -5e+165) {
tmp = (x / z) * 60.0;
} else {
tmp = 120.0 * a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (((y - x) * 60.0) / (t - z)) <= -5e+165: tmp = (x / z) * 60.0 else: tmp = 120.0 * a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(Float64(y - x) * 60.0) / Float64(t - z)) <= -5e+165) tmp = Float64(Float64(x / z) * 60.0); else tmp = Float64(120.0 * a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((((y - x) * 60.0) / (t - z)) <= -5e+165) tmp = (x / z) * 60.0; else tmp = 120.0 * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(N[(y - x), $MachinePrecision] * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], -5e+165], N[(N[(x / z), $MachinePrecision] * 60.0), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(y - x\right) \cdot 60}{t - z} \leq -5 \cdot 10^{+165}:\\
\;\;\;\;\frac{x}{z} \cdot 60\\
\mathbf{else}:\\
\;\;\;\;120 \cdot a\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.9999999999999997e165Initial program 99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6453.6
Applied rewrites53.6%
Taylor expanded in z around inf
Applied rewrites34.2%
if -4.9999999999999997e165 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6460.4
Applied rewrites60.4%
Final simplification56.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma 120.0 a (* (/ y (- z t)) -60.0))))
(if (<= y -2.4e+179)
t_1
(if (<= y 1.1e+63) (+ (/ (* x 60.0) (- z t)) (* 120.0 a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(120.0, a, ((y / (z - t)) * -60.0));
double tmp;
if (y <= -2.4e+179) {
tmp = t_1;
} else if (y <= 1.1e+63) {
tmp = ((x * 60.0) / (z - t)) + (120.0 * a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(120.0, a, Float64(Float64(y / Float64(z - t)) * -60.0)) tmp = 0.0 if (y <= -2.4e+179) tmp = t_1; elseif (y <= 1.1e+63) tmp = Float64(Float64(Float64(x * 60.0) / Float64(z - t)) + Float64(120.0 * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(120.0 * a + N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+179], t$95$1, If[LessEqual[y, 1.1e+63], N[(N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(120, a, \frac{y}{z - t} \cdot -60\right)\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+63}:\\
\;\;\;\;\frac{x \cdot 60}{z - t} + 120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.40000000000000013e179 or 1.0999999999999999e63 < y Initial program 99.8%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6490.2
Applied rewrites90.2%
if -2.40000000000000013e179 < y < 1.0999999999999999e63Initial program 99.8%
Taylor expanded in x around inf
lower-*.f6492.4
Applied rewrites92.4%
Final simplification91.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -2e+210) (* (/ x (- z t)) 60.0) (if (<= x 3.8e+207) (fma (/ y t) 60.0 (* 120.0 a)) (* (/ 60.0 (- z t)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2e+210) {
tmp = (x / (z - t)) * 60.0;
} else if (x <= 3.8e+207) {
tmp = fma((y / t), 60.0, (120.0 * a));
} else {
tmp = (60.0 / (z - t)) * x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2e+210) tmp = Float64(Float64(x / Float64(z - t)) * 60.0); elseif (x <= 3.8e+207) tmp = fma(Float64(y / t), 60.0, Float64(120.0 * a)); else tmp = Float64(Float64(60.0 / Float64(z - t)) * x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2e+210], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision], If[LessEqual[x, 3.8e+207], N[(N[(y / t), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+210}:\\
\;\;\;\;\frac{x}{z - t} \cdot 60\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+207}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, 60, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\end{array}
\end{array}
if x < -1.99999999999999985e210Initial program 99.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6484.1
Applied rewrites84.1%
if -1.99999999999999985e210 < x < 3.79999999999999986e207Initial program 99.8%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6484.8
Applied rewrites84.8%
Taylor expanded in z around 0
Applied rewrites66.0%
if 3.79999999999999986e207 < x Initial program 99.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6465.8
Applied rewrites65.8%
Applied rewrites65.8%
Final simplification67.6%
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (- y x) (/ -60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((y - x) * (-60.0 / (z - t))));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(y - x) * Float64(-60.0 / Float64(z - t)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(y - x), $MachinePrecision] * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \left(y - x\right) \cdot \frac{-60}{z - t}\right)
\end{array}
Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-/.f64N/A
clear-numN/A
lift-*.f64N/A
associate-/r*N/A
associate-/r/N/A
clear-numN/A
lower-*.f64N/A
frac-2negN/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%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (* 120.0 a))
double code(double x, double y, double z, double t, double a) {
return 120.0 * a;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 120.0d0 * a
end function
public static double code(double x, double y, double z, double t, double a) {
return 120.0 * a;
}
def code(x, y, z, t, a): return 120.0 * a
function code(x, y, z, t, a) return Float64(120.0 * a) end
function tmp = code(x, y, z, t, a) tmp = 120.0 * a; end
code[x_, y_, z_, t_, a_] := N[(120.0 * a), $MachinePrecision]
\begin{array}{l}
\\
120 \cdot a
\end{array}
Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6452.2
Applied rewrites52.2%
(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 2024298
(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)))