
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.5%
+-commutative99.5%
fma-def99.5%
associate-*l/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e+16)
(* a 120.0)
(if (<= (* a 120.0) -4e-92)
t_1
(if (<= (* a 120.0) -5e-119)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) 5e-57)
t_1
(if (<= (* a 120.0) 0.0002)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 50000.0)
(/ -60.0 (/ t (- x y)))
(if (<= (* a 120.0) 2e+54)
(+ (* a 120.0) (* -60.0 (/ y z)))
(* a 120.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 ((a * 120.0) <= -1e+16) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-92) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-119) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 5e-57) {
tmp = t_1;
} else if ((a * 120.0) <= 0.0002) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 50000.0) {
tmp = -60.0 / (t / (x - y));
} else if ((a * 120.0) <= 2e+54) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.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 ((a * 120.0d0) <= (-1d+16)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-4d-92)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-119)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= 5d-57) then
tmp = t_1
else if ((a * 120.0d0) <= 0.0002d0) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 50000.0d0) then
tmp = (-60.0d0) / (t / (x - y))
else if ((a * 120.0d0) <= 2d+54) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = a * 120.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 ((a * 120.0) <= -1e+16) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-92) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-119) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 5e-57) {
tmp = t_1;
} else if ((a * 120.0) <= 0.0002) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 50000.0) {
tmp = -60.0 / (t / (x - y));
} else if ((a * 120.0) <= 2e+54) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e+16: tmp = a * 120.0 elif (a * 120.0) <= -4e-92: tmp = t_1 elif (a * 120.0) <= -5e-119: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= 5e-57: tmp = t_1 elif (a * 120.0) <= 0.0002: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 50000.0: tmp = -60.0 / (t / (x - y)) elif (a * 120.0) <= 2e+54: tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+16) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -4e-92) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-119) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= 5e-57) tmp = t_1; elseif (Float64(a * 120.0) <= 0.0002) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 50000.0) tmp = Float64(-60.0 / Float64(t / Float64(x - y))); elseif (Float64(a * 120.0) <= 2e+54) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = Float64(a * 120.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 ((a * 120.0) <= -1e+16) tmp = a * 120.0; elseif ((a * 120.0) <= -4e-92) tmp = t_1; elseif ((a * 120.0) <= -5e-119) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= 5e-57) tmp = t_1; elseif ((a * 120.0) <= 0.0002) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 50000.0) tmp = -60.0 / (t / (x - y)); elseif ((a * 120.0) <= 2e+54) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+16], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-92], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-119], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-57], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 0.0002], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 50000.0], N[(-60.0 / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+54], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+16}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-119}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 0.0002:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 50000:\\
\;\;\;\;\frac{-60}{\frac{t}{x - y}}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+54}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e16 or 2.0000000000000002e54 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.4%
if -1e16 < (*.f64 a 120) < -3.99999999999999995e-92 or -4.99999999999999993e-119 < (*.f64 a 120) < 5.0000000000000002e-57Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 81.4%
if -3.99999999999999995e-92 < (*.f64 a 120) < -4.99999999999999993e-119Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 87.6%
Taylor expanded in z around inf 87.5%
if 5.0000000000000002e-57 < (*.f64 a 120) < 2.0000000000000001e-4Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 69.5%
Taylor expanded in x around 0 71.3%
if 2.0000000000000001e-4 < (*.f64 a 120) < 5e4Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 99.2%
Taylor expanded in t around 0 99.2%
clear-num100.0%
div-inv100.0%
Applied egg-rr100.0%
if 5e4 < (*.f64 a 120) < 2.0000000000000002e54Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in x around 0 99.9%
+-commutative99.9%
fma-def99.9%
associate-*r/99.6%
Simplified99.6%
Taylor expanded in z around inf 85.2%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e+16)
(* a 120.0)
(if (<= (* a 120.0) -4e-92)
t_1
(if (<= (* a 120.0) -5e-119)
(+ (* a 120.0) (/ 60.0 (/ z x)))
(if (<= (* a 120.0) 5e-57)
t_1
(if (<= (* a 120.0) 0.0002)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 50000.0)
(/ -60.0 (/ t (- x y)))
(if (<= (* a 120.0) 2e+54)
(+ (* a 120.0) (* -60.0 (/ y z)))
(* a 120.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 ((a * 120.0) <= -1e+16) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-92) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-119) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if ((a * 120.0) <= 5e-57) {
tmp = t_1;
} else if ((a * 120.0) <= 0.0002) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 50000.0) {
tmp = -60.0 / (t / (x - y));
} else if ((a * 120.0) <= 2e+54) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.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 ((a * 120.0d0) <= (-1d+16)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-4d-92)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-119)) then
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
else if ((a * 120.0d0) <= 5d-57) then
tmp = t_1
else if ((a * 120.0d0) <= 0.0002d0) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 50000.0d0) then
tmp = (-60.0d0) / (t / (x - y))
else if ((a * 120.0d0) <= 2d+54) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = a * 120.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 ((a * 120.0) <= -1e+16) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-92) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-119) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if ((a * 120.0) <= 5e-57) {
tmp = t_1;
} else if ((a * 120.0) <= 0.0002) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 50000.0) {
tmp = -60.0 / (t / (x - y));
} else if ((a * 120.0) <= 2e+54) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e+16: tmp = a * 120.0 elif (a * 120.0) <= -4e-92: tmp = t_1 elif (a * 120.0) <= -5e-119: tmp = (a * 120.0) + (60.0 / (z / x)) elif (a * 120.0) <= 5e-57: tmp = t_1 elif (a * 120.0) <= 0.0002: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 50000.0: tmp = -60.0 / (t / (x - y)) elif (a * 120.0) <= 2e+54: tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+16) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -4e-92) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-119) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); elseif (Float64(a * 120.0) <= 5e-57) tmp = t_1; elseif (Float64(a * 120.0) <= 0.0002) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 50000.0) tmp = Float64(-60.0 / Float64(t / Float64(x - y))); elseif (Float64(a * 120.0) <= 2e+54) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = Float64(a * 120.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 ((a * 120.0) <= -1e+16) tmp = a * 120.0; elseif ((a * 120.0) <= -4e-92) tmp = t_1; elseif ((a * 120.0) <= -5e-119) tmp = (a * 120.0) + (60.0 / (z / x)); elseif ((a * 120.0) <= 5e-57) tmp = t_1; elseif ((a * 120.0) <= 0.0002) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 50000.0) tmp = -60.0 / (t / (x - y)); elseif ((a * 120.0) <= 2e+54) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+16], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-92], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-119], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-57], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 0.0002], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 50000.0], N[(-60.0 / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+54], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+16}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-119}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 0.0002:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 50000:\\
\;\;\;\;\frac{-60}{\frac{t}{x - y}}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+54}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e16 or 2.0000000000000002e54 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.4%
if -1e16 < (*.f64 a 120) < -3.99999999999999995e-92 or -4.99999999999999993e-119 < (*.f64 a 120) < 5.0000000000000002e-57Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 81.4%
if -3.99999999999999995e-92 < (*.f64 a 120) < -4.99999999999999993e-119Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 87.6%
Taylor expanded in z around inf 87.6%
if 5.0000000000000002e-57 < (*.f64 a 120) < 2.0000000000000001e-4Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 69.5%
Taylor expanded in x around 0 71.3%
if 2.0000000000000001e-4 < (*.f64 a 120) < 5e4Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 99.2%
Taylor expanded in t around 0 99.2%
clear-num100.0%
div-inv100.0%
Applied egg-rr100.0%
if 5e4 < (*.f64 a 120) < 2.0000000000000002e54Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in x around 0 99.9%
+-commutative99.9%
fma-def99.9%
associate-*r/99.6%
Simplified99.6%
Taylor expanded in z around inf 85.2%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e+16)
(* a 120.0)
(if (<= (* a 120.0) -4e-92)
t_1
(if (<= (* a 120.0) -5e-119)
(+ (* a 120.0) (/ 60.0 (/ z x)))
(if (<= (* a 120.0) 5e-57)
t_1
(if (<= (* a 120.0) 0.0002)
(+ (* a 120.0) (/ -60.0 (/ (- t) y)))
(if (<= (* a 120.0) 50000.0)
(/ -60.0 (/ t (- x y)))
(if (<= (* a 120.0) 2e+54)
(+ (* a 120.0) (* -60.0 (/ y z)))
(* a 120.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 ((a * 120.0) <= -1e+16) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-92) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-119) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if ((a * 120.0) <= 5e-57) {
tmp = t_1;
} else if ((a * 120.0) <= 0.0002) {
tmp = (a * 120.0) + (-60.0 / (-t / y));
} else if ((a * 120.0) <= 50000.0) {
tmp = -60.0 / (t / (x - y));
} else if ((a * 120.0) <= 2e+54) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.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 ((a * 120.0d0) <= (-1d+16)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-4d-92)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-119)) then
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
else if ((a * 120.0d0) <= 5d-57) then
tmp = t_1
else if ((a * 120.0d0) <= 0.0002d0) then
tmp = (a * 120.0d0) + ((-60.0d0) / (-t / y))
else if ((a * 120.0d0) <= 50000.0d0) then
tmp = (-60.0d0) / (t / (x - y))
else if ((a * 120.0d0) <= 2d+54) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = a * 120.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 ((a * 120.0) <= -1e+16) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-92) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-119) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if ((a * 120.0) <= 5e-57) {
tmp = t_1;
} else if ((a * 120.0) <= 0.0002) {
tmp = (a * 120.0) + (-60.0 / (-t / y));
} else if ((a * 120.0) <= 50000.0) {
tmp = -60.0 / (t / (x - y));
} else if ((a * 120.0) <= 2e+54) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e+16: tmp = a * 120.0 elif (a * 120.0) <= -4e-92: tmp = t_1 elif (a * 120.0) <= -5e-119: tmp = (a * 120.0) + (60.0 / (z / x)) elif (a * 120.0) <= 5e-57: tmp = t_1 elif (a * 120.0) <= 0.0002: tmp = (a * 120.0) + (-60.0 / (-t / y)) elif (a * 120.0) <= 50000.0: tmp = -60.0 / (t / (x - y)) elif (a * 120.0) <= 2e+54: tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+16) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -4e-92) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-119) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); elseif (Float64(a * 120.0) <= 5e-57) tmp = t_1; elseif (Float64(a * 120.0) <= 0.0002) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(-t) / y))); elseif (Float64(a * 120.0) <= 50000.0) tmp = Float64(-60.0 / Float64(t / Float64(x - y))); elseif (Float64(a * 120.0) <= 2e+54) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = Float64(a * 120.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 ((a * 120.0) <= -1e+16) tmp = a * 120.0; elseif ((a * 120.0) <= -4e-92) tmp = t_1; elseif ((a * 120.0) <= -5e-119) tmp = (a * 120.0) + (60.0 / (z / x)); elseif ((a * 120.0) <= 5e-57) tmp = t_1; elseif ((a * 120.0) <= 0.0002) tmp = (a * 120.0) + (-60.0 / (-t / y)); elseif ((a * 120.0) <= 50000.0) tmp = -60.0 / (t / (x - y)); elseif ((a * 120.0) <= 2e+54) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+16], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-92], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-119], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-57], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 0.0002], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[((-t) / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 50000.0], N[(-60.0 / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+54], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+16}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-119}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 0.0002:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{-t}{y}}\\
\mathbf{elif}\;a \cdot 120 \leq 50000:\\
\;\;\;\;\frac{-60}{\frac{t}{x - y}}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+54}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e16 or 2.0000000000000002e54 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.4%
if -1e16 < (*.f64 a 120) < -3.99999999999999995e-92 or -4.99999999999999993e-119 < (*.f64 a 120) < 5.0000000000000002e-57Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 81.4%
if -3.99999999999999995e-92 < (*.f64 a 120) < -4.99999999999999993e-119Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 87.6%
Taylor expanded in z around inf 87.6%
if 5.0000000000000002e-57 < (*.f64 a 120) < 2.0000000000000001e-4Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 69.5%
associate-*r/69.5%
associate-/l*69.6%
Simplified69.6%
Taylor expanded in x around 0 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if 2.0000000000000001e-4 < (*.f64 a 120) < 5e4Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 99.2%
Taylor expanded in t around 0 99.2%
clear-num100.0%
div-inv100.0%
Applied egg-rr100.0%
if 5e4 < (*.f64 a 120) < 2.0000000000000002e54Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in x around 0 99.9%
+-commutative99.9%
fma-def99.9%
associate-*r/99.6%
Simplified99.6%
Taylor expanded in z around inf 85.2%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e+16)
(* a 120.0)
(if (<= (* a 120.0) -4e-92)
t_1
(if (<= (* a 120.0) -5e-119)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) 5e-57) t_1 (* a 120.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 ((a * 120.0) <= -1e+16) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-92) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-119) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 5e-57) {
tmp = t_1;
} else {
tmp = a * 120.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 ((a * 120.0d0) <= (-1d+16)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-4d-92)) then
tmp = t_1
else if ((a * 120.0d0) <= (-5d-119)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= 5d-57) then
tmp = t_1
else
tmp = a * 120.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 ((a * 120.0) <= -1e+16) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -4e-92) {
tmp = t_1;
} else if ((a * 120.0) <= -5e-119) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 5e-57) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e+16: tmp = a * 120.0 elif (a * 120.0) <= -4e-92: tmp = t_1 elif (a * 120.0) <= -5e-119: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= 5e-57: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e+16) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -4e-92) tmp = t_1; elseif (Float64(a * 120.0) <= -5e-119) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= 5e-57) tmp = t_1; else tmp = Float64(a * 120.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 ((a * 120.0) <= -1e+16) tmp = a * 120.0; elseif ((a * 120.0) <= -4e-92) tmp = t_1; elseif ((a * 120.0) <= -5e-119) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= 5e-57) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+16], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-92], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-119], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-57], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+16}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -4 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-119}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e16 or 5.0000000000000002e-57 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.1%
if -1e16 < (*.f64 a 120) < -3.99999999999999995e-92 or -4.99999999999999993e-119 < (*.f64 a 120) < 5.0000000000000002e-57Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 81.4%
if -3.99999999999999995e-92 < (*.f64 a 120) < -4.99999999999999993e-119Initial program 99.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 87.6%
Taylor expanded in z around inf 87.5%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.02e-13) (not (<= z 17500000.0))) (+ (* a 120.0) (/ 60.0 (/ z (- x y)))) (+ (* a 120.0) (/ -60.0 (/ t (- x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.02e-13) || !(z <= 17500000.0)) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else {
tmp = (a * 120.0) + (-60.0 / (t / (x - y)));
}
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 ((z <= (-1.02d-13)) .or. (.not. (z <= 17500000.0d0))) then
tmp = (a * 120.0d0) + (60.0d0 / (z / (x - y)))
else
tmp = (a * 120.0d0) + ((-60.0d0) / (t / (x - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.02e-13) || !(z <= 17500000.0)) {
tmp = (a * 120.0) + (60.0 / (z / (x - y)));
} else {
tmp = (a * 120.0) + (-60.0 / (t / (x - y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.02e-13) or not (z <= 17500000.0): tmp = (a * 120.0) + (60.0 / (z / (x - y))) else: tmp = (a * 120.0) + (-60.0 / (t / (x - y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.02e-13) || !(z <= 17500000.0)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / Float64(x - y)))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / Float64(x - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.02e-13) || ~((z <= 17500000.0))) tmp = (a * 120.0) + (60.0 / (z / (x - y))); else tmp = (a * 120.0) + (-60.0 / (t / (x - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.02e-13], N[Not[LessEqual[z, 17500000.0]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{-13} \lor \neg \left(z \leq 17500000\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x - y}}\\
\end{array}
\end{array}
if z < -1.0199999999999999e-13 or 1.75e7 < z Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 90.9%
if -1.0199999999999999e-13 < z < 1.75e7Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 86.3%
associate-*r/85.5%
associate-/l*86.3%
Simplified86.3%
Final simplification88.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3300.0)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= z 35000.0)
(+ (* a 120.0) (* -60.0 (/ (- x y) t)))
(+ (* a 120.0) (/ (* y -60.0) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3300.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (z <= 35000.0) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3300.0d0)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if (z <= 35000.0d0) then
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3300.0) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (z <= 35000.0) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3300.0: tmp = (a * 120.0) + (-60.0 * (y / z)) elif z <= 35000.0: tmp = (a * 120.0) + (-60.0 * ((x - y) / t)) else: tmp = (a * 120.0) + ((y * -60.0) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3300.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (z <= 35000.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3300.0) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif (z <= 35000.0) tmp = (a * 120.0) + (-60.0 * ((x - y) / t)); else tmp = (a * 120.0) + ((y * -60.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3300.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 35000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3300:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 35000:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if z < -3300Initial program 99.9%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around 0 84.0%
+-commutative84.0%
fma-def84.0%
associate-*r/84.0%
Simplified84.0%
Taylor expanded in z around inf 74.1%
if -3300 < z < 35000Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 85.2%
if 35000 < z Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 96.9%
Taylor expanded in x around 0 86.8%
*-commutative86.8%
associate-*l/86.8%
Simplified86.8%
Final simplification82.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.2e+40)
(+ (* a 120.0) (* (/ 60.0 (- z t)) x))
(if (<= z 55000.0)
(+ (* a 120.0) (* -60.0 (/ (- x y) t)))
(+ (* a 120.0) (/ (* y -60.0) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e+40) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else if (z <= 55000.0) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.2d+40)) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else if (z <= 55000.0d0) then
tmp = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e+40) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else if (z <= 55000.0) {
tmp = (a * 120.0) + (-60.0 * ((x - y) / t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.2e+40: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) elif z <= 55000.0: tmp = (a * 120.0) + (-60.0 * ((x - y) / t)) else: tmp = (a * 120.0) + ((y * -60.0) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.2e+40) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); elseif (z <= 55000.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.2e+40) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); elseif (z <= 55000.0) tmp = (a * 120.0) + (-60.0 * ((x - y) / t)); else tmp = (a * 120.0) + ((y * -60.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e+40], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 55000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+40}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{elif}\;z \leq 55000:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if z < -2.1999999999999999e40Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 78.8%
associate-*r/78.7%
associate-*l/78.7%
*-commutative78.7%
Simplified78.7%
if -2.1999999999999999e40 < z < 55000Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 84.3%
if 55000 < z Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 96.9%
Taylor expanded in x around 0 86.8%
*-commutative86.8%
associate-*l/86.8%
Simplified86.8%
Final simplification83.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.2e+40)
(+ (* a 120.0) (* (/ 60.0 (- z t)) x))
(if (<= z 600000000.0)
(+ (* a 120.0) (/ -60.0 (/ t (- x y))))
(+ (* a 120.0) (/ (* y -60.0) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e+40) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else if (z <= 600000000.0) {
tmp = (a * 120.0) + (-60.0 / (t / (x - y)));
} else {
tmp = (a * 120.0) + ((y * -60.0) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.2d+40)) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else if (z <= 600000000.0d0) then
tmp = (a * 120.0d0) + ((-60.0d0) / (t / (x - y)))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e+40) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else if (z <= 600000000.0) {
tmp = (a * 120.0) + (-60.0 / (t / (x - y)));
} else {
tmp = (a * 120.0) + ((y * -60.0) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.2e+40: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) elif z <= 600000000.0: tmp = (a * 120.0) + (-60.0 / (t / (x - y))) else: tmp = (a * 120.0) + ((y * -60.0) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.2e+40) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); elseif (z <= 600000000.0) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / Float64(x - y)))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.2e+40) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); elseif (z <= 600000000.0) tmp = (a * 120.0) + (-60.0 / (t / (x - y))); else tmp = (a * 120.0) + ((y * -60.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e+40], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 600000000.0], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+40}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{elif}\;z \leq 600000000:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if z < -2.1999999999999999e40Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 78.8%
associate-*r/78.7%
associate-*l/78.7%
*-commutative78.7%
Simplified78.7%
if -2.1999999999999999e40 < z < 6e8Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 84.3%
associate-*r/83.5%
associate-/l*84.3%
Simplified84.3%
if 6e8 < z Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 96.9%
Taylor expanded in x around 0 86.8%
*-commutative86.8%
associate-*l/86.8%
Simplified86.8%
Final simplification83.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -520000000.0) (not (<= a 9e-56))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -520000000.0) || !(a <= 9e-56)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-520000000.0d0)) .or. (.not. (a <= 9d-56))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -520000000.0) || !(a <= 9e-56)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -520000000.0) or not (a <= 9e-56): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -520000000.0) || !(a <= 9e-56)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -520000000.0) || ~((a <= 9e-56))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -520000000.0], N[Not[LessEqual[a, 9e-56]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -520000000 \lor \neg \left(a \leq 9 \cdot 10^{-56}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -5.2e8 or 9.0000000000000001e-56 < a Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.1%
if -5.2e8 < a < 9.0000000000000001e-56Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.4%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.4e+105) (not (<= y 6.8e+117))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.4e+105) || !(y <= 6.8e+117)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.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) :: tmp
if ((y <= (-3.4d+105)) .or. (.not. (y <= 6.8d+117))) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.4e+105) || !(y <= 6.8e+117)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.4e+105) or not (y <= 6.8e+117): tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.4e+105) || !(y <= 6.8e+117)) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.4e+105) || ~((y <= 6.8e+117))) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.4e+105], N[Not[LessEqual[y, 6.8e+117]], $MachinePrecision]], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+105} \lor \neg \left(y \leq 6.8 \cdot 10^{+117}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -3.3999999999999999e105 or 6.8000000000000002e117 < y Initial program 98.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 74.7%
Taylor expanded in x around 0 66.1%
if -3.3999999999999999e105 < y < 6.8000000000000002e117Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 61.1%
Final simplification62.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -4.3e+229) (* -60.0 (/ x t)) (if (<= x 7.5e+161) (* a 120.0) (* 60.0 (/ x z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.3e+229) {
tmp = -60.0 * (x / t);
} else if (x <= 7.5e+161) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-4.3d+229)) then
tmp = (-60.0d0) * (x / t)
else if (x <= 7.5d+161) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.3e+229) {
tmp = -60.0 * (x / t);
} else if (x <= 7.5e+161) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.3e+229: tmp = -60.0 * (x / t) elif x <= 7.5e+161: tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.3e+229) tmp = Float64(-60.0 * Float64(x / t)); elseif (x <= 7.5e+161) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.3e+229) tmp = -60.0 * (x / t); elseif (x <= 7.5e+161) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.3e+229], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e+161], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+229}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+161}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -4.29999999999999991e229Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 81.1%
Taylor expanded in t around 0 64.6%
Taylor expanded in x around inf 58.5%
if -4.29999999999999991e229 < x < 7.4999999999999995e161Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 53.8%
if 7.4999999999999995e161 < x Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 92.3%
Taylor expanded in z around inf 70.1%
Taylor expanded in x around inf 55.0%
Final simplification54.2%
(FPCore (x y z t a) :precision binary64 (if (<= x -4.3e+229) (* x (/ -60.0 t)) (if (<= x 7.5e+160) (* a 120.0) (* 60.0 (/ x z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.3e+229) {
tmp = x * (-60.0 / t);
} else if (x <= 7.5e+160) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-4.3d+229)) then
tmp = x * ((-60.0d0) / t)
else if (x <= 7.5d+160) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.3e+229) {
tmp = x * (-60.0 / t);
} else if (x <= 7.5e+160) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.3e+229: tmp = x * (-60.0 / t) elif x <= 7.5e+160: tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.3e+229) tmp = Float64(x * Float64(-60.0 / t)); elseif (x <= 7.5e+160) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.3e+229) tmp = x * (-60.0 / t); elseif (x <= 7.5e+160) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.3e+229], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e+160], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+229}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+160}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -4.29999999999999991e229Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 81.1%
Taylor expanded in t around 0 64.6%
Taylor expanded in x around inf 58.5%
associate-*r/58.5%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
if -4.29999999999999991e229 < x < 7.50000000000000028e160Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 53.8%
if 7.50000000000000028e160 < x Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 92.3%
Taylor expanded in z around inf 70.1%
Taylor expanded in x around inf 55.0%
Final simplification54.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}
Initial program 99.5%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -4.4e+229) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.4e+229) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.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) :: tmp
if (x <= (-4.4d+229)) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.4e+229) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.4e+229: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.4e+229) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.4e+229) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.4e+229], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{+229}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -4.40000000000000007e229Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 81.1%
Taylor expanded in t around 0 64.6%
Taylor expanded in x around inf 58.5%
if -4.40000000000000007e229 < x Initial program 99.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 50.5%
Final simplification51.0%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 48.7%
Final simplification48.7%
(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 2024018
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))