
(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 14 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 (+ (/ (* 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}
Initial program 99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -0.5)
(* a 120.0)
(if (<= (* a 120.0) 2e-14)
(/ 60.0 (/ (- z t) (- x y)))
(+ (* a 120.0) (* -60.0 (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -0.5) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-14) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) + (-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 * 120.0d0) <= (-0.5d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-14) then
tmp = 60.0d0 / ((z - t) / (x - y))
else
tmp = (a * 120.0d0) + ((-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 * 120.0) <= -0.5) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-14) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -0.5: tmp = a * 120.0 elif (a * 120.0) <= 2e-14: tmp = 60.0 / ((z - t) / (x - y)) else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -0.5) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-14) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -0.5) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-14) tmp = 60.0 / ((z - t) / (x - y)); else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -0.5], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-14], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -0.5:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-14}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -0.5Initial program 100.0%
*-commutative100.0%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 79.2%
if -0.5 < (*.f64 a #s(literal 120 binary64)) < 2e-14Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
+-commutative99.7%
fma-define99.7%
clear-num99.5%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.3%
associate-*r/78.4%
associate-*l/78.3%
associate-/r/78.3%
Simplified78.3%
if 2e-14 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 88.3%
associate-*r/88.2%
*-commutative88.2%
*-lft-identity88.2%
times-frac88.2%
/-rgt-identity88.2%
Simplified88.2%
Taylor expanded in z around inf 74.0%
Final simplification77.5%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -0.5)
(* a 120.0)
(if (<= (* a 120.0) 2e-14)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* -60.0 (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -0.5) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-14) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-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 * 120.0d0) <= (-0.5d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-14) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((-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 * 120.0) <= -0.5) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-14) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -0.5: tmp = a * 120.0 elif (a * 120.0) <= 2e-14: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (-60.0 * (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -0.5) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-14) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -0.5) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-14) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (-60.0 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -0.5], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-14], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -0.5:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-14}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -0.5Initial program 100.0%
*-commutative100.0%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 79.2%
if -0.5 < (*.f64 a #s(literal 120 binary64)) < 2e-14Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.3%
if 2e-14 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 88.3%
associate-*r/88.2%
*-commutative88.2%
*-lft-identity88.2%
times-frac88.2%
/-rgt-identity88.2%
Simplified88.2%
Taylor expanded in z around inf 74.0%
Final simplification77.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7.9e-84)
(* a 120.0)
(if (<= a -1.8e-287)
(* -60.0 (/ (- x y) t))
(if (<= a 7e-158) (* 60.0 (/ (- x y) z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.9e-84) {
tmp = a * 120.0;
} else if (a <= -1.8e-287) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 7e-158) {
tmp = 60.0 * ((x - 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) :: tmp
if (a <= (-7.9d-84)) then
tmp = a * 120.0d0
else if (a <= (-1.8d-287)) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 7d-158) then
tmp = 60.0d0 * ((x - 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 tmp;
if (a <= -7.9e-84) {
tmp = a * 120.0;
} else if (a <= -1.8e-287) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 7e-158) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.9e-84: tmp = a * 120.0 elif a <= -1.8e-287: tmp = -60.0 * ((x - y) / t) elif a <= 7e-158: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.9e-84) tmp = Float64(a * 120.0); elseif (a <= -1.8e-287) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 7e-158) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7.9e-84) tmp = a * 120.0; elseif (a <= -1.8e-287) tmp = -60.0 * ((x - y) / t); elseif (a <= 7e-158) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.9e-84], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.8e-287], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7e-158], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.9 \cdot 10^{-84}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-287}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-158}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.89999999999999991e-84 or 7.00000000000000025e-158 < a Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 68.2%
if -7.89999999999999991e-84 < a < -1.8000000000000001e-287Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.6%
Taylor expanded in z around 0 54.2%
if -1.8000000000000001e-287 < a < 7.00000000000000025e-158Initial program 99.7%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 90.8%
Taylor expanded in z around inf 57.8%
Final simplification64.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.25e-83)
(* a 120.0)
(if (<= a -3.7e-180)
(* 60.0 (/ x (- z t)))
(if (<= a 3.6e-140) (* 60.0 (/ y (- t z))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.25e-83) {
tmp = a * 120.0;
} else if (a <= -3.7e-180) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 3.6e-140) {
tmp = 60.0 * (y / (t - 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) :: tmp
if (a <= (-2.25d-83)) then
tmp = a * 120.0d0
else if (a <= (-3.7d-180)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 3.6d-140) then
tmp = 60.0d0 * (y / (t - 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 tmp;
if (a <= -2.25e-83) {
tmp = a * 120.0;
} else if (a <= -3.7e-180) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 3.6e-140) {
tmp = 60.0 * (y / (t - z));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.25e-83: tmp = a * 120.0 elif a <= -3.7e-180: tmp = 60.0 * (x / (z - t)) elif a <= 3.6e-140: tmp = 60.0 * (y / (t - z)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.25e-83) tmp = Float64(a * 120.0); elseif (a <= -3.7e-180) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 3.6e-140) tmp = Float64(60.0 * Float64(y / Float64(t - z))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.25e-83) tmp = a * 120.0; elseif (a <= -3.7e-180) tmp = 60.0 * (x / (z - t)); elseif (a <= 3.6e-140) tmp = 60.0 * (y / (t - z)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.25e-83], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -3.7e-180], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e-140], N[(60.0 * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.25 \cdot 10^{-83}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -3.7 \cdot 10^{-180}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-140}:\\
\;\;\;\;60 \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.24999999999999999e-83 or 3.6e-140 < a Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 69.0%
if -2.24999999999999999e-83 < a < -3.70000000000000016e-180Initial program 99.6%
associate-/l*99.9%
Simplified99.9%
+-commutative99.9%
fma-define99.9%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 63.1%
if -3.70000000000000016e-180 < a < 3.6e-140Initial program 99.7%
*-commutative99.7%
associate-/l*99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
neg-sub099.5%
associate-+l-99.5%
sub0-neg99.5%
distribute-frac-neg299.5%
distribute-neg-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 51.0%
Final simplification63.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.5e+59) (not (<= x 13000000.0))) (+ (/ (* 60.0 x) (- z t)) (* a 120.0)) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.5e+59) || !(x <= 13000000.0)) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (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 <= (-1.5d+59)) .or. (.not. (x <= 13000000.0d0))) then
tmp = ((60.0d0 * x) / (z - t)) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / (z - t)) + (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 <= -1.5e+59) || !(x <= 13000000.0)) {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.5e+59) or not (x <= 13000000.0): tmp = ((60.0 * x) / (z - t)) + (a * 120.0) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.5e+59) || !(x <= 13000000.0)) tmp = Float64(Float64(Float64(60.0 * x) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.5e+59) || ~((x <= 13000000.0))) tmp = ((60.0 * x) / (z - t)) + (a * 120.0); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.5e+59], N[Not[LessEqual[x, 13000000.0]], $MachinePrecision]], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+59} \lor \neg \left(x \leq 13000000\right):\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -1.5e59 or 1.3e7 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 93.2%
associate-*r/93.2%
Simplified93.2%
if -1.5e59 < x < 1.3e7Initial program 99.8%
Taylor expanded in x around 0 94.4%
Final simplification93.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -7.2e+158) (not (<= x 4.2e+193))) (* 60.0 (/ (- x y) (- z t))) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -7.2e+158) || !(x <= 4.2e+193)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = ((y * -60.0) / (z - t)) + (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 <= (-7.2d+158)) .or. (.not. (x <= 4.2d+193))) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = ((y * (-60.0d0)) / (z - t)) + (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 <= -7.2e+158) || !(x <= 4.2e+193)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -7.2e+158) or not (x <= 4.2e+193): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -7.2e+158) || !(x <= 4.2e+193)) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -7.2e+158) || ~((x <= 4.2e+193))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -7.2e+158], N[Not[LessEqual[x, 4.2e+193]], $MachinePrecision]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+158} \lor \neg \left(x \leq 4.2 \cdot 10^{+193}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -7.19999999999999976e158 or 4.2e193 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 79.7%
if -7.19999999999999976e158 < x < 4.2e193Initial program 99.8%
Taylor expanded in x around 0 86.8%
Final simplification85.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -9e+158) (not (<= x 4.2e+193))) (* 60.0 (/ (- x y) (- z t))) (+ (* y (/ -60.0 (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -9e+158) || !(x <= 4.2e+193)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (y * (-60.0 / (z - t))) + (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+158)) .or. (.not. (x <= 4.2d+193))) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (y * ((-60.0d0) / (z - t))) + (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+158) || !(x <= 4.2e+193)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (y * (-60.0 / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -9e+158) or not (x <= 4.2e+193): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (y * (-60.0 / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -9e+158) || !(x <= 4.2e+193)) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(y * Float64(-60.0 / Float64(z - t))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -9e+158) || ~((x <= 4.2e+193))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (y * (-60.0 / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -9e+158], N[Not[LessEqual[x, 4.2e+193]], $MachinePrecision]], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+158} \lor \neg \left(x \leq 4.2 \cdot 10^{+193}\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -9.00000000000000092e158 or 4.2e193 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 79.7%
if -9.00000000000000092e158 < x < 4.2e193Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 86.8%
associate-*r/86.8%
*-commutative86.8%
*-lft-identity86.8%
times-frac86.8%
/-rgt-identity86.8%
Simplified86.8%
Final simplification85.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.2e-6) (not (<= a 5.6e-14))) (* 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 <= -6.2e-6) || !(a <= 5.6e-14)) {
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 <= (-6.2d-6)) .or. (.not. (a <= 5.6d-14))) 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 <= -6.2e-6) || !(a <= 5.6e-14)) {
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 <= -6.2e-6) or not (a <= 5.6e-14): 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 <= -6.2e-6) || !(a <= 5.6e-14)) 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 <= -6.2e-6) || ~((a <= 5.6e-14))) 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, -6.2e-6], N[Not[LessEqual[a, 5.6e-14]], $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 -6.2 \cdot 10^{-6} \lor \neg \left(a \leq 5.6 \cdot 10^{-14}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -6.1999999999999999e-6 or 5.6000000000000001e-14 < a Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 75.9%
if -6.1999999999999999e-6 < a < 5.6000000000000001e-14Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.3%
Final simplification77.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.15e-84) (not (<= a 4.4e-140))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.15e-84) || !(a <= 4.4e-140)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - 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 <= (-2.15d-84)) .or. (.not. (a <= 4.4d-140))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - 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 <= -2.15e-84) || !(a <= 4.4e-140)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.15e-84) or not (a <= 4.4e-140): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.15e-84) || !(a <= 4.4e-140)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.15e-84) || ~((a <= 4.4e-140))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.15e-84], N[Not[LessEqual[a, 4.4e-140]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.15 \cdot 10^{-84} \lor \neg \left(a \leq 4.4 \cdot 10^{-140}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -2.1500000000000002e-84 or 4.3999999999999998e-140 < a Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 69.0%
if -2.1500000000000002e-84 < a < 4.3999999999999998e-140Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 88.1%
Taylor expanded in z around 0 45.9%
Final simplification60.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.25e+158) (not (<= y 2.65e+144))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.25e+158) || !(y <= 2.65e+144)) {
tmp = -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) :: tmp
if ((y <= (-3.25d+158)) .or. (.not. (y <= 2.65d+144))) then
tmp = (-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 tmp;
if ((y <= -3.25e+158) || !(y <= 2.65e+144)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.25e+158) or not (y <= 2.65e+144): tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.25e+158) || !(y <= 2.65e+144)) tmp = 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) tmp = 0.0; if ((y <= -3.25e+158) || ~((y <= 2.65e+144))) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.25e+158], N[Not[LessEqual[y, 2.65e+144]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.25 \cdot 10^{+158} \lor \neg \left(y \leq 2.65 \cdot 10^{+144}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -3.2500000000000001e158 or 2.6499999999999998e144 < y Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.4%
Taylor expanded in z around inf 53.3%
Taylor expanded in x around 0 47.0%
if -3.2500000000000001e158 < y < 2.6499999999999998e144Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 59.7%
Final simplification56.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -9.5e+159) (not (<= x 8.8e+194))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -9.5e+159) || !(x <= 8.8e+194)) {
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 <= (-9.5d+159)) .or. (.not. (x <= 8.8d+194))) 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 <= -9.5e+159) || !(x <= 8.8e+194)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -9.5e+159) or not (x <= 8.8e+194): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -9.5e+159) || !(x <= 8.8e+194)) 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 <= -9.5e+159) || ~((x <= 8.8e+194))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -9.5e+159], N[Not[LessEqual[x, 8.8e+194]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+159} \lor \neg \left(x \leq 8.8 \cdot 10^{+194}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -9.5000000000000003e159 or 8.8000000000000004e194 < x Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
+-commutative99.8%
fma-define99.8%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 74.2%
Taylor expanded in z around 0 50.5%
if -9.5000000000000003e159 < x < 8.8000000000000004e194Initial program 99.8%
*-commutative99.8%
associate-/l*99.8%
fma-define99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 55.6%
Final simplification54.6%
(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(60.0 * Float64(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[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
fma-define99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
distribute-frac-neg299.7%
distribute-neg-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 49.3%
Final simplification49.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 2024180
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))