
(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 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(x - y) * Float64(-60.0 / Float64(t - z)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{-60}{t - z}\right)
\end{array}
Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.4
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/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 (let* ((t_1 (* (/ 60.0 z) (- x y))) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -5e+192) t_1 (if (<= t_2 2e+70) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 / z) * (x - y);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+192) {
tmp = t_1;
} else if (t_2 <= 2e+70) {
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 = (60.0d0 / z) * (x - y)
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-5d+192)) then
tmp = t_1
else if (t_2 <= 2d+70) 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 = (60.0 / z) * (x - y);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+192) {
tmp = t_1;
} else if (t_2 <= 2e+70) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 / z) * (x - y) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -5e+192: tmp = t_1 elif t_2 <= 2e+70: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 / z) * Float64(x - y)) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -5e+192) tmp = t_1; elseif (t_2 <= 2e+70) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 / z) * (x - y); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -5e+192) tmp = t_1; elseif (t_2 <= 2e+70) 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[(60.0 / z), $MachinePrecision] * N[(x - y), $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+192], t$95$1, If[LessEqual[t$95$2, 2e+70], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z} \cdot \left(x - y\right)\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+70}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.00000000000000033e192 or 2.00000000000000015e70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 98.4%
Taylor expanded in a around 0
associate-*r/N/A
*-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--.f6488.4
Applied rewrites88.4%
Taylor expanded in t around 0
Applied rewrites59.1%
if -5.00000000000000033e192 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.00000000000000015e70Initial program 99.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6461.9
Applied rewrites61.9%
Final simplification61.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+265)
(* (/ y z) -60.0)
(if (<= t_1 4e+218) (* 120.0 a) (* (/ x z) 60.0)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+265) {
tmp = (y / z) * -60.0;
} else if (t_1 <= 4e+218) {
tmp = 120.0 * a;
} else {
tmp = (x / z) * 60.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d+265)) then
tmp = (y / z) * (-60.0d0)
else if (t_1 <= 4d+218) then
tmp = 120.0d0 * a
else
tmp = (x / z) * 60.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+265) {
tmp = (y / z) * -60.0;
} else if (t_1 <= 4e+218) {
tmp = 120.0 * a;
} else {
tmp = (x / z) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+265: tmp = (y / z) * -60.0 elif t_1 <= 4e+218: tmp = 120.0 * a else: tmp = (x / z) * 60.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+265) tmp = Float64(Float64(y / z) * -60.0); elseif (t_1 <= 4e+218) tmp = Float64(120.0 * a); else tmp = Float64(Float64(x / z) * 60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e+265) tmp = (y / z) * -60.0; elseif (t_1 <= 4e+218) tmp = 120.0 * a; else tmp = (x / z) * 60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+265], N[(N[(y / z), $MachinePrecision] * -60.0), $MachinePrecision], If[LessEqual[t$95$1, 4e+218], N[(120.0 * a), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * 60.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+265}:\\
\;\;\;\;\frac{y}{z} \cdot -60\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+218}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot 60\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000002e265Initial program 99.9%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.0
Applied rewrites67.0%
Taylor expanded in y around inf
Applied rewrites51.0%
if -5.0000000000000002e265 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.00000000000000033e218Initial program 99.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6457.7
Applied rewrites57.7%
if 4.00000000000000033e218 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 95.6%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.8
Applied rewrites67.8%
Taylor expanded in x around inf
Applied rewrites48.6%
Final simplification56.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ x z) 60.0)) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -5e+192) t_1 (if (<= t_2 4e+218) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x / z) * 60.0;
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+192) {
tmp = t_1;
} else if (t_2 <= 4e+218) {
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 / z) * 60.0d0
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-5d+192)) then
tmp = t_1
else if (t_2 <= 4d+218) 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 / z) * 60.0;
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+192) {
tmp = t_1;
} else if (t_2 <= 4e+218) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x / z) * 60.0 t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -5e+192: tmp = t_1 elif t_2 <= 4e+218: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x / z) * 60.0) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -5e+192) tmp = t_1; elseif (t_2 <= 4e+218) 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 / z) * 60.0; t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -5e+192) tmp = t_1; elseif (t_2 <= 4e+218) 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 / z), $MachinePrecision] * 60.0), $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+192], t$95$1, If[LessEqual[t$95$2, 4e+218], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z} \cdot 60\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+218}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.00000000000000033e192 or 4.00000000000000033e218 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 97.6%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6465.1
Applied rewrites65.1%
Taylor expanded in x around inf
Applied rewrites44.1%
if -5.00000000000000033e192 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.00000000000000033e218Initial program 99.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6458.3
Applied rewrites58.3%
Final simplification55.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ 60.0 z) x)) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -5e+192) t_1 (if (<= t_2 4e+218) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 / z) * x;
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+192) {
tmp = t_1;
} else if (t_2 <= 4e+218) {
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 = (60.0d0 / z) * x
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-5d+192)) then
tmp = t_1
else if (t_2 <= 4d+218) 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 = (60.0 / z) * x;
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+192) {
tmp = t_1;
} else if (t_2 <= 4e+218) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 / z) * x t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -5e+192: tmp = t_1 elif t_2 <= 4e+218: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 / z) * x) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -5e+192) tmp = t_1; elseif (t_2 <= 4e+218) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 / z) * x; t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -5e+192) tmp = t_1; elseif (t_2 <= 4e+218) 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[(60.0 / z), $MachinePrecision] * x), $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+192], t$95$1, If[LessEqual[t$95$2, 4e+218], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z} \cdot x\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+218}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.00000000000000033e192 or 4.00000000000000033e218 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 97.6%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6465.1
Applied rewrites65.1%
Taylor expanded in x around inf
Applied rewrites44.1%
Applied rewrites44.1%
if -5.00000000000000033e192 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.00000000000000033e218Initial program 99.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6458.3
Applied rewrites58.3%
Final simplification55.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+251)
(* (/ y t) 60.0)
(if (<= t_1 5e+198) (* 120.0 a) (* (/ x t) -60.0)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+251) {
tmp = (y / t) * 60.0;
} else if (t_1 <= 5e+198) {
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 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d+251)) then
tmp = (y / t) * 60.0d0
else if (t_1 <= 5d+198) 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 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+251) {
tmp = (y / t) * 60.0;
} else if (t_1 <= 5e+198) {
tmp = 120.0 * a;
} else {
tmp = (x / t) * -60.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+251: tmp = (y / t) * 60.0 elif t_1 <= 5e+198: tmp = 120.0 * a else: tmp = (x / t) * -60.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+251) tmp = Float64(Float64(y / t) * 60.0); elseif (t_1 <= 5e+198) tmp = Float64(120.0 * a); else tmp = Float64(Float64(x / t) * -60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e+251) tmp = (y / t) * 60.0; elseif (t_1 <= 5e+198) 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[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+251], N[(N[(y / t), $MachinePrecision] * 60.0), $MachinePrecision], If[LessEqual[t$95$1, 5e+198], N[(120.0 * a), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * -60.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+251}:\\
\;\;\;\;\frac{y}{t} \cdot 60\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+198}:\\
\;\;\;\;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)) < -5.0000000000000005e251Initial program 99.8%
Taylor expanded in y around inf
associate-*r/N/A
associate-*l/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6459.9
Applied rewrites59.9%
Taylor expanded in t around inf
Applied rewrites39.2%
if -5.0000000000000005e251 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 5.00000000000000049e198Initial program 99.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6458.5
Applied rewrites58.5%
if 5.00000000000000049e198 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 95.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6456.4
Applied rewrites56.4%
Taylor expanded in t around inf
Applied rewrites41.8%
Final simplification55.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+251)
(* (/ y t) 60.0)
(if (<= t_1 2e+200) (* 120.0 a) (/ (* 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+251) {
tmp = (y / t) * 60.0;
} else if (t_1 <= 2e+200) {
tmp = 120.0 * a;
} 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+251)) then
tmp = (y / t) * 60.0d0
else if (t_1 <= 2d+200) then
tmp = 120.0d0 * a
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+251) {
tmp = (y / t) * 60.0;
} else if (t_1 <= 2e+200) {
tmp = 120.0 * a;
} 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+251: tmp = (y / t) * 60.0 elif t_1 <= 2e+200: tmp = 120.0 * a 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+251) tmp = Float64(Float64(y / t) * 60.0); elseif (t_1 <= 2e+200) tmp = Float64(120.0 * a); 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+251) tmp = (y / t) * 60.0; elseif (t_1 <= 2e+200) tmp = 120.0 * a; 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+251], N[(N[(y / t), $MachinePrecision] * 60.0), $MachinePrecision], If[LessEqual[t$95$1, 2e+200], N[(120.0 * a), $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^{+251}:\\
\;\;\;\;\frac{y}{t} \cdot 60\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+200}:\\
\;\;\;\;120 \cdot a\\
\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.0000000000000005e251Initial program 99.8%
Taylor expanded in y around inf
associate-*r/N/A
associate-*l/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6459.9
Applied rewrites59.9%
Taylor expanded in t around inf
Applied rewrites39.2%
if -5.0000000000000005e251 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.9999999999999999e200Initial program 99.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6458.2
Applied rewrites58.2%
if 1.9999999999999999e200 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 95.7%
Taylor expanded in y around inf
associate-*r/N/A
associate-*l/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6446.7
Applied rewrites46.7%
Taylor expanded in t around inf
Applied rewrites34.2%
Applied rewrites34.2%
Final simplification54.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ y t) 60.0)) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -5e+251) t_1 (if (<= t_2 2e+200) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / t) * 60.0;
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+251) {
tmp = t_1;
} else if (t_2 <= 2e+200) {
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 / t) * 60.0d0
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-5d+251)) then
tmp = t_1
else if (t_2 <= 2d+200) 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 / t) * 60.0;
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e+251) {
tmp = t_1;
} else if (t_2 <= 2e+200) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / t) * 60.0 t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -5e+251: tmp = t_1 elif t_2 <= 2e+200: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / t) * 60.0) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -5e+251) tmp = t_1; elseif (t_2 <= 2e+200) 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 / t) * 60.0; t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -5e+251) tmp = t_1; elseif (t_2 <= 2e+200) 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 / t), $MachinePrecision] * 60.0), $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+251], t$95$1, If[LessEqual[t$95$2, 2e+200], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{t} \cdot 60\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+251}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+200}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000005e251 or 1.9999999999999999e200 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 97.6%
Taylor expanded in y around inf
associate-*r/N/A
associate-*l/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6452.5
Applied rewrites52.5%
Taylor expanded in t around inf
Applied rewrites36.4%
if -5.0000000000000005e251 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.9999999999999999e200Initial program 99.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6458.2
Applied rewrites58.2%
Final simplification54.5%
(FPCore (x y z t a)
:precision binary64
(if (<= (* 120.0 a) -0.04)
(fma a 120.0 (* (/ x z) 60.0))
(if (<= (* 120.0 a) 5e+112)
(/ (- x y) (* 0.016666666666666666 (- z t)))
(* 120.0 a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((120.0 * a) <= -0.04) {
tmp = fma(a, 120.0, ((x / z) * 60.0));
} else if ((120.0 * a) <= 5e+112) {
tmp = (x - y) / (0.016666666666666666 * (z - t));
} else {
tmp = 120.0 * a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (Float64(120.0 * a) <= -0.04) tmp = fma(a, 120.0, Float64(Float64(x / z) * 60.0)); elseif (Float64(120.0 * a) <= 5e+112) tmp = Float64(Float64(x - y) / Float64(0.016666666666666666 * Float64(z - t))); else tmp = Float64(120.0 * a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(120.0 * a), $MachinePrecision], -0.04], N[(a * 120.0 + N[(N[(x / z), $MachinePrecision] * 60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(120.0 * a), $MachinePrecision], 5e+112], N[(N[(x - y), $MachinePrecision] / N[(0.016666666666666666 * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;120 \cdot a \leq -0.04:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{x}{z} \cdot 60\right)\\
\mathbf{elif}\;120 \cdot a \leq 5 \cdot 10^{+112}:\\
\;\;\;\;\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;120 \cdot a\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -0.0400000000000000008Initial program 98.7%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6477.5
Applied rewrites77.5%
Taylor expanded in y around 0
Applied rewrites79.3%
Applied rewrites79.3%
if -0.0400000000000000008 < (*.f64 a #s(literal 120 binary64)) < 5e112Initial 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--.f6473.9
Applied rewrites73.9%
Applied rewrites73.9%
if 5e112 < (*.f64 a #s(literal 120 binary64)) Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6491.1
Applied rewrites91.1%
Final simplification77.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* 120.0 a) -6800000000.0)
(* 120.0 a)
(if (<= (* 120.0 a) 3e+112)
(/ (- x y) (* 0.016666666666666666 (- z t)))
(* 120.0 a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((120.0 * a) <= -6800000000.0) {
tmp = 120.0 * a;
} else if ((120.0 * a) <= 3e+112) {
tmp = (x - y) / (0.016666666666666666 * (z - t));
} else {
tmp = 120.0 * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((120.0d0 * a) <= (-6800000000.0d0)) then
tmp = 120.0d0 * a
else if ((120.0d0 * a) <= 3d+112) then
tmp = (x - y) / (0.016666666666666666d0 * (z - t))
else
tmp = 120.0d0 * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((120.0 * a) <= -6800000000.0) {
tmp = 120.0 * a;
} else if ((120.0 * a) <= 3e+112) {
tmp = (x - y) / (0.016666666666666666 * (z - t));
} else {
tmp = 120.0 * a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (120.0 * a) <= -6800000000.0: tmp = 120.0 * a elif (120.0 * a) <= 3e+112: tmp = (x - y) / (0.016666666666666666 * (z - t)) else: tmp = 120.0 * a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(120.0 * a) <= -6800000000.0) tmp = Float64(120.0 * a); elseif (Float64(120.0 * a) <= 3e+112) tmp = Float64(Float64(x - y) / Float64(0.016666666666666666 * Float64(z - t))); else tmp = Float64(120.0 * a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((120.0 * a) <= -6800000000.0) tmp = 120.0 * a; elseif ((120.0 * a) <= 3e+112) tmp = (x - y) / (0.016666666666666666 * (z - t)); else tmp = 120.0 * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(120.0 * a), $MachinePrecision], -6800000000.0], N[(120.0 * a), $MachinePrecision], If[LessEqual[N[(120.0 * a), $MachinePrecision], 3e+112], N[(N[(x - y), $MachinePrecision] / N[(0.016666666666666666 * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;120 \cdot a \leq -6800000000:\\
\;\;\;\;120 \cdot a\\
\mathbf{elif}\;120 \cdot a \leq 3 \cdot 10^{+112}:\\
\;\;\;\;\frac{x - y}{0.016666666666666666 \cdot \left(z - t\right)}\\
\mathbf{else}:\\
\;\;\;\;120 \cdot a\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -6.8e9 or 2.99999999999999979e112 < (*.f64 a #s(literal 120 binary64)) Initial program 99.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6476.9
Applied rewrites76.9%
if -6.8e9 < (*.f64 a #s(literal 120 binary64)) < 2.99999999999999979e112Initial 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--.f6473.1
Applied rewrites73.1%
Applied rewrites73.1%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (if (<= (* 120.0 a) -6800000000.0) (* 120.0 a) (if (<= (* 120.0 a) 3e+112) (* (/ 60.0 (- z t)) (- x y)) (* 120.0 a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((120.0 * a) <= -6800000000.0) {
tmp = 120.0 * a;
} else if ((120.0 * a) <= 3e+112) {
tmp = (60.0 / (z - t)) * (x - y);
} 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 ((120.0d0 * a) <= (-6800000000.0d0)) then
tmp = 120.0d0 * a
else if ((120.0d0 * a) <= 3d+112) then
tmp = (60.0d0 / (z - t)) * (x - y)
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 ((120.0 * a) <= -6800000000.0) {
tmp = 120.0 * a;
} else if ((120.0 * a) <= 3e+112) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = 120.0 * a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (120.0 * a) <= -6800000000.0: tmp = 120.0 * a elif (120.0 * a) <= 3e+112: tmp = (60.0 / (z - t)) * (x - y) else: tmp = 120.0 * a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(120.0 * a) <= -6800000000.0) tmp = Float64(120.0 * a); elseif (Float64(120.0 * a) <= 3e+112) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(120.0 * a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((120.0 * a) <= -6800000000.0) tmp = 120.0 * a; elseif ((120.0 * a) <= 3e+112) tmp = (60.0 / (z - t)) * (x - y); else tmp = 120.0 * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(120.0 * a), $MachinePrecision], -6800000000.0], N[(120.0 * a), $MachinePrecision], If[LessEqual[N[(120.0 * a), $MachinePrecision], 3e+112], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;120 \cdot a \leq -6800000000:\\
\;\;\;\;120 \cdot a\\
\mathbf{elif}\;120 \cdot a \leq 3 \cdot 10^{+112}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;120 \cdot a\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -6.8e9 or 2.99999999999999979e112 < (*.f64 a #s(literal 120 binary64)) Initial program 99.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6476.9
Applied rewrites76.9%
if -6.8e9 < (*.f64 a #s(literal 120 binary64)) < 2.99999999999999979e112Initial 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--.f6473.1
Applied rewrites73.1%
Final simplification74.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x y) t)))
(if (<= t -1.05e+138)
(fma t_1 -60.0 (* 120.0 a))
(if (<= t -1.35e-46)
(+ (/ (* y -60.0) (- z t)) (* 120.0 a))
(if (<= t 2.1e+58)
(fma a 120.0 (* (/ 60.0 z) (- x y)))
(fma a 120.0 (* t_1 -60.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) / t;
double tmp;
if (t <= -1.05e+138) {
tmp = fma(t_1, -60.0, (120.0 * a));
} else if (t <= -1.35e-46) {
tmp = ((y * -60.0) / (z - t)) + (120.0 * a);
} else if (t <= 2.1e+58) {
tmp = fma(a, 120.0, ((60.0 / z) * (x - y)));
} else {
tmp = fma(a, 120.0, (t_1 * -60.0));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) / t) tmp = 0.0 if (t <= -1.05e+138) tmp = fma(t_1, -60.0, Float64(120.0 * a)); elseif (t <= -1.35e-46) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(120.0 * a)); elseif (t <= 2.1e+58) tmp = fma(a, 120.0, Float64(Float64(60.0 / z) * Float64(x - y))); else tmp = fma(a, 120.0, Float64(t_1 * -60.0)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -1.05e+138], N[(t$95$1 * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-46], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+58], N[(a * 120.0 + N[(N[(60.0 / z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0 + N[(t$95$1 * -60.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{t}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+138}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, -60, 120 \cdot a\right)\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-46}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + 120 \cdot a\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{60}{z} \cdot \left(x - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, t\_1 \cdot -60\right)\\
\end{array}
\end{array}
if t < -1.05000000000000003e138Initial program 99.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6499.9
Applied rewrites99.9%
if -1.05000000000000003e138 < t < -1.35e-46Initial program 99.9%
Taylor expanded in y around inf
lower-*.f6487.5
Applied rewrites87.5%
if -1.35e-46 < t < 2.10000000000000012e58Initial program 99.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.1
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
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%
Taylor expanded in t around 0
lower-/.f6484.0
Applied rewrites84.0%
if 2.10000000000000012e58 < t Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/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%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6494.2
Applied rewrites94.2%
Final simplification89.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x y) t)))
(if (<= t -1.05e+138)
(fma t_1 -60.0 (* 120.0 a))
(if (<= t -1.35e-46)
(fma (/ y (- z t)) -60.0 (* 120.0 a))
(if (<= t 2.1e+58)
(fma a 120.0 (* (/ 60.0 z) (- x y)))
(fma a 120.0 (* t_1 -60.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) / t;
double tmp;
if (t <= -1.05e+138) {
tmp = fma(t_1, -60.0, (120.0 * a));
} else if (t <= -1.35e-46) {
tmp = fma((y / (z - t)), -60.0, (120.0 * a));
} else if (t <= 2.1e+58) {
tmp = fma(a, 120.0, ((60.0 / z) * (x - y)));
} else {
tmp = fma(a, 120.0, (t_1 * -60.0));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) / t) tmp = 0.0 if (t <= -1.05e+138) tmp = fma(t_1, -60.0, Float64(120.0 * a)); elseif (t <= -1.35e-46) tmp = fma(Float64(y / Float64(z - t)), -60.0, Float64(120.0 * a)); elseif (t <= 2.1e+58) tmp = fma(a, 120.0, Float64(Float64(60.0 / z) * Float64(x - y))); else tmp = fma(a, 120.0, Float64(t_1 * -60.0)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -1.05e+138], N[(t$95$1 * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-46], N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+58], N[(a * 120.0 + N[(N[(60.0 / z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0 + N[(t$95$1 * -60.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{t}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+138}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, -60, 120 \cdot a\right)\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-46}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z - t}, -60, 120 \cdot a\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{60}{z} \cdot \left(x - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, t\_1 \cdot -60\right)\\
\end{array}
\end{array}
if t < -1.05000000000000003e138Initial program 99.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6499.9
Applied rewrites99.9%
if -1.05000000000000003e138 < t < -1.35e-46Initial program 99.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6487.4
Applied rewrites87.4%
if -1.35e-46 < t < 2.10000000000000012e58Initial program 99.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.1
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
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%
Taylor expanded in t around 0
lower-/.f6484.0
Applied rewrites84.0%
if 2.10000000000000012e58 < t Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/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%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6494.2
Applied rewrites94.2%
Final simplification89.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x y) t)))
(if (<= t -1.05e+138)
(fma t_1 -60.0 (* 120.0 a))
(if (<= t -1.35e-46)
(fma (/ y (- z t)) -60.0 (* 120.0 a))
(if (<= t 2.1e+58)
(fma (/ (- x y) z) 60.0 (* 120.0 a))
(fma a 120.0 (* t_1 -60.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) / t;
double tmp;
if (t <= -1.05e+138) {
tmp = fma(t_1, -60.0, (120.0 * a));
} else if (t <= -1.35e-46) {
tmp = fma((y / (z - t)), -60.0, (120.0 * a));
} else if (t <= 2.1e+58) {
tmp = fma(((x - y) / z), 60.0, (120.0 * a));
} else {
tmp = fma(a, 120.0, (t_1 * -60.0));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) / t) tmp = 0.0 if (t <= -1.05e+138) tmp = fma(t_1, -60.0, Float64(120.0 * a)); elseif (t <= -1.35e-46) tmp = fma(Float64(y / Float64(z - t)), -60.0, Float64(120.0 * a)); elseif (t <= 2.1e+58) tmp = fma(Float64(Float64(x - y) / z), 60.0, Float64(120.0 * a)); else tmp = fma(a, 120.0, Float64(t_1 * -60.0)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -1.05e+138], N[(t$95$1 * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-46], N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+58], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(a * 120.0 + N[(t$95$1 * -60.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{t}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+138}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, -60, 120 \cdot a\right)\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-46}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z - t}, -60, 120 \cdot a\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, t\_1 \cdot -60\right)\\
\end{array}
\end{array}
if t < -1.05000000000000003e138Initial program 99.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6499.9
Applied rewrites99.9%
if -1.05000000000000003e138 < t < -1.35e-46Initial program 99.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6487.4
Applied rewrites87.4%
if -1.35e-46 < t < 2.10000000000000012e58Initial program 99.0%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6484.0
Applied rewrites84.0%
if 2.10000000000000012e58 < t Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/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%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6494.2
Applied rewrites94.2%
Final simplification89.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) -60.0 (* 120.0 a))))
(if (<= t -1.05e+138)
t_1
(if (<= t -1.35e-46)
(fma (/ y (- z t)) -60.0 (* 120.0 a))
(if (<= t 2.1e+58) (fma (/ (- x y) z) 60.0 (* 120.0 a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), -60.0, (120.0 * a));
double tmp;
if (t <= -1.05e+138) {
tmp = t_1;
} else if (t <= -1.35e-46) {
tmp = fma((y / (z - t)), -60.0, (120.0 * a));
} else if (t <= 2.1e+58) {
tmp = fma(((x - y) / z), 60.0, (120.0 * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), -60.0, Float64(120.0 * a)) tmp = 0.0 if (t <= -1.05e+138) tmp = t_1; elseif (t <= -1.35e-46) tmp = fma(Float64(y / Float64(z - t)), -60.0, Float64(120.0 * a)); elseif (t <= 2.1e+58) tmp = fma(Float64(Float64(x - y) / z), 60.0, 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[(x - y), $MachinePrecision] / t), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+138], t$95$1, If[LessEqual[t, -1.35e-46], N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+58], N[(N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] * 60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, -60, 120 \cdot a\right)\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-46}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z - t}, -60, 120 \cdot a\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{z}, 60, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.05000000000000003e138 or 2.10000000000000012e58 < t Initial program 99.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6496.4
Applied rewrites96.4%
if -1.05000000000000003e138 < t < -1.35e-46Initial program 99.9%
Taylor expanded in x around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6487.4
Applied rewrites87.4%
if -1.35e-46 < t < 2.10000000000000012e58Initial program 99.0%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6484.0
Applied rewrites84.0%
Final simplification89.0%
(FPCore (x y z t a)
:precision binary64
(if (<= x -3.6e+137)
(* (/ 60.0 (- z t)) (- x y))
(if (<= x 8.5e+63)
(fma (/ y (- z t)) -60.0 (* 120.0 a))
(/ (* 60.0 (- x y)) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.6e+137) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (x <= 8.5e+63) {
tmp = fma((y / (z - t)), -60.0, (120.0 * a));
} else {
tmp = (60.0 * (x - y)) / (z - t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.6e+137) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif (x <= 8.5e+63) tmp = fma(Float64(y / Float64(z - t)), -60.0, Float64(120.0 * a)); else tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.6e+137], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.5e+63], N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+137}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z - t}, -60, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\end{array}
\end{array}
if x < -3.6e137Initial program 97.2%
Taylor expanded in a around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6471.6
Applied rewrites71.6%
if -3.6e137 < x < 8.5000000000000004e63Initial program 99.8%
Taylor expanded in x around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6491.1
Applied rewrites91.1%
if 8.5000000000000004e63 < x Initial program 99.8%
Taylor expanded in a around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6473.2
Applied rewrites73.2%
Applied rewrites73.3%
Final simplification84.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ x (- z t)) 60.0)))
(if (<= x -2.9e+181)
t_1
(if (<= x 2.5e+86) (fma (/ y z) -60.0 (* 120.0 a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x / (z - t)) * 60.0;
double tmp;
if (x <= -2.9e+181) {
tmp = t_1;
} else if (x <= 2.5e+86) {
tmp = fma((y / z), -60.0, (120.0 * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x / Float64(z - t)) * 60.0) tmp = 0.0 if (x <= -2.9e+181) tmp = t_1; elseif (x <= 2.5e+86) tmp = fma(Float64(y / z), -60.0, Float64(120.0 * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]}, If[LessEqual[x, -2.9e+181], t$95$1, If[LessEqual[x, 2.5e+86], N[(N[(y / z), $MachinePrecision] * -60.0 + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{z - t} \cdot 60\\
\mathbf{if}\;x \leq -2.9 \cdot 10^{+181}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+86}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, -60, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.9e181 or 2.4999999999999999e86 < x Initial program 98.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6468.8
Applied rewrites68.8%
if -2.9e181 < x < 2.4999999999999999e86Initial program 99.8%
Taylor expanded in t around 0
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.7
Applied rewrites67.7%
Taylor expanded in x around 0
Applied rewrites62.6%
Final simplification64.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ 60.0 (- z t)) x))) (if (<= x -1.15e+138) t_1 (if (<= x 2.7e+78) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 / (z - t)) * x;
double tmp;
if (x <= -1.15e+138) {
tmp = t_1;
} else if (x <= 2.7e+78) {
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) :: tmp
t_1 = (60.0d0 / (z - t)) * x
if (x <= (-1.15d+138)) then
tmp = t_1
else if (x <= 2.7d+78) 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 = (60.0 / (z - t)) * x;
double tmp;
if (x <= -1.15e+138) {
tmp = t_1;
} else if (x <= 2.7e+78) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 / (z - t)) * x tmp = 0 if x <= -1.15e+138: tmp = t_1 elif x <= 2.7e+78: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 / Float64(z - t)) * x) tmp = 0.0 if (x <= -1.15e+138) tmp = t_1; elseif (x <= 2.7e+78) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 / (z - t)) * x; tmp = 0.0; if (x <= -1.15e+138) tmp = t_1; elseif (x <= 2.7e+78) 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[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.15e+138], t$95$1, If[LessEqual[x, 2.7e+78], N[(120.0 * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t} \cdot x\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+78}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.15000000000000004e138 or 2.70000000000000004e78 < x Initial program 98.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f6463.6
Applied rewrites63.6%
Applied rewrites63.6%
if -1.15000000000000004e138 < x < 2.70000000000000004e78Initial program 99.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6459.2
Applied rewrites59.2%
Final simplification60.7%
(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.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6448.9
Applied rewrites48.9%
Final simplification48.9%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2024248
(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)))