
(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 (/ (- x y) (/ (- z t) 60.0))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) / ((z - t) / 60.0)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) / Float64(Float64(z - t) / 60.0))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{x - y}{\frac{z - t}{60}}\right)
\end{array}
Initial program 99.0%
+-commutative99.0%
fma-def99.1%
*-commutative99.1%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e-10) (not (<= (* a 120.0) 4e-50))) (+ (/ -60.0 (/ (- z t) y)) (* 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 * 120.0) <= -5e-10) || !((a * 120.0) <= 4e-50)) {
tmp = (-60.0 / ((z - t) / y)) + (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 * 120.0d0) <= (-5d-10)) .or. (.not. ((a * 120.0d0) <= 4d-50))) then
tmp = ((-60.0d0) / ((z - t) / y)) + (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 * 120.0) <= -5e-10) || !((a * 120.0) <= 4e-50)) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5e-10) or not ((a * 120.0) <= 4e-50): tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -5e-10) || !(Float64(a * 120.0) <= 4e-50)) tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + 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 * 120.0) <= -5e-10) || ~(((a * 120.0) <= 4e-50))) tmp = (-60.0 / ((z - t) / y)) + (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[N[(a * 120.0), $MachinePrecision], -5e-10], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-50]], $MachinePrecision]], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-10} \lor \neg \left(a \cdot 120 \leq 4 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.00000000000000031e-10 or 4.00000000000000003e-50 < (*.f64 a 120) Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 87.2%
associate-*r/86.6%
associate-/l*87.3%
Simplified87.3%
if -5.00000000000000031e-10 < (*.f64 a 120) < 4.00000000000000003e-50Initial program 98.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.9%
Final simplification85.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* x 60.0) (- z t))))
(if (<= a -3.9e-14)
(* a 120.0)
(if (<= a -7.5e-154)
t_1
(if (<= a 3.4e-201)
(* -60.0 (/ y (- z t)))
(if (<= a 6.5e-112)
t_1
(if (<= a 2.05e-54) (* -60.0 (/ (- x y) t)) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * 60.0) / (z - t);
double tmp;
if (a <= -3.9e-14) {
tmp = a * 120.0;
} else if (a <= -7.5e-154) {
tmp = t_1;
} else if (a <= 3.4e-201) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 6.5e-112) {
tmp = t_1;
} else if (a <= 2.05e-54) {
tmp = -60.0 * ((x - y) / 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) :: t_1
real(8) :: tmp
t_1 = (x * 60.0d0) / (z - t)
if (a <= (-3.9d-14)) then
tmp = a * 120.0d0
else if (a <= (-7.5d-154)) then
tmp = t_1
else if (a <= 3.4d-201) then
tmp = (-60.0d0) * (y / (z - t))
else if (a <= 6.5d-112) then
tmp = t_1
else if (a <= 2.05d-54) then
tmp = (-60.0d0) * ((x - y) / 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 t_1 = (x * 60.0) / (z - t);
double tmp;
if (a <= -3.9e-14) {
tmp = a * 120.0;
} else if (a <= -7.5e-154) {
tmp = t_1;
} else if (a <= 3.4e-201) {
tmp = -60.0 * (y / (z - t));
} else if (a <= 6.5e-112) {
tmp = t_1;
} else if (a <= 2.05e-54) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x * 60.0) / (z - t) tmp = 0 if a <= -3.9e-14: tmp = a * 120.0 elif a <= -7.5e-154: tmp = t_1 elif a <= 3.4e-201: tmp = -60.0 * (y / (z - t)) elif a <= 6.5e-112: tmp = t_1 elif a <= 2.05e-54: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x * 60.0) / Float64(z - t)) tmp = 0.0 if (a <= -3.9e-14) tmp = Float64(a * 120.0); elseif (a <= -7.5e-154) tmp = t_1; elseif (a <= 3.4e-201) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (a <= 6.5e-112) tmp = t_1; elseif (a <= 2.05e-54) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x * 60.0) / (z - t); tmp = 0.0; if (a <= -3.9e-14) tmp = a * 120.0; elseif (a <= -7.5e-154) tmp = t_1; elseif (a <= 3.4e-201) tmp = -60.0 * (y / (z - t)); elseif (a <= 6.5e-112) tmp = t_1; elseif (a <= 2.05e-54) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.9e-14], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -7.5e-154], t$95$1, If[LessEqual[a, 3.4e-201], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-112], t$95$1, If[LessEqual[a, 2.05e-54], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot 60}{z - t}\\
\mathbf{if}\;a \leq -3.9 \cdot 10^{-14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-201}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.05 \cdot 10^{-54}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.8999999999999998e-14 or 2.05e-54 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.8%
if -3.8999999999999998e-14 < a < -7.5e-154 or 3.39999999999999985e-201 < a < 6.49999999999999956e-112Initial program 97.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.6%
Taylor expanded in x around inf 56.7%
associate-*r/54.9%
Simplified54.9%
if -7.5e-154 < a < 3.39999999999999985e-201Initial program 99.6%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 88.0%
Taylor expanded in x around 0 58.6%
neg-mul-158.6%
distribute-neg-frac58.6%
Simplified58.6%
Taylor expanded in y around 0 58.6%
if 6.49999999999999956e-112 < a < 2.05e-54Initial program 99.7%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in a around 0 100.0%
Taylor expanded in z around 0 100.0%
Final simplification67.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* x 60.0) (- z t))))
(if (<= a -1e-13)
(* a 120.0)
(if (<= a -3.8e-147)
t_1
(if (<= a 4.5e-201)
(/ (* y 60.0) (- t z))
(if (<= a 6.5e-112)
t_1
(if (<= a 1.65e-53) (* -60.0 (/ (- x y) t)) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * 60.0) / (z - t);
double tmp;
if (a <= -1e-13) {
tmp = a * 120.0;
} else if (a <= -3.8e-147) {
tmp = t_1;
} else if (a <= 4.5e-201) {
tmp = (y * 60.0) / (t - z);
} else if (a <= 6.5e-112) {
tmp = t_1;
} else if (a <= 1.65e-53) {
tmp = -60.0 * ((x - y) / 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) :: t_1
real(8) :: tmp
t_1 = (x * 60.0d0) / (z - t)
if (a <= (-1d-13)) then
tmp = a * 120.0d0
else if (a <= (-3.8d-147)) then
tmp = t_1
else if (a <= 4.5d-201) then
tmp = (y * 60.0d0) / (t - z)
else if (a <= 6.5d-112) then
tmp = t_1
else if (a <= 1.65d-53) then
tmp = (-60.0d0) * ((x - y) / 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 t_1 = (x * 60.0) / (z - t);
double tmp;
if (a <= -1e-13) {
tmp = a * 120.0;
} else if (a <= -3.8e-147) {
tmp = t_1;
} else if (a <= 4.5e-201) {
tmp = (y * 60.0) / (t - z);
} else if (a <= 6.5e-112) {
tmp = t_1;
} else if (a <= 1.65e-53) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x * 60.0) / (z - t) tmp = 0 if a <= -1e-13: tmp = a * 120.0 elif a <= -3.8e-147: tmp = t_1 elif a <= 4.5e-201: tmp = (y * 60.0) / (t - z) elif a <= 6.5e-112: tmp = t_1 elif a <= 1.65e-53: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x * 60.0) / Float64(z - t)) tmp = 0.0 if (a <= -1e-13) tmp = Float64(a * 120.0); elseif (a <= -3.8e-147) tmp = t_1; elseif (a <= 4.5e-201) tmp = Float64(Float64(y * 60.0) / Float64(t - z)); elseif (a <= 6.5e-112) tmp = t_1; elseif (a <= 1.65e-53) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x * 60.0) / (z - t); tmp = 0.0; if (a <= -1e-13) tmp = a * 120.0; elseif (a <= -3.8e-147) tmp = t_1; elseif (a <= 4.5e-201) tmp = (y * 60.0) / (t - z); elseif (a <= 6.5e-112) tmp = t_1; elseif (a <= 1.65e-53) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1e-13], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -3.8e-147], t$95$1, If[LessEqual[a, 4.5e-201], N[(N[(y * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-112], t$95$1, If[LessEqual[a, 1.65e-53], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot 60}{z - t}\\
\mathbf{if}\;a \leq -1 \cdot 10^{-13}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -3.8 \cdot 10^{-147}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-201}:\\
\;\;\;\;\frac{y \cdot 60}{t - z}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{-53}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1e-13 or 1.65000000000000002e-53 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.8%
if -1e-13 < a < -3.80000000000000028e-147 or 4.5000000000000002e-201 < a < 6.49999999999999956e-112Initial program 97.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.6%
Taylor expanded in x around inf 56.7%
associate-*r/54.9%
Simplified54.9%
if -3.80000000000000028e-147 < a < 4.5000000000000002e-201Initial program 99.6%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 88.0%
Taylor expanded in x around 0 58.6%
neg-mul-158.6%
distribute-neg-frac58.6%
Simplified58.6%
frac-2neg58.6%
remove-double-neg58.6%
associate-*r/58.7%
Applied egg-rr58.7%
if 6.49999999999999956e-112 < a < 1.65000000000000002e-53Initial program 99.7%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in a around 0 100.0%
Taylor expanded in z around 0 100.0%
Final simplification67.5%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -5e-10) (+ (* 60.0 (/ y t)) (* a 120.0)) (if (<= (* a 120.0) 4e-50) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e-10) {
tmp = (60.0 * (y / t)) + (a * 120.0);
} else if ((a * 120.0) <= 4e-50) {
tmp = 60.0 * ((x - 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 ((a * 120.0d0) <= (-5d-10)) then
tmp = (60.0d0 * (y / t)) + (a * 120.0d0)
else if ((a * 120.0d0) <= 4d-50) then
tmp = 60.0d0 * ((x - 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 ((a * 120.0) <= -5e-10) {
tmp = (60.0 * (y / t)) + (a * 120.0);
} else if ((a * 120.0) <= 4e-50) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e-10: tmp = (60.0 * (y / t)) + (a * 120.0) elif (a * 120.0) <= 4e-50: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e-10) tmp = Float64(Float64(60.0 * Float64(y / t)) + Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 4e-50) tmp = Float64(60.0 * Float64(Float64(x - 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 ((a * 120.0) <= -5e-10) tmp = (60.0 * (y / t)) + (a * 120.0); elseif ((a * 120.0) <= 4e-50) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-10], N[(N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-50], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-10}:\\
\;\;\;\;60 \cdot \frac{y}{t} + a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-50}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.00000000000000031e-10Initial program 98.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 91.6%
associate-*r/90.4%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in z around 0 78.9%
if -5.00000000000000031e-10 < (*.f64 a 120) < 4.00000000000000003e-50Initial program 98.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.9%
if 4.00000000000000003e-50 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 75.9%
Final simplification80.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e-10)
(+ (* 60.0 (/ y t)) (* a 120.0))
(if (<= (* a 120.0) 4e-50)
(* 60.0 (/ (- x y) (- z t)))
(+ (/ -60.0 (/ t x)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e-10) {
tmp = (60.0 * (y / t)) + (a * 120.0);
} else if ((a * 120.0) <= 4e-50) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (-60.0 / (t / x)) + (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 ((a * 120.0d0) <= (-5d-10)) then
tmp = (60.0d0 * (y / t)) + (a * 120.0d0)
else if ((a * 120.0d0) <= 4d-50) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = ((-60.0d0) / (t / x)) + (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 ((a * 120.0) <= -5e-10) {
tmp = (60.0 * (y / t)) + (a * 120.0);
} else if ((a * 120.0) <= 4e-50) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (-60.0 / (t / x)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e-10: tmp = (60.0 * (y / t)) + (a * 120.0) elif (a * 120.0) <= 4e-50: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (-60.0 / (t / x)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e-10) tmp = Float64(Float64(60.0 * Float64(y / t)) + Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 4e-50) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(-60.0 / Float64(t / x)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e-10) tmp = (60.0 * (y / t)) + (a * 120.0); elseif ((a * 120.0) <= 4e-50) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (-60.0 / (t / x)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-10], N[(N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-50], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-10}:\\
\;\;\;\;60 \cdot \frac{y}{t} + a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-50}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{t}{x}} + a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.00000000000000031e-10Initial program 98.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 91.6%
associate-*r/90.4%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in z around 0 78.9%
if -5.00000000000000031e-10 < (*.f64 a 120) < 4.00000000000000003e-50Initial program 98.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.9%
if 4.00000000000000003e-50 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 93.4%
Taylor expanded in z around 0 77.1%
associate-*r/77.1%
associate-/l*77.1%
Simplified77.1%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e-10)
(+ (/ -60.0 (/ (- t) y)) (* a 120.0))
(if (<= (* a 120.0) 4e-50)
(* 60.0 (/ (- x y) (- z t)))
(+ (/ -60.0 (/ t x)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e-10) {
tmp = (-60.0 / (-t / y)) + (a * 120.0);
} else if ((a * 120.0) <= 4e-50) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (-60.0 / (t / x)) + (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 ((a * 120.0d0) <= (-5d-10)) then
tmp = ((-60.0d0) / (-t / y)) + (a * 120.0d0)
else if ((a * 120.0d0) <= 4d-50) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = ((-60.0d0) / (t / x)) + (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 ((a * 120.0) <= -5e-10) {
tmp = (-60.0 / (-t / y)) + (a * 120.0);
} else if ((a * 120.0) <= 4e-50) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (-60.0 / (t / x)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e-10: tmp = (-60.0 / (-t / y)) + (a * 120.0) elif (a * 120.0) <= 4e-50: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (-60.0 / (t / x)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e-10) tmp = Float64(Float64(-60.0 / Float64(Float64(-t) / y)) + Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 4e-50) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(-60.0 / Float64(t / x)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e-10) tmp = (-60.0 / (-t / y)) + (a * 120.0); elseif ((a * 120.0) <= 4e-50) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (-60.0 / (t / x)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-10], N[(N[(-60.0 / N[((-t) / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-50], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-10}:\\
\;\;\;\;\frac{-60}{\frac{-t}{y}} + a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-50}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{t}{x}} + a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.00000000000000031e-10Initial program 98.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 91.6%
associate-*r/90.4%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in z around 0 78.9%
neg-mul-178.9%
distribute-neg-frac78.9%
Simplified78.9%
if -5.00000000000000031e-10 < (*.f64 a 120) < 4.00000000000000003e-50Initial program 98.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.9%
if 4.00000000000000003e-50 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 93.4%
Taylor expanded in z around 0 77.1%
associate-*r/77.1%
associate-/l*77.1%
Simplified77.1%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.6e-64)
(* a 120.0)
(if (<= a -4.3e-117)
(* -60.0 (/ (- x y) t))
(if (or (<= a -3.2e-166) (not (<= a 5.5e-59)))
(* a 120.0)
(* -60.0 (/ y (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.6e-64) {
tmp = a * 120.0;
} else if (a <= -4.3e-117) {
tmp = -60.0 * ((x - y) / t);
} else if ((a <= -3.2e-166) || !(a <= 5.5e-59)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (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 <= (-9.6d-64)) then
tmp = a * 120.0d0
else if (a <= (-4.3d-117)) then
tmp = (-60.0d0) * ((x - y) / t)
else if ((a <= (-3.2d-166)) .or. (.not. (a <= 5.5d-59))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (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 <= -9.6e-64) {
tmp = a * 120.0;
} else if (a <= -4.3e-117) {
tmp = -60.0 * ((x - y) / t);
} else if ((a <= -3.2e-166) || !(a <= 5.5e-59)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.6e-64: tmp = a * 120.0 elif a <= -4.3e-117: tmp = -60.0 * ((x - y) / t) elif (a <= -3.2e-166) or not (a <= 5.5e-59): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.6e-64) tmp = Float64(a * 120.0); elseif (a <= -4.3e-117) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif ((a <= -3.2e-166) || !(a <= 5.5e-59)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.6e-64) tmp = a * 120.0; elseif (a <= -4.3e-117) tmp = -60.0 * ((x - y) / t); elseif ((a <= -3.2e-166) || ~((a <= 5.5e-59))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.6e-64], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -4.3e-117], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -3.2e-166], N[Not[LessEqual[a, 5.5e-59]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.6 \cdot 10^{-64}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -4.3 \cdot 10^{-117}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq -3.2 \cdot 10^{-166} \lor \neg \left(a \leq 5.5 \cdot 10^{-59}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -9.59999999999999994e-64 or -4.3e-117 < a < -3.20000000000000001e-166 or 5.50000000000000014e-59 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.3%
if -9.59999999999999994e-64 < a < -4.3e-117Initial program 92.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 85.6%
Taylor expanded in z around 0 47.4%
if -3.20000000000000001e-166 < a < 5.50000000000000014e-59Initial program 99.6%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 90.4%
Taylor expanded in x around 0 53.1%
neg-mul-153.1%
distribute-neg-frac53.1%
Simplified53.1%
Taylor expanded in y around 0 53.1%
Final simplification63.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -1000000000000.0) (not (<= (- z t) 1e-111))) (* a 120.0) (* 60.0 (/ (- x y) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -1000000000000.0) || !((z - t) <= 1e-111)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / 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 - t) <= (-1000000000000.0d0)) .or. (.not. ((z - t) <= 1d-111))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / 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 - t) <= -1000000000000.0) || !((z - t) <= 1e-111)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -1000000000000.0) or not ((z - t) <= 1e-111): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -1000000000000.0) || !(Float64(z - t) <= 1e-111)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -1000000000000.0) || ~(((z - t) <= 1e-111))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -1000000000000.0], N[Not[LessEqual[N[(z - t), $MachinePrecision], 1e-111]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -1000000000000 \lor \neg \left(z - t \leq 10^{-111}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if (-.f64 z t) < -1e12 or 1.00000000000000009e-111 < (-.f64 z t) Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 60.7%
if -1e12 < (-.f64 z t) < 1.00000000000000009e-111Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 91.1%
Taylor expanded in z around inf 62.7%
Final simplification61.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -9e-35) (not (<= x 1.12e+101))) (+ (/ 60.0 (/ (- z t) x)) (* a 120.0)) (+ (/ -60.0 (/ (- z t) y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -9e-35) || !(x <= 1.12e+101)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (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 <= (-9d-35)) .or. (.not. (x <= 1.12d+101))) then
tmp = (60.0d0 / ((z - t) / x)) + (a * 120.0d0)
else
tmp = ((-60.0d0) / ((z - t) / y)) + (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 <= -9e-35) || !(x <= 1.12e+101)) {
tmp = (60.0 / ((z - t) / x)) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -9e-35) or not (x <= 1.12e+101): tmp = (60.0 / ((z - t) / x)) + (a * 120.0) else: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -9e-35) || !(x <= 1.12e+101)) tmp = Float64(Float64(60.0 / Float64(Float64(z - t) / x)) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -9e-35) || ~((x <= 1.12e+101))) tmp = (60.0 / ((z - t) / x)) + (a * 120.0); else tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -9e-35], N[Not[LessEqual[x, 1.12e+101]], $MachinePrecision]], N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{-35} \lor \neg \left(x \leq 1.12 \cdot 10^{+101}\right):\\
\;\;\;\;\frac{60}{\frac{z - t}{x}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\end{array}
\end{array}
if x < -9.0000000000000002e-35 or 1.1199999999999999e101 < x Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.5%
if -9.0000000000000002e-35 < x < 1.1199999999999999e101Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 92.6%
associate-*r/92.0%
associate-/l*92.6%
Simplified92.6%
Final simplification92.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.9e-12) (not (<= a 1.02e-50))) (* 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 <= -4.9e-12) || !(a <= 1.02e-50)) {
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 <= (-4.9d-12)) .or. (.not. (a <= 1.02d-50))) 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 <= -4.9e-12) || !(a <= 1.02e-50)) {
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 <= -4.9e-12) or not (a <= 1.02e-50): 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 <= -4.9e-12) || !(a <= 1.02e-50)) 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 <= -4.9e-12) || ~((a <= 1.02e-50))) 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, -4.9e-12], N[Not[LessEqual[a, 1.02e-50]], $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 -4.9 \cdot 10^{-12} \lor \neg \left(a \leq 1.02 \cdot 10^{-50}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -4.89999999999999972e-12 or 1.0199999999999999e-50 < a Initial program 99.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.1%
if -4.89999999999999972e-12 < a < 1.0199999999999999e-50Initial program 98.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.9%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.2e-164) (not (<= a 4.1e-57))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.2e-164) || !(a <= 4.1e-57)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (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 <= (-5.2d-164)) .or. (.not. (a <= 4.1d-57))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (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 <= -5.2e-164) || !(a <= 4.1e-57)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.2e-164) or not (a <= 4.1e-57): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.2e-164) || !(a <= 4.1e-57)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.2e-164) || ~((a <= 4.1e-57))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.2e-164], N[Not[LessEqual[a, 4.1e-57]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-164} \lor \neg \left(a \leq 4.1 \cdot 10^{-57}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -5.2000000000000003e-164 or 4.1000000000000001e-57 < a Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.4%
if -5.2000000000000003e-164 < a < 4.1000000000000001e-57Initial program 99.6%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 90.4%
Taylor expanded in x around 0 53.1%
neg-mul-153.1%
distribute-neg-frac53.1%
Simplified53.1%
Taylor expanded in y around 0 53.1%
Final simplification61.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.5e-172) (not (<= a 1.1e-171))) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.5e-172) || !(a <= 1.1e-171)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / 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 ((a <= (-3.5d-172)) .or. (.not. (a <= 1.1d-171))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.5e-172) || !(a <= 1.1e-171)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.5e-172) or not (a <= 1.1e-171): tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.5e-172) || !(a <= 1.1e-171)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.5e-172) || ~((a <= 1.1e-171))) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.5e-172], N[Not[LessEqual[a, 1.1e-171]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{-172} \lor \neg \left(a \leq 1.1 \cdot 10^{-171}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if a < -3.50000000000000029e-172 or 1.1000000000000001e-171 < a Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.0%
if -3.50000000000000029e-172 < a < 1.1000000000000001e-171Initial program 99.6%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 92.6%
Taylor expanded in x around 0 57.0%
neg-mul-157.0%
distribute-neg-frac57.0%
Simplified57.0%
Taylor expanded in z around inf 32.4%
Final simplification55.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.4e-170) (not (<= a 4.2e-57))) (* a 120.0) (* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.4e-170) || !(a <= 4.2e-57)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-4.4d-170)) .or. (.not. (a <= 4.2d-57))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.4e-170) || !(a <= 4.2e-57)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.4e-170) or not (a <= 4.2e-57): tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.4e-170) || !(a <= 4.2e-57)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.4e-170) || ~((a <= 4.2e-57))) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.4e-170], N[Not[LessEqual[a, 4.2e-57]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-170} \lor \neg \left(a \leq 4.2 \cdot 10^{-57}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -4.40000000000000029e-170 or 4.1999999999999999e-57 < a Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.4%
if -4.40000000000000029e-170 < a < 4.1999999999999999e-57Initial program 99.6%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in x around 0 61.6%
associate-*r/61.7%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in z around 0 35.3%
Taylor expanded in y around inf 28.7%
Final simplification55.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.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 50.3%
Final simplification50.3%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023332
(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)))