
(FPCore (kx ky th) :precision binary64 (* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))
double code(double kx, double ky, double th) {
return (sin(ky) / sqrt((pow(sin(kx), 2.0) + pow(sin(ky), 2.0)))) * sin(th);
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
code = (sin(ky) / sqrt(((sin(kx) ** 2.0d0) + (sin(ky) ** 2.0d0)))) * sin(th)
end function
public static double code(double kx, double ky, double th) {
return (Math.sin(ky) / Math.sqrt((Math.pow(Math.sin(kx), 2.0) + Math.pow(Math.sin(ky), 2.0)))) * Math.sin(th);
}
def code(kx, ky, th): return (math.sin(ky) / math.sqrt((math.pow(math.sin(kx), 2.0) + math.pow(math.sin(ky), 2.0)))) * math.sin(th)
function code(kx, ky, th) return Float64(Float64(sin(ky) / sqrt(Float64((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))) * sin(th)) end
function tmp = code(kx, ky, th) tmp = (sin(ky) / sqrt(((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))) * sin(th); end
code[kx_, ky_, th_] := N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[(N[Power[N[Sin[kx], $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[Sin[ky], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[th], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin ky}{\sqrt{{\sin kx}^{2} + {\sin ky}^{2}}} \cdot \sin th
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (kx ky th) :precision binary64 (* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))
double code(double kx, double ky, double th) {
return (sin(ky) / sqrt((pow(sin(kx), 2.0) + pow(sin(ky), 2.0)))) * sin(th);
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
code = (sin(ky) / sqrt(((sin(kx) ** 2.0d0) + (sin(ky) ** 2.0d0)))) * sin(th)
end function
public static double code(double kx, double ky, double th) {
return (Math.sin(ky) / Math.sqrt((Math.pow(Math.sin(kx), 2.0) + Math.pow(Math.sin(ky), 2.0)))) * Math.sin(th);
}
def code(kx, ky, th): return (math.sin(ky) / math.sqrt((math.pow(math.sin(kx), 2.0) + math.pow(math.sin(ky), 2.0)))) * math.sin(th)
function code(kx, ky, th) return Float64(Float64(sin(ky) / sqrt(Float64((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))) * sin(th)) end
function tmp = code(kx, ky, th) tmp = (sin(ky) / sqrt(((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))) * sin(th); end
code[kx_, ky_, th_] := N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[(N[Power[N[Sin[kx], $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[Sin[ky], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[th], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin ky}{\sqrt{{\sin kx}^{2} + {\sin ky}^{2}}} \cdot \sin th
\end{array}
(FPCore (kx ky th) :precision binary64 (* (/ (sin ky) (hypot (sin ky) (sin kx))) (sin th)))
double code(double kx, double ky, double th) {
return (sin(ky) / hypot(sin(ky), sin(kx))) * sin(th);
}
public static double code(double kx, double ky, double th) {
return (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx))) * Math.sin(th);
}
def code(kx, ky, th): return (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx))) * math.sin(th)
function code(kx, ky, th) return Float64(Float64(sin(ky) / hypot(sin(ky), sin(kx))) * sin(th)) end
function tmp = code(kx, ky, th) tmp = (sin(ky) / hypot(sin(ky), sin(kx))) * sin(th); end
code[kx_, ky_, th_] := N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[Sin[th], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \sin th
\end{array}
Initial program 92.9%
+-commutative92.9%
unpow292.9%
unpow292.9%
hypot-undefine99.7%
Applied egg-rr99.7%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin kx) -0.1)
(/ (* ky (sin th)) (fabs (sin kx)))
(if (<= (sin kx) 2e-204)
(sin th)
(if (<= (sin kx) 2e-14)
(* th (/ (sin ky) (hypot (sin ky) kx)))
(/ (sin ky) (/ (sin kx) (sin th)))))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= -0.1) {
tmp = (ky * sin(th)) / fabs(sin(kx));
} else if (sin(kx) <= 2e-204) {
tmp = sin(th);
} else if (sin(kx) <= 2e-14) {
tmp = th * (sin(ky) / hypot(sin(ky), kx));
} else {
tmp = sin(ky) / (sin(kx) / sin(th));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= -0.1) {
tmp = (ky * Math.sin(th)) / Math.abs(Math.sin(kx));
} else if (Math.sin(kx) <= 2e-204) {
tmp = Math.sin(th);
} else if (Math.sin(kx) <= 2e-14) {
tmp = th * (Math.sin(ky) / Math.hypot(Math.sin(ky), kx));
} else {
tmp = Math.sin(ky) / (Math.sin(kx) / Math.sin(th));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(kx) <= -0.1: tmp = (ky * math.sin(th)) / math.fabs(math.sin(kx)) elif math.sin(kx) <= 2e-204: tmp = math.sin(th) elif math.sin(kx) <= 2e-14: tmp = th * (math.sin(ky) / math.hypot(math.sin(ky), kx)) else: tmp = math.sin(ky) / (math.sin(kx) / math.sin(th)) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(kx) <= -0.1) tmp = Float64(Float64(ky * sin(th)) / abs(sin(kx))); elseif (sin(kx) <= 2e-204) tmp = sin(th); elseif (sin(kx) <= 2e-14) tmp = Float64(th * Float64(sin(ky) / hypot(sin(ky), kx))); else tmp = Float64(sin(ky) / Float64(sin(kx) / sin(th))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(kx) <= -0.1) tmp = (ky * sin(th)) / abs(sin(kx)); elseif (sin(kx) <= 2e-204) tmp = sin(th); elseif (sin(kx) <= 2e-14) tmp = th * (sin(ky) / hypot(sin(ky), kx)); else tmp = sin(ky) / (sin(kx) / sin(th)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[kx], $MachinePrecision], -0.1], N[(N[(ky * N[Sin[th], $MachinePrecision]), $MachinePrecision] / N[Abs[N[Sin[kx], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 2e-204], N[Sin[th], $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 2e-14], N[(th * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[ky], $MachinePrecision] / N[(N[Sin[kx], $MachinePrecision] / N[Sin[th], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin kx \leq -0.1:\\
\;\;\;\;\frac{ky \cdot \sin th}{\left|\sin kx\right|}\\
\mathbf{elif}\;\sin kx \leq 2 \cdot 10^{-204}:\\
\;\;\;\;\sin th\\
\mathbf{elif}\;\sin kx \leq 2 \cdot 10^{-14}:\\
\;\;\;\;th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin ky}{\frac{\sin kx}{\sin th}}\\
\end{array}
\end{array}
if (sin.f64 kx) < -0.10000000000000001Initial program 99.3%
unpow299.3%
sqr-neg99.3%
sin-neg99.3%
sin-neg99.3%
unpow299.3%
associate-*l/99.3%
associate-/l*99.2%
unpow299.2%
Simplified99.3%
Taylor expanded in ky around 0 8.9%
add-sqr-sqrt0.0%
sqrt-unprod59.1%
pow259.1%
Applied egg-rr48.4%
unpow259.1%
rem-sqrt-square59.1%
Simplified48.4%
if -0.10000000000000001 < (sin.f64 kx) < 2e-204Initial program 85.2%
unpow285.2%
sqr-neg85.2%
sin-neg85.2%
sin-neg85.2%
unpow285.2%
associate-*l/81.8%
associate-/l*85.0%
unpow285.0%
Simplified99.7%
Taylor expanded in kx around 0 41.0%
if 2e-204 < (sin.f64 kx) < 2e-14Initial program 88.6%
+-commutative88.6%
unpow288.6%
unpow288.6%
hypot-undefine99.8%
Applied egg-rr99.8%
Taylor expanded in th around 0 67.0%
Taylor expanded in kx around 0 67.0%
if 2e-14 < (sin.f64 kx) Initial program 99.6%
unpow299.6%
sqr-neg99.6%
sin-neg99.6%
sin-neg99.6%
unpow299.6%
associate-*l/99.4%
associate-/l*99.5%
unpow299.5%
Simplified99.5%
clear-num99.4%
un-div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in ky around 0 56.4%
Final simplification50.8%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) -0.0005) (fabs (sin th)) (if (<= (sin ky) 1e-5) (/ (* ky (sin th)) (fabs (sin kx))) (sin th))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= -0.0005) {
tmp = fabs(sin(th));
} else if (sin(ky) <= 1e-5) {
tmp = (ky * sin(th)) / fabs(sin(kx));
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (sin(ky) <= (-0.0005d0)) then
tmp = abs(sin(th))
else if (sin(ky) <= 1d-5) then
tmp = (ky * sin(th)) / abs(sin(kx))
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(ky) <= -0.0005) {
tmp = Math.abs(Math.sin(th));
} else if (Math.sin(ky) <= 1e-5) {
tmp = (ky * Math.sin(th)) / Math.abs(Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= -0.0005: tmp = math.fabs(math.sin(th)) elif math.sin(ky) <= 1e-5: tmp = (ky * math.sin(th)) / math.fabs(math.sin(kx)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= -0.0005) tmp = abs(sin(th)); elseif (sin(ky) <= 1e-5) tmp = Float64(Float64(ky * sin(th)) / abs(sin(kx))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= -0.0005) tmp = abs(sin(th)); elseif (sin(ky) <= 1e-5) tmp = (ky * sin(th)) / abs(sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], -0.0005], N[Abs[N[Sin[th], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[Sin[ky], $MachinePrecision], 1e-5], N[(N[(ky * N[Sin[th], $MachinePrecision]), $MachinePrecision] / N[Abs[N[Sin[kx], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq -0.0005:\\
\;\;\;\;\left|\sin th\right|\\
\mathbf{elif}\;\sin ky \leq 10^{-5}:\\
\;\;\;\;\frac{ky \cdot \sin th}{\left|\sin kx\right|}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < -5.0000000000000001e-4Initial program 99.5%
unpow299.5%
sqr-neg99.5%
sin-neg99.5%
sin-neg99.5%
unpow299.5%
associate-*l/99.5%
associate-/l*99.4%
unpow299.4%
Simplified99.5%
Taylor expanded in kx around 0 2.6%
add-sqr-sqrt0.9%
sqrt-unprod28.8%
pow228.8%
Applied egg-rr28.8%
unpow228.8%
rem-sqrt-square35.4%
associate-*r/35.5%
*-rgt-identity35.5%
times-frac35.5%
/-rgt-identity35.5%
*-inverses35.5%
*-lft-identity35.5%
Simplified35.5%
if -5.0000000000000001e-4 < (sin.f64 ky) < 1.00000000000000008e-5Initial program 85.3%
unpow285.3%
sqr-neg85.3%
sin-neg85.3%
sin-neg85.3%
unpow285.3%
associate-*l/82.0%
associate-/l*85.2%
unpow285.2%
Simplified99.5%
Taylor expanded in ky around 0 41.3%
add-sqr-sqrt37.2%
sqrt-unprod66.2%
pow266.2%
Applied egg-rr65.2%
unpow266.2%
rem-sqrt-square75.8%
Simplified71.8%
if 1.00000000000000008e-5 < (sin.f64 ky) Initial program 99.8%
unpow299.8%
sqr-neg99.8%
sin-neg99.8%
sin-neg99.8%
unpow299.8%
associate-*l/99.7%
associate-/l*99.6%
unpow299.6%
Simplified99.7%
Taylor expanded in kx around 0 60.9%
(FPCore (kx ky th) :precision binary64 (if (<= (sin kx) -0.1) (fabs (* ky (/ (sin th) (sin kx)))) (if (<= (sin kx) 2e-76) (sin th) (* (sin th) (/ (sin ky) (sin kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= -0.1) {
tmp = fabs((ky * (sin(th) / sin(kx))));
} else if (sin(kx) <= 2e-76) {
tmp = sin(th);
} else {
tmp = sin(th) * (sin(ky) / sin(kx));
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (sin(kx) <= (-0.1d0)) then
tmp = abs((ky * (sin(th) / sin(kx))))
else if (sin(kx) <= 2d-76) then
tmp = sin(th)
else
tmp = sin(th) * (sin(ky) / sin(kx))
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= -0.1) {
tmp = Math.abs((ky * (Math.sin(th) / Math.sin(kx))));
} else if (Math.sin(kx) <= 2e-76) {
tmp = Math.sin(th);
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.sin(kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(kx) <= -0.1: tmp = math.fabs((ky * (math.sin(th) / math.sin(kx)))) elif math.sin(kx) <= 2e-76: tmp = math.sin(th) else: tmp = math.sin(th) * (math.sin(ky) / math.sin(kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(kx) <= -0.1) tmp = abs(Float64(ky * Float64(sin(th) / sin(kx)))); elseif (sin(kx) <= 2e-76) tmp = sin(th); else tmp = Float64(sin(th) * Float64(sin(ky) / sin(kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(kx) <= -0.1) tmp = abs((ky * (sin(th) / sin(kx)))); elseif (sin(kx) <= 2e-76) tmp = sin(th); else tmp = sin(th) * (sin(ky) / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[kx], $MachinePrecision], -0.1], N[Abs[N[(ky * N[(N[Sin[th], $MachinePrecision] / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 2e-76], N[Sin[th], $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin kx \leq -0.1:\\
\;\;\;\;\left|ky \cdot \frac{\sin th}{\sin kx}\right|\\
\mathbf{elif}\;\sin kx \leq 2 \cdot 10^{-76}:\\
\;\;\;\;\sin th\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < -0.10000000000000001Initial program 99.3%
unpow299.3%
sqr-neg99.3%
sin-neg99.3%
sin-neg99.3%
unpow299.3%
associate-*l/99.3%
associate-/l*99.2%
unpow299.2%
Simplified99.3%
Taylor expanded in ky around 0 8.9%
add-sqr-sqrt7.1%
sqrt-unprod15.5%
pow215.5%
*-commutative15.5%
associate-/l*15.4%
Applied egg-rr15.4%
unpow215.4%
rem-sqrt-square30.4%
associate-*r/30.4%
associate-*l/30.4%
*-commutative30.4%
Simplified30.4%
if -0.10000000000000001 < (sin.f64 kx) < 1.99999999999999985e-76Initial program 85.0%
unpow285.0%
sqr-neg85.0%
sin-neg85.0%
sin-neg85.0%
unpow285.0%
associate-*l/81.7%
associate-/l*84.9%
unpow284.9%
Simplified99.7%
Taylor expanded in kx around 0 41.7%
if 1.99999999999999985e-76 < (sin.f64 kx) Initial program 99.6%
Taylor expanded in ky around 0 56.7%
Final simplification43.1%
(FPCore (kx ky th)
:precision binary64
(let* ((t_1 (/ (sin th) (sin kx))))
(if (<= (sin kx) -0.1)
(fabs (* ky t_1))
(if (<= (sin kx) 2e-76) (sin th) (* (sin ky) t_1)))))
double code(double kx, double ky, double th) {
double t_1 = sin(th) / sin(kx);
double tmp;
if (sin(kx) <= -0.1) {
tmp = fabs((ky * t_1));
} else if (sin(kx) <= 2e-76) {
tmp = sin(th);
} else {
tmp = sin(ky) * t_1;
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: t_1
real(8) :: tmp
t_1 = sin(th) / sin(kx)
if (sin(kx) <= (-0.1d0)) then
tmp = abs((ky * t_1))
else if (sin(kx) <= 2d-76) then
tmp = sin(th)
else
tmp = sin(ky) * t_1
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double t_1 = Math.sin(th) / Math.sin(kx);
double tmp;
if (Math.sin(kx) <= -0.1) {
tmp = Math.abs((ky * t_1));
} else if (Math.sin(kx) <= 2e-76) {
tmp = Math.sin(th);
} else {
tmp = Math.sin(ky) * t_1;
}
return tmp;
}
def code(kx, ky, th): t_1 = math.sin(th) / math.sin(kx) tmp = 0 if math.sin(kx) <= -0.1: tmp = math.fabs((ky * t_1)) elif math.sin(kx) <= 2e-76: tmp = math.sin(th) else: tmp = math.sin(ky) * t_1 return tmp
function code(kx, ky, th) t_1 = Float64(sin(th) / sin(kx)) tmp = 0.0 if (sin(kx) <= -0.1) tmp = abs(Float64(ky * t_1)); elseif (sin(kx) <= 2e-76) tmp = sin(th); else tmp = Float64(sin(ky) * t_1); end return tmp end
function tmp_2 = code(kx, ky, th) t_1 = sin(th) / sin(kx); tmp = 0.0; if (sin(kx) <= -0.1) tmp = abs((ky * t_1)); elseif (sin(kx) <= 2e-76) tmp = sin(th); else tmp = sin(ky) * t_1; end tmp_2 = tmp; end
code[kx_, ky_, th_] := Block[{t$95$1 = N[(N[Sin[th], $MachinePrecision] / N[Sin[kx], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Sin[kx], $MachinePrecision], -0.1], N[Abs[N[(ky * t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 2e-76], N[Sin[th], $MachinePrecision], N[(N[Sin[ky], $MachinePrecision] * t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\sin th}{\sin kx}\\
\mathbf{if}\;\sin kx \leq -0.1:\\
\;\;\;\;\left|ky \cdot t\_1\right|\\
\mathbf{elif}\;\sin kx \leq 2 \cdot 10^{-76}:\\
\;\;\;\;\sin th\\
\mathbf{else}:\\
\;\;\;\;\sin ky \cdot t\_1\\
\end{array}
\end{array}
if (sin.f64 kx) < -0.10000000000000001Initial program 99.3%
unpow299.3%
sqr-neg99.3%
sin-neg99.3%
sin-neg99.3%
unpow299.3%
associate-*l/99.3%
associate-/l*99.2%
unpow299.2%
Simplified99.3%
Taylor expanded in ky around 0 8.9%
add-sqr-sqrt7.1%
sqrt-unprod15.5%
pow215.5%
*-commutative15.5%
associate-/l*15.4%
Applied egg-rr15.4%
unpow215.4%
rem-sqrt-square30.4%
associate-*r/30.4%
associate-*l/30.4%
*-commutative30.4%
Simplified30.4%
if -0.10000000000000001 < (sin.f64 kx) < 1.99999999999999985e-76Initial program 85.0%
unpow285.0%
sqr-neg85.0%
sin-neg85.0%
sin-neg85.0%
unpow285.0%
associate-*l/81.7%
associate-/l*84.9%
unpow284.9%
Simplified99.7%
Taylor expanded in kx around 0 41.7%
if 1.99999999999999985e-76 < (sin.f64 kx) Initial program 99.6%
unpow299.6%
sqr-neg99.6%
sin-neg99.6%
sin-neg99.6%
unpow299.6%
associate-*l/99.4%
associate-/l*99.5%
unpow299.5%
Simplified99.5%
Taylor expanded in ky around 0 56.7%
(FPCore (kx ky th) :precision binary64 (* (sin ky) (/ (sin th) (hypot (sin ky) (sin kx)))))
double code(double kx, double ky, double th) {
return sin(ky) * (sin(th) / hypot(sin(ky), sin(kx)));
}
public static double code(double kx, double ky, double th) {
return Math.sin(ky) * (Math.sin(th) / Math.hypot(Math.sin(ky), Math.sin(kx)));
}
def code(kx, ky, th): return math.sin(ky) * (math.sin(th) / math.hypot(math.sin(ky), math.sin(kx)))
function code(kx, ky, th) return Float64(sin(ky) * Float64(sin(th) / hypot(sin(ky), sin(kx)))) end
function tmp = code(kx, ky, th) tmp = sin(ky) * (sin(th) / hypot(sin(ky), sin(kx))); end
code[kx_, ky_, th_] := N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}
\end{array}
Initial program 92.9%
unpow292.9%
sqr-neg92.9%
sin-neg92.9%
sin-neg92.9%
unpow292.9%
associate-*l/91.3%
associate-/l*92.8%
unpow292.8%
Simplified99.6%
(FPCore (kx ky th)
:precision binary64
(if (<= th 0.0125)
(* (sin ky) (/ th (hypot (sin ky) (sin kx))))
(if (or (<= th 4.05e+40) (not (<= th 1.65e+137)))
(* (sin ky) (/ (sin th) (fabs (sin ky))))
(/ (sin ky) (/ (fabs (sin kx)) (sin th))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.0125) {
tmp = sin(ky) * (th / hypot(sin(ky), sin(kx)));
} else if ((th <= 4.05e+40) || !(th <= 1.65e+137)) {
tmp = sin(ky) * (sin(th) / fabs(sin(ky)));
} else {
tmp = sin(ky) / (fabs(sin(kx)) / sin(th));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.0125) {
tmp = Math.sin(ky) * (th / Math.hypot(Math.sin(ky), Math.sin(kx)));
} else if ((th <= 4.05e+40) || !(th <= 1.65e+137)) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.abs(Math.sin(ky)));
} else {
tmp = Math.sin(ky) / (Math.abs(Math.sin(kx)) / Math.sin(th));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.0125: tmp = math.sin(ky) * (th / math.hypot(math.sin(ky), math.sin(kx))) elif (th <= 4.05e+40) or not (th <= 1.65e+137): tmp = math.sin(ky) * (math.sin(th) / math.fabs(math.sin(ky))) else: tmp = math.sin(ky) / (math.fabs(math.sin(kx)) / math.sin(th)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.0125) tmp = Float64(sin(ky) * Float64(th / hypot(sin(ky), sin(kx)))); elseif ((th <= 4.05e+40) || !(th <= 1.65e+137)) tmp = Float64(sin(ky) * Float64(sin(th) / abs(sin(ky)))); else tmp = Float64(sin(ky) / Float64(abs(sin(kx)) / sin(th))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.0125) tmp = sin(ky) * (th / hypot(sin(ky), sin(kx))); elseif ((th <= 4.05e+40) || ~((th <= 1.65e+137))) tmp = sin(ky) * (sin(th) / abs(sin(ky))); else tmp = sin(ky) / (abs(sin(kx)) / sin(th)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.0125], N[(N[Sin[ky], $MachinePrecision] * N[(th / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[th, 4.05e+40], N[Not[LessEqual[th, 1.65e+137]], $MachinePrecision]], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Abs[N[Sin[ky], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[ky], $MachinePrecision] / N[(N[Abs[N[Sin[kx], $MachinePrecision]], $MachinePrecision] / N[Sin[th], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.0125:\\
\;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\
\mathbf{elif}\;th \leq 4.05 \cdot 10^{+40} \lor \neg \left(th \leq 1.65 \cdot 10^{+137}\right):\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\left|\sin ky\right|}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin ky}{\frac{\left|\sin kx\right|}{\sin th}}\\
\end{array}
\end{array}
if th < 0.012500000000000001Initial program 91.5%
unpow291.5%
sqr-neg91.5%
sin-neg91.5%
sin-neg91.5%
unpow291.5%
associate-*l/89.4%
associate-/l*91.4%
unpow291.4%
Simplified99.6%
Taylor expanded in th around 0 68.7%
if 0.012500000000000001 < th < 4.0499999999999999e40 or 1.65000000000000001e137 < th Initial program 97.4%
unpow297.4%
sqr-neg97.4%
sin-neg97.4%
sin-neg97.4%
unpow297.4%
associate-*l/97.3%
associate-/l*97.3%
unpow297.3%
Simplified99.5%
Taylor expanded in kx around 0 14.5%
add-sqr-sqrt13.4%
sqrt-prod49.2%
rem-sqrt-square49.6%
Applied egg-rr49.6%
if 4.0499999999999999e40 < th < 1.65000000000000001e137Initial program 95.1%
unpow295.1%
sqr-neg95.1%
sin-neg95.1%
sin-neg95.1%
unpow295.1%
associate-*l/95.3%
associate-/l*95.0%
unpow295.0%
Simplified99.4%
clear-num99.2%
un-div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in ky around 0 20.8%
add-sqr-sqrt18.9%
sqrt-unprod54.4%
pow254.4%
Applied egg-rr54.4%
unpow254.4%
rem-sqrt-square58.9%
Simplified58.9%
Final simplification64.4%
(FPCore (kx ky th)
:precision binary64
(if (<= kx 0.12)
(/ (sin th) (/ (hypot (sin ky) kx) (sin ky)))
(if (<= kx 1.25e+193)
(/ (sin ky) (/ (fabs (sin kx)) (sin th)))
(/ th (/ (hypot (sin ky) (sin kx)) (sin ky))))))
double code(double kx, double ky, double th) {
double tmp;
if (kx <= 0.12) {
tmp = sin(th) / (hypot(sin(ky), kx) / sin(ky));
} else if (kx <= 1.25e+193) {
tmp = sin(ky) / (fabs(sin(kx)) / sin(th));
} else {
tmp = th / (hypot(sin(ky), sin(kx)) / sin(ky));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (kx <= 0.12) {
tmp = Math.sin(th) / (Math.hypot(Math.sin(ky), kx) / Math.sin(ky));
} else if (kx <= 1.25e+193) {
tmp = Math.sin(ky) / (Math.abs(Math.sin(kx)) / Math.sin(th));
} else {
tmp = th / (Math.hypot(Math.sin(ky), Math.sin(kx)) / Math.sin(ky));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if kx <= 0.12: tmp = math.sin(th) / (math.hypot(math.sin(ky), kx) / math.sin(ky)) elif kx <= 1.25e+193: tmp = math.sin(ky) / (math.fabs(math.sin(kx)) / math.sin(th)) else: tmp = th / (math.hypot(math.sin(ky), math.sin(kx)) / math.sin(ky)) return tmp
function code(kx, ky, th) tmp = 0.0 if (kx <= 0.12) tmp = Float64(sin(th) / Float64(hypot(sin(ky), kx) / sin(ky))); elseif (kx <= 1.25e+193) tmp = Float64(sin(ky) / Float64(abs(sin(kx)) / sin(th))); else tmp = Float64(th / Float64(hypot(sin(ky), sin(kx)) / sin(ky))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (kx <= 0.12) tmp = sin(th) / (hypot(sin(ky), kx) / sin(ky)); elseif (kx <= 1.25e+193) tmp = sin(ky) / (abs(sin(kx)) / sin(th)); else tmp = th / (hypot(sin(ky), sin(kx)) / sin(ky)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[kx, 0.12], N[(N[Sin[th], $MachinePrecision] / N[(N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[kx, 1.25e+193], N[(N[Sin[ky], $MachinePrecision] / N[(N[Abs[N[Sin[kx], $MachinePrecision]], $MachinePrecision] / N[Sin[th], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(th / N[(N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;kx \leq 0.12:\\
\;\;\;\;\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin ky, kx\right)}{\sin ky}}\\
\mathbf{elif}\;kx \leq 1.25 \cdot 10^{+193}:\\
\;\;\;\;\frac{\sin ky}{\frac{\left|\sin kx\right|}{\sin th}}\\
\mathbf{else}:\\
\;\;\;\;\frac{th}{\frac{\mathsf{hypot}\left(\sin ky, \sin kx\right)}{\sin ky}}\\
\end{array}
\end{array}
if kx < 0.12Initial program 90.6%
unpow290.6%
sqr-neg90.6%
sin-neg90.6%
sin-neg90.6%
unpow290.6%
associate-*l/88.5%
associate-/l*90.4%
unpow290.4%
Simplified99.6%
associate-*r/93.8%
hypot-undefine88.5%
unpow288.5%
unpow288.5%
+-commutative88.5%
associate-*l/90.6%
*-commutative90.6%
clear-num90.5%
un-div-inv90.5%
+-commutative90.5%
unpow290.5%
unpow290.5%
hypot-undefine99.7%
Applied egg-rr99.7%
Taylor expanded in kx around 0 71.9%
if 0.12 < kx < 1.24999999999999993e193Initial program 99.4%
unpow299.4%
sqr-neg99.4%
sin-neg99.4%
sin-neg99.4%
unpow299.4%
associate-*l/99.3%
associate-/l*99.3%
unpow299.3%
Simplified99.3%
clear-num99.0%
un-div-inv99.3%
Applied egg-rr99.3%
Taylor expanded in ky around 0 29.1%
add-sqr-sqrt26.4%
sqrt-unprod59.1%
pow259.1%
Applied egg-rr59.1%
unpow259.1%
rem-sqrt-square59.1%
Simplified59.1%
if 1.24999999999999993e193 < kx Initial program 99.3%
unpow299.3%
sqr-neg99.3%
sin-neg99.3%
sin-neg99.3%
unpow299.3%
associate-*l/99.2%
associate-/l*99.4%
unpow299.4%
Simplified99.4%
associate-*r/99.3%
hypot-undefine99.2%
unpow299.2%
unpow299.2%
+-commutative99.2%
associate-*l/99.3%
*-commutative99.3%
clear-num99.3%
un-div-inv99.6%
+-commutative99.6%
unpow299.6%
unpow299.6%
hypot-undefine99.7%
Applied egg-rr99.7%
Taylor expanded in th around 0 62.7%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) -0.0005) (fabs (sin th)) (if (<= (sin ky) 5e-119) (* (sin th) (/ ky (sin kx))) (sin th))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= -0.0005) {
tmp = fabs(sin(th));
} else if (sin(ky) <= 5e-119) {
tmp = sin(th) * (ky / sin(kx));
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (sin(ky) <= (-0.0005d0)) then
tmp = abs(sin(th))
else if (sin(ky) <= 5d-119) then
tmp = sin(th) * (ky / sin(kx))
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(ky) <= -0.0005) {
tmp = Math.abs(Math.sin(th));
} else if (Math.sin(ky) <= 5e-119) {
tmp = Math.sin(th) * (ky / Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= -0.0005: tmp = math.fabs(math.sin(th)) elif math.sin(ky) <= 5e-119: tmp = math.sin(th) * (ky / math.sin(kx)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= -0.0005) tmp = abs(sin(th)); elseif (sin(ky) <= 5e-119) tmp = Float64(sin(th) * Float64(ky / sin(kx))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= -0.0005) tmp = abs(sin(th)); elseif (sin(ky) <= 5e-119) tmp = sin(th) * (ky / sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], -0.0005], N[Abs[N[Sin[th], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[Sin[ky], $MachinePrecision], 5e-119], N[(N[Sin[th], $MachinePrecision] * N[(ky / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq -0.0005:\\
\;\;\;\;\left|\sin th\right|\\
\mathbf{elif}\;\sin ky \leq 5 \cdot 10^{-119}:\\
\;\;\;\;\sin th \cdot \frac{ky}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < -5.0000000000000001e-4Initial program 99.5%
unpow299.5%
sqr-neg99.5%
sin-neg99.5%
sin-neg99.5%
unpow299.5%
associate-*l/99.5%
associate-/l*99.4%
unpow299.4%
Simplified99.5%
Taylor expanded in kx around 0 2.6%
add-sqr-sqrt0.9%
sqrt-unprod28.8%
pow228.8%
Applied egg-rr28.8%
unpow228.8%
rem-sqrt-square35.4%
associate-*r/35.5%
*-rgt-identity35.5%
times-frac35.5%
/-rgt-identity35.5%
*-inverses35.5%
*-lft-identity35.5%
Simplified35.5%
if -5.0000000000000001e-4 < (sin.f64 ky) < 4.99999999999999993e-119Initial program 82.3%
Taylor expanded in ky around 0 47.7%
if 4.99999999999999993e-119 < (sin.f64 ky) Initial program 99.7%
unpow299.7%
sqr-neg99.7%
sin-neg99.7%
sin-neg99.7%
unpow299.7%
associate-*l/98.6%
associate-/l*99.6%
unpow299.6%
Simplified99.7%
Taylor expanded in kx around 0 56.7%
Final simplification47.5%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) -0.0005) (fabs (sin th)) (if (<= (sin ky) 5e-119) (* ky (/ (sin th) (sin kx))) (sin th))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= -0.0005) {
tmp = fabs(sin(th));
} else if (sin(ky) <= 5e-119) {
tmp = ky * (sin(th) / sin(kx));
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (sin(ky) <= (-0.0005d0)) then
tmp = abs(sin(th))
else if (sin(ky) <= 5d-119) then
tmp = ky * (sin(th) / sin(kx))
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(ky) <= -0.0005) {
tmp = Math.abs(Math.sin(th));
} else if (Math.sin(ky) <= 5e-119) {
tmp = ky * (Math.sin(th) / Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= -0.0005: tmp = math.fabs(math.sin(th)) elif math.sin(ky) <= 5e-119: tmp = ky * (math.sin(th) / math.sin(kx)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= -0.0005) tmp = abs(sin(th)); elseif (sin(ky) <= 5e-119) tmp = Float64(ky * Float64(sin(th) / sin(kx))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= -0.0005) tmp = abs(sin(th)); elseif (sin(ky) <= 5e-119) tmp = ky * (sin(th) / sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], -0.0005], N[Abs[N[Sin[th], $MachinePrecision]], $MachinePrecision], If[LessEqual[N[Sin[ky], $MachinePrecision], 5e-119], N[(ky * N[(N[Sin[th], $MachinePrecision] / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq -0.0005:\\
\;\;\;\;\left|\sin th\right|\\
\mathbf{elif}\;\sin ky \leq 5 \cdot 10^{-119}:\\
\;\;\;\;ky \cdot \frac{\sin th}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < -5.0000000000000001e-4Initial program 99.5%
unpow299.5%
sqr-neg99.5%
sin-neg99.5%
sin-neg99.5%
unpow299.5%
associate-*l/99.5%
associate-/l*99.4%
unpow299.4%
Simplified99.5%
Taylor expanded in kx around 0 2.6%
add-sqr-sqrt0.9%
sqrt-unprod28.8%
pow228.8%
Applied egg-rr28.8%
unpow228.8%
rem-sqrt-square35.4%
associate-*r/35.5%
*-rgt-identity35.5%
times-frac35.5%
/-rgt-identity35.5%
*-inverses35.5%
*-lft-identity35.5%
Simplified35.5%
if -5.0000000000000001e-4 < (sin.f64 ky) < 4.99999999999999993e-119Initial program 82.3%
unpow282.3%
sqr-neg82.3%
sin-neg82.3%
sin-neg82.3%
unpow282.3%
associate-*l/79.2%
associate-/l*82.1%
unpow282.1%
Simplified99.5%
Taylor expanded in ky around 0 44.8%
associate-/l*47.8%
Simplified47.8%
if 4.99999999999999993e-119 < (sin.f64 ky) Initial program 99.7%
unpow299.7%
sqr-neg99.7%
sin-neg99.7%
sin-neg99.7%
unpow299.7%
associate-*l/98.6%
associate-/l*99.6%
unpow299.6%
Simplified99.7%
Taylor expanded in kx around 0 56.7%
(FPCore (kx ky th) :precision binary64 (if (<= ky 2.8e-5) (* (sin th) (/ (sin ky) (hypot ky (sin kx)))) (* (sin ky) (/ (sin th) (fabs (sin ky))))))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.8e-5) {
tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx)));
} else {
tmp = sin(ky) * (sin(th) / fabs(sin(ky)));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.8e-5) {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(ky, Math.sin(kx)));
} else {
tmp = Math.sin(ky) * (Math.sin(th) / Math.abs(Math.sin(ky)));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 2.8e-5: tmp = math.sin(th) * (math.sin(ky) / math.hypot(ky, math.sin(kx))) else: tmp = math.sin(ky) * (math.sin(th) / math.fabs(math.sin(ky))) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 2.8e-5) tmp = Float64(sin(th) * Float64(sin(ky) / hypot(ky, sin(kx)))); else tmp = Float64(sin(ky) * Float64(sin(th) / abs(sin(ky)))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 2.8e-5) tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx))); else tmp = sin(ky) * (sin(th) / abs(sin(ky))); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 2.8e-5], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[ky ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Abs[N[Sin[ky], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 2.8 \cdot 10^{-5}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(ky, \sin kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\left|\sin ky\right|}\\
\end{array}
\end{array}
if ky < 2.79999999999999996e-5Initial program 90.2%
+-commutative90.2%
unpow290.2%
unpow290.2%
hypot-undefine99.7%
Applied egg-rr99.7%
Taylor expanded in ky around 0 67.4%
if 2.79999999999999996e-5 < ky Initial program 99.6%
unpow299.6%
sqr-neg99.6%
sin-neg99.6%
sin-neg99.6%
unpow299.6%
associate-*l/99.6%
associate-/l*99.6%
unpow299.6%
Simplified99.6%
Taylor expanded in kx around 0 35.2%
add-sqr-sqrt34.0%
sqrt-prod60.7%
rem-sqrt-square60.7%
Applied egg-rr60.7%
Final simplification65.5%
(FPCore (kx ky th) :precision binary64 (if (<= ky 2.8e-5) (* (sin ky) (/ (sin th) (hypot ky (sin kx)))) (* (sin ky) (/ (sin th) (fabs (sin ky))))))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.8e-5) {
tmp = sin(ky) * (sin(th) / hypot(ky, sin(kx)));
} else {
tmp = sin(ky) * (sin(th) / fabs(sin(ky)));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.8e-5) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(ky, Math.sin(kx)));
} else {
tmp = Math.sin(ky) * (Math.sin(th) / Math.abs(Math.sin(ky)));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 2.8e-5: tmp = math.sin(ky) * (math.sin(th) / math.hypot(ky, math.sin(kx))) else: tmp = math.sin(ky) * (math.sin(th) / math.fabs(math.sin(ky))) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 2.8e-5) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(ky, sin(kx)))); else tmp = Float64(sin(ky) * Float64(sin(th) / abs(sin(ky)))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 2.8e-5) tmp = sin(ky) * (sin(th) / hypot(ky, sin(kx))); else tmp = sin(ky) * (sin(th) / abs(sin(ky))); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 2.8e-5], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[ky ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Abs[N[Sin[ky], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 2.8 \cdot 10^{-5}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(ky, \sin kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\left|\sin ky\right|}\\
\end{array}
\end{array}
if ky < 2.79999999999999996e-5Initial program 90.2%
unpow290.2%
sqr-neg90.2%
sin-neg90.2%
sin-neg90.2%
unpow290.2%
associate-*l/88.0%
associate-/l*90.1%
unpow290.1%
Simplified99.5%
Taylor expanded in ky around 0 67.3%
if 2.79999999999999996e-5 < ky Initial program 99.6%
unpow299.6%
sqr-neg99.6%
sin-neg99.6%
sin-neg99.6%
unpow299.6%
associate-*l/99.6%
associate-/l*99.6%
unpow299.6%
Simplified99.6%
Taylor expanded in kx around 0 35.2%
add-sqr-sqrt34.0%
sqrt-prod60.7%
rem-sqrt-square60.7%
Applied egg-rr60.7%
(FPCore (kx ky th) :precision binary64 (if (<= kx 4.2e-30) (* (sin ky) (/ (sin th) (fabs (sin ky)))) (/ (sin ky) (/ (fabs (sin kx)) (sin th)))))
double code(double kx, double ky, double th) {
double tmp;
if (kx <= 4.2e-30) {
tmp = sin(ky) * (sin(th) / fabs(sin(ky)));
} else {
tmp = sin(ky) / (fabs(sin(kx)) / sin(th));
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (kx <= 4.2d-30) then
tmp = sin(ky) * (sin(th) / abs(sin(ky)))
else
tmp = sin(ky) / (abs(sin(kx)) / sin(th))
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (kx <= 4.2e-30) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.abs(Math.sin(ky)));
} else {
tmp = Math.sin(ky) / (Math.abs(Math.sin(kx)) / Math.sin(th));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if kx <= 4.2e-30: tmp = math.sin(ky) * (math.sin(th) / math.fabs(math.sin(ky))) else: tmp = math.sin(ky) / (math.fabs(math.sin(kx)) / math.sin(th)) return tmp
function code(kx, ky, th) tmp = 0.0 if (kx <= 4.2e-30) tmp = Float64(sin(ky) * Float64(sin(th) / abs(sin(ky)))); else tmp = Float64(sin(ky) / Float64(abs(sin(kx)) / sin(th))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (kx <= 4.2e-30) tmp = sin(ky) * (sin(th) / abs(sin(ky))); else tmp = sin(ky) / (abs(sin(kx)) / sin(th)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[kx, 4.2e-30], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Abs[N[Sin[ky], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[ky], $MachinePrecision] / N[(N[Abs[N[Sin[kx], $MachinePrecision]], $MachinePrecision] / N[Sin[th], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;kx \leq 4.2 \cdot 10^{-30}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\left|\sin ky\right|}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin ky}{\frac{\left|\sin kx\right|}{\sin th}}\\
\end{array}
\end{array}
if kx < 4.2000000000000004e-30Initial program 90.4%
unpow290.4%
sqr-neg90.4%
sin-neg90.4%
sin-neg90.4%
unpow290.4%
associate-*l/88.2%
associate-/l*90.2%
unpow290.2%
Simplified99.6%
Taylor expanded in kx around 0 29.7%
add-sqr-sqrt28.1%
sqrt-prod51.3%
rem-sqrt-square54.8%
Applied egg-rr54.8%
if 4.2000000000000004e-30 < kx Initial program 99.4%
unpow299.4%
sqr-neg99.4%
sin-neg99.4%
sin-neg99.4%
unpow299.4%
associate-*l/99.3%
associate-/l*99.3%
unpow299.3%
Simplified99.4%
clear-num99.2%
un-div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in ky around 0 30.7%
add-sqr-sqrt27.0%
sqrt-unprod56.4%
pow256.4%
Applied egg-rr56.4%
unpow256.4%
rem-sqrt-square56.4%
Simplified56.4%
(FPCore (kx ky th) :precision binary64 (if (<= ky 1.4e-5) (/ (* ky (sin th)) (fabs (sin kx))) (* (sin ky) (/ (sin th) (fabs (sin ky))))))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 1.4e-5) {
tmp = (ky * sin(th)) / fabs(sin(kx));
} else {
tmp = sin(ky) * (sin(th) / fabs(sin(ky)));
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (ky <= 1.4d-5) then
tmp = (ky * sin(th)) / abs(sin(kx))
else
tmp = sin(ky) * (sin(th) / abs(sin(ky)))
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 1.4e-5) {
tmp = (ky * Math.sin(th)) / Math.abs(Math.sin(kx));
} else {
tmp = Math.sin(ky) * (Math.sin(th) / Math.abs(Math.sin(ky)));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 1.4e-5: tmp = (ky * math.sin(th)) / math.fabs(math.sin(kx)) else: tmp = math.sin(ky) * (math.sin(th) / math.fabs(math.sin(ky))) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 1.4e-5) tmp = Float64(Float64(ky * sin(th)) / abs(sin(kx))); else tmp = Float64(sin(ky) * Float64(sin(th) / abs(sin(ky)))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 1.4e-5) tmp = (ky * sin(th)) / abs(sin(kx)); else tmp = sin(ky) * (sin(th) / abs(sin(ky))); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 1.4e-5], N[(N[(ky * N[Sin[th], $MachinePrecision]), $MachinePrecision] / N[Abs[N[Sin[kx], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Abs[N[Sin[ky], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 1.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{ky \cdot \sin th}{\left|\sin kx\right|}\\
\mathbf{else}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\left|\sin ky\right|}\\
\end{array}
\end{array}
if ky < 1.39999999999999998e-5Initial program 90.2%
unpow290.2%
sqr-neg90.2%
sin-neg90.2%
sin-neg90.2%
unpow290.2%
associate-*l/88.0%
associate-/l*90.1%
unpow290.1%
Simplified99.5%
Taylor expanded in ky around 0 28.2%
add-sqr-sqrt26.7%
sqrt-unprod48.6%
pow248.6%
Applied egg-rr43.9%
unpow248.6%
rem-sqrt-square54.9%
Simplified48.3%
if 1.39999999999999998e-5 < ky Initial program 99.6%
unpow299.6%
sqr-neg99.6%
sin-neg99.6%
sin-neg99.6%
unpow299.6%
associate-*l/99.6%
associate-/l*99.6%
unpow299.6%
Simplified99.6%
Taylor expanded in kx around 0 35.2%
add-sqr-sqrt34.0%
sqrt-prod60.7%
rem-sqrt-square60.7%
Applied egg-rr60.7%
(FPCore (kx ky th) :precision binary64 (if (<= ky 2e-135) (* ky (/ (sin th) kx)) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2e-135) {
tmp = ky * (sin(th) / kx);
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (ky <= 2d-135) then
tmp = ky * (sin(th) / kx)
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2e-135) {
tmp = ky * (Math.sin(th) / kx);
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 2e-135: tmp = ky * (math.sin(th) / kx) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 2e-135) tmp = Float64(ky * Float64(sin(th) / kx)); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 2e-135) tmp = ky * (sin(th) / kx); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 2e-135], N[(ky * N[(N[Sin[th], $MachinePrecision] / kx), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 2 \cdot 10^{-135}:\\
\;\;\;\;ky \cdot \frac{\sin th}{kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 2.0000000000000001e-135Initial program 88.8%
unpow288.8%
sqr-neg88.8%
sin-neg88.8%
sin-neg88.8%
unpow288.8%
associate-*l/86.9%
associate-/l*88.7%
unpow288.7%
Simplified99.5%
Taylor expanded in ky around 0 29.1%
Taylor expanded in kx around 0 20.7%
associate-/l*22.5%
Simplified22.5%
if 2.0000000000000001e-135 < ky Initial program 99.6%
unpow299.6%
sqr-neg99.6%
sin-neg99.6%
sin-neg99.6%
unpow299.6%
associate-*l/98.7%
associate-/l*99.5%
unpow299.5%
Simplified99.6%
Taylor expanded in kx around 0 36.1%
(FPCore (kx ky th) :precision binary64 (if (<= ky 2.1e-144) (* ky (/ th (sin kx))) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.1e-144) {
tmp = ky * (th / sin(kx));
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (ky <= 2.1d-144) then
tmp = ky * (th / sin(kx))
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.1e-144) {
tmp = ky * (th / Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 2.1e-144: tmp = ky * (th / math.sin(kx)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 2.1e-144) tmp = Float64(ky * Float64(th / sin(kx))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 2.1e-144) tmp = ky * (th / sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 2.1e-144], N[(ky * N[(th / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 2.1 \cdot 10^{-144}:\\
\;\;\;\;ky \cdot \frac{th}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 2.1000000000000001e-144Initial program 88.7%
unpow288.7%
sqr-neg88.7%
sin-neg88.7%
sin-neg88.7%
unpow288.7%
associate-*l/86.7%
associate-/l*88.5%
unpow288.5%
Simplified99.5%
Taylor expanded in ky around 0 28.8%
Taylor expanded in th around 0 18.4%
associate-/l*20.2%
Simplified20.2%
if 2.1000000000000001e-144 < ky Initial program 99.6%
unpow299.6%
sqr-neg99.6%
sin-neg99.6%
sin-neg99.6%
unpow299.6%
associate-*l/98.7%
associate-/l*99.6%
unpow299.6%
Simplified99.6%
Taylor expanded in kx around 0 35.9%
(FPCore (kx ky th) :precision binary64 (if (<= ky 4e-203) (+ (+ th 1.0) -1.0) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 4e-203) {
tmp = (th + 1.0) + -1.0;
} else {
tmp = sin(th);
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (ky <= 4d-203) then
tmp = (th + 1.0d0) + (-1.0d0)
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 4e-203) {
tmp = (th + 1.0) + -1.0;
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 4e-203: tmp = (th + 1.0) + -1.0 else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 4e-203) tmp = Float64(Float64(th + 1.0) + -1.0); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 4e-203) tmp = (th + 1.0) + -1.0; else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 4e-203], N[(N[(th + 1.0), $MachinePrecision] + -1.0), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 4 \cdot 10^{-203}:\\
\;\;\;\;\left(th + 1\right) + -1\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 4.0000000000000001e-203Initial program 89.3%
unpow289.3%
sqr-neg89.3%
sin-neg89.3%
sin-neg89.3%
unpow289.3%
associate-*l/87.3%
associate-/l*89.2%
unpow289.2%
Simplified99.5%
Taylor expanded in kx around 0 14.8%
expm1-log1p-u14.8%
expm1-undefine17.5%
Applied egg-rr17.5%
expm1-define14.8%
associate-*r/21.3%
*-rgt-identity21.3%
times-frac14.8%
/-rgt-identity14.8%
*-inverses14.8%
*-lft-identity14.8%
Simplified14.8%
expm1-undefine17.5%
log1p-undefine17.5%
rem-exp-log17.5%
+-commutative17.5%
Applied egg-rr17.5%
Taylor expanded in th around 0 12.5%
+-commutative12.5%
Simplified12.5%
if 4.0000000000000001e-203 < ky Initial program 97.8%
unpow297.8%
sqr-neg97.8%
sin-neg97.8%
sin-neg97.8%
unpow297.8%
associate-*l/96.9%
associate-/l*97.8%
unpow297.8%
Simplified99.6%
Taylor expanded in kx around 0 35.1%
Final simplification22.0%
(FPCore (kx ky th) :precision binary64 (if (<= kx 2.6e-46) th (+ (+ th 1.0) -1.0)))
double code(double kx, double ky, double th) {
double tmp;
if (kx <= 2.6e-46) {
tmp = th;
} else {
tmp = (th + 1.0) + -1.0;
}
return tmp;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
real(8) :: tmp
if (kx <= 2.6d-46) then
tmp = th
else
tmp = (th + 1.0d0) + (-1.0d0)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (kx <= 2.6e-46) {
tmp = th;
} else {
tmp = (th + 1.0) + -1.0;
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if kx <= 2.6e-46: tmp = th else: tmp = (th + 1.0) + -1.0 return tmp
function code(kx, ky, th) tmp = 0.0 if (kx <= 2.6e-46) tmp = th; else tmp = Float64(Float64(th + 1.0) + -1.0); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (kx <= 2.6e-46) tmp = th; else tmp = (th + 1.0) + -1.0; end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[kx, 2.6e-46], th, N[(N[(th + 1.0), $MachinePrecision] + -1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;kx \leq 2.6 \cdot 10^{-46}:\\
\;\;\;\;th\\
\mathbf{else}:\\
\;\;\;\;\left(th + 1\right) + -1\\
\end{array}
\end{array}
if kx < 2.6000000000000002e-46Initial program 90.3%
unpow290.3%
sqr-neg90.3%
sin-neg90.3%
sin-neg90.3%
unpow290.3%
associate-*l/88.1%
associate-/l*90.1%
unpow290.1%
Simplified99.6%
Taylor expanded in kx around 0 29.4%
Taylor expanded in th around 0 18.7%
if 2.6000000000000002e-46 < kx Initial program 99.4%
unpow299.4%
sqr-neg99.4%
sin-neg99.4%
sin-neg99.4%
unpow299.4%
associate-*l/99.3%
associate-/l*99.3%
unpow299.3%
Simplified99.4%
Taylor expanded in kx around 0 8.4%
expm1-log1p-u8.4%
expm1-undefine14.3%
Applied egg-rr14.3%
expm1-define8.4%
associate-*r/14.8%
*-rgt-identity14.8%
times-frac8.4%
/-rgt-identity8.4%
*-inverses8.4%
*-lft-identity8.4%
Simplified8.4%
expm1-undefine14.3%
log1p-undefine14.3%
rem-exp-log14.3%
+-commutative14.3%
Applied egg-rr14.3%
Taylor expanded in th around 0 12.0%
+-commutative12.0%
Simplified12.0%
Final simplification16.7%
(FPCore (kx ky th) :precision binary64 th)
double code(double kx, double ky, double th) {
return th;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
code = th
end function
public static double code(double kx, double ky, double th) {
return th;
}
def code(kx, ky, th): return th
function code(kx, ky, th) return th end
function tmp = code(kx, ky, th) tmp = th; end
code[kx_, ky_, th_] := th
\begin{array}{l}
\\
th
\end{array}
Initial program 92.9%
unpow292.9%
sqr-neg92.9%
sin-neg92.9%
sin-neg92.9%
unpow292.9%
associate-*l/91.3%
associate-/l*92.8%
unpow292.8%
Simplified99.6%
Taylor expanded in kx around 0 23.4%
Taylor expanded in th around 0 15.0%
herbie shell --seed 2024135
(FPCore (kx ky th)
:name "Toniolo and Linder, Equation (3b), real"
:precision binary64
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2.0) (pow (sin ky) 2.0)))) (sin th)))