
(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 23 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 kx) (sin ky))) (sin th)))
double code(double kx, double ky, double th) {
return (sin(ky) / hypot(sin(kx), sin(ky))) * sin(th);
}
public static double code(double kx, double ky, double th) {
return (Math.sin(ky) / Math.hypot(Math.sin(kx), Math.sin(ky))) * Math.sin(th);
}
def code(kx, ky, th): return (math.sin(ky) / math.hypot(math.sin(kx), math.sin(ky))) * math.sin(th)
function code(kx, ky, th) return Float64(Float64(sin(ky) / hypot(sin(kx), sin(ky))) * sin(th)) end
function tmp = code(kx, ky, th) tmp = (sin(ky) / hypot(sin(kx), sin(ky))) * sin(th); end
code[kx_, ky_, th_] := N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[Sin[th], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin ky}{\mathsf{hypot}\left(\sin kx, \sin ky\right)} \cdot \sin th
\end{array}
Initial program 95.6%
Taylor expanded in kx around inf
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin kx) -0.005)
(*
(/ (sin ky) (hypot (sin ky) (sin kx)))
(/ 1.0 (/ (+ 1.0 (* (* th th) 0.16666666666666666)) th)))
(if (<= (sin kx) 0.002)
(/
(sin ky)
(/
(hypot (sin ky) (* kx (+ 1.0 (* kx (* kx -0.16666666666666666)))))
(sin th)))
(* (sin th) (/ (sin ky) (sin kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= -0.005) {
tmp = (sin(ky) / hypot(sin(ky), sin(kx))) * (1.0 / ((1.0 + ((th * th) * 0.16666666666666666)) / th));
} else if (sin(kx) <= 0.002) {
tmp = sin(ky) / (hypot(sin(ky), (kx * (1.0 + (kx * (kx * -0.16666666666666666))))) / sin(th));
} else {
tmp = sin(th) * (sin(ky) / sin(kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= -0.005) {
tmp = (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx))) * (1.0 / ((1.0 + ((th * th) * 0.16666666666666666)) / th));
} else if (Math.sin(kx) <= 0.002) {
tmp = Math.sin(ky) / (Math.hypot(Math.sin(ky), (kx * (1.0 + (kx * (kx * -0.16666666666666666))))) / 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.005: tmp = (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx))) * (1.0 / ((1.0 + ((th * th) * 0.16666666666666666)) / th)) elif math.sin(kx) <= 0.002: tmp = math.sin(ky) / (math.hypot(math.sin(ky), (kx * (1.0 + (kx * (kx * -0.16666666666666666))))) / 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.005) tmp = Float64(Float64(sin(ky) / hypot(sin(ky), sin(kx))) * Float64(1.0 / Float64(Float64(1.0 + Float64(Float64(th * th) * 0.16666666666666666)) / th))); elseif (sin(kx) <= 0.002) tmp = Float64(sin(ky) / Float64(hypot(sin(ky), Float64(kx * Float64(1.0 + Float64(kx * Float64(kx * -0.16666666666666666))))) / 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.005) tmp = (sin(ky) / hypot(sin(ky), sin(kx))) * (1.0 / ((1.0 + ((th * th) * 0.16666666666666666)) / th)); elseif (sin(kx) <= 0.002) tmp = sin(ky) / (hypot(sin(ky), (kx * (1.0 + (kx * (kx * -0.16666666666666666))))) / 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.005], N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(1.0 + N[(N[(th * th), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] / th), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 0.002], N[(N[Sin[ky], $MachinePrecision] / N[(N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[(kx * N[(1.0 + N[(kx * N[(kx * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] / N[Sin[th], $MachinePrecision]), $MachinePrecision]), $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.005:\\
\;\;\;\;\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \frac{1}{\frac{1 + \left(th \cdot th\right) \cdot 0.16666666666666666}{th}}\\
\mathbf{elif}\;\sin kx \leq 0.002:\\
\;\;\;\;\frac{\sin ky}{\frac{\mathsf{hypot}\left(\sin ky, kx \cdot \left(1 + kx \cdot \left(kx \cdot -0.16666666666666666\right)\right)\right)}{\sin th}}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < -0.0050000000000000001Initial program 99.4%
Taylor expanded in kx around inf
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Simplified99.4%
associate-*l/N/A
hypot-defineN/A
unpow1N/A
metadata-evalN/A
pow-powN/A
hypot-defineN/A
+-commutativeN/A
associate-*r/N/A
clear-numN/A
associate-*r/N/A
Applied egg-rr99.3%
Taylor expanded in th around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.3%
Simplified54.3%
if -0.0050000000000000001 < (sin.f64 kx) < 2e-3Initial program 91.9%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
Taylor expanded in kx around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.7%
Simplified99.7%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.8%
if 2e-3 < (sin.f64 kx) Initial program 99.4%
Taylor expanded in ky around 0
sin-lowering-sin.f6463.1%
Simplified63.1%
Final simplification79.0%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin kx) -0.005)
(* (/ (sin ky) (hypot (sin kx) (sin ky))) th)
(if (<= (sin kx) 0.002)
(/
(sin ky)
(/
(hypot (sin ky) (* kx (+ 1.0 (* kx (* kx -0.16666666666666666)))))
(sin th)))
(* (sin th) (/ (sin ky) (sin kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= -0.005) {
tmp = (sin(ky) / hypot(sin(kx), sin(ky))) * th;
} else if (sin(kx) <= 0.002) {
tmp = sin(ky) / (hypot(sin(ky), (kx * (1.0 + (kx * (kx * -0.16666666666666666))))) / sin(th));
} else {
tmp = sin(th) * (sin(ky) / sin(kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= -0.005) {
tmp = (Math.sin(ky) / Math.hypot(Math.sin(kx), Math.sin(ky))) * th;
} else if (Math.sin(kx) <= 0.002) {
tmp = Math.sin(ky) / (Math.hypot(Math.sin(ky), (kx * (1.0 + (kx * (kx * -0.16666666666666666))))) / 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.005: tmp = (math.sin(ky) / math.hypot(math.sin(kx), math.sin(ky))) * th elif math.sin(kx) <= 0.002: tmp = math.sin(ky) / (math.hypot(math.sin(ky), (kx * (1.0 + (kx * (kx * -0.16666666666666666))))) / 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.005) tmp = Float64(Float64(sin(ky) / hypot(sin(kx), sin(ky))) * th); elseif (sin(kx) <= 0.002) tmp = Float64(sin(ky) / Float64(hypot(sin(ky), Float64(kx * Float64(1.0 + Float64(kx * Float64(kx * -0.16666666666666666))))) / 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.005) tmp = (sin(ky) / hypot(sin(kx), sin(ky))) * th; elseif (sin(kx) <= 0.002) tmp = sin(ky) / (hypot(sin(ky), (kx * (1.0 + (kx * (kx * -0.16666666666666666))))) / 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.005], N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * th), $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 0.002], N[(N[Sin[ky], $MachinePrecision] / N[(N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[(kx * N[(1.0 + N[(kx * N[(kx * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision] / N[Sin[th], $MachinePrecision]), $MachinePrecision]), $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.005:\\
\;\;\;\;\frac{\sin ky}{\mathsf{hypot}\left(\sin kx, \sin ky\right)} \cdot th\\
\mathbf{elif}\;\sin kx \leq 0.002:\\
\;\;\;\;\frac{\sin ky}{\frac{\mathsf{hypot}\left(\sin ky, kx \cdot \left(1 + kx \cdot \left(kx \cdot -0.16666666666666666\right)\right)\right)}{\sin th}}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < -0.0050000000000000001Initial program 99.4%
Taylor expanded in kx around inf
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Simplified99.4%
Taylor expanded in th around 0
Simplified53.5%
if -0.0050000000000000001 < (sin.f64 kx) < 2e-3Initial program 91.9%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
Taylor expanded in kx around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.7%
Simplified99.7%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.8%
if 2e-3 < (sin.f64 kx) Initial program 99.4%
Taylor expanded in ky around 0
sin-lowering-sin.f6463.1%
Simplified63.1%
Final simplification78.8%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin kx) -0.005)
(* (/ (sin ky) (hypot (sin kx) (sin ky))) th)
(if (<= (sin kx) 0.002)
(*
(sin ky)
(/
(sin th)
(hypot (sin ky) (* kx (+ 1.0 (* -0.16666666666666666 (* kx kx)))))))
(* (sin th) (/ (sin ky) (sin kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= -0.005) {
tmp = (sin(ky) / hypot(sin(kx), sin(ky))) * th;
} else if (sin(kx) <= 0.002) {
tmp = sin(ky) * (sin(th) / hypot(sin(ky), (kx * (1.0 + (-0.16666666666666666 * (kx * kx))))));
} else {
tmp = sin(th) * (sin(ky) / sin(kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= -0.005) {
tmp = (Math.sin(ky) / Math.hypot(Math.sin(kx), Math.sin(ky))) * th;
} else if (Math.sin(kx) <= 0.002) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(Math.sin(ky), (kx * (1.0 + (-0.16666666666666666 * (kx * kx))))));
} 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.005: tmp = (math.sin(ky) / math.hypot(math.sin(kx), math.sin(ky))) * th elif math.sin(kx) <= 0.002: tmp = math.sin(ky) * (math.sin(th) / math.hypot(math.sin(ky), (kx * (1.0 + (-0.16666666666666666 * (kx * kx)))))) 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.005) tmp = Float64(Float64(sin(ky) / hypot(sin(kx), sin(ky))) * th); elseif (sin(kx) <= 0.002) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(sin(ky), Float64(kx * Float64(1.0 + Float64(-0.16666666666666666 * Float64(kx * kx))))))); 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.005) tmp = (sin(ky) / hypot(sin(kx), sin(ky))) * th; elseif (sin(kx) <= 0.002) tmp = sin(ky) * (sin(th) / hypot(sin(ky), (kx * (1.0 + (-0.16666666666666666 * (kx * kx)))))); else tmp = sin(th) * (sin(ky) / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[kx], $MachinePrecision], -0.005], N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * th), $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 0.002], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[(kx * N[(1.0 + N[(-0.16666666666666666 * N[(kx * kx), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $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.005:\\
\;\;\;\;\frac{\sin ky}{\mathsf{hypot}\left(\sin kx, \sin ky\right)} \cdot th\\
\mathbf{elif}\;\sin kx \leq 0.002:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, kx \cdot \left(1 + -0.16666666666666666 \cdot \left(kx \cdot kx\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < -0.0050000000000000001Initial program 99.4%
Taylor expanded in kx around inf
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Simplified99.4%
Taylor expanded in th around 0
Simplified53.5%
if -0.0050000000000000001 < (sin.f64 kx) < 2e-3Initial program 91.9%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
Taylor expanded in kx around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.7%
Simplified99.7%
if 2e-3 < (sin.f64 kx) Initial program 99.4%
Taylor expanded in ky around 0
sin-lowering-sin.f6463.1%
Simplified63.1%
Final simplification78.7%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin kx) -0.005)
(* (/ (sin ky) (hypot (sin kx) (sin ky))) th)
(if (<= (sin kx) 0.002)
(* (sin th) (/ (sin ky) (hypot kx (sin ky))))
(* (sin th) (/ (sin ky) (sin kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= -0.005) {
tmp = (sin(ky) / hypot(sin(kx), sin(ky))) * th;
} else if (sin(kx) <= 0.002) {
tmp = sin(th) * (sin(ky) / hypot(kx, sin(ky)));
} else {
tmp = sin(th) * (sin(ky) / sin(kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= -0.005) {
tmp = (Math.sin(ky) / Math.hypot(Math.sin(kx), Math.sin(ky))) * th;
} else if (Math.sin(kx) <= 0.002) {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(kx, Math.sin(ky)));
} 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.005: tmp = (math.sin(ky) / math.hypot(math.sin(kx), math.sin(ky))) * th elif math.sin(kx) <= 0.002: tmp = math.sin(th) * (math.sin(ky) / math.hypot(kx, math.sin(ky))) 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.005) tmp = Float64(Float64(sin(ky) / hypot(sin(kx), sin(ky))) * th); elseif (sin(kx) <= 0.002) tmp = Float64(sin(th) * Float64(sin(ky) / hypot(kx, sin(ky)))); 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.005) tmp = (sin(ky) / hypot(sin(kx), sin(ky))) * th; elseif (sin(kx) <= 0.002) tmp = sin(th) * (sin(ky) / hypot(kx, sin(ky))); else tmp = sin(th) * (sin(ky) / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[kx], $MachinePrecision], -0.005], N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * th), $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 0.002], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[kx ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $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.005:\\
\;\;\;\;\frac{\sin ky}{\mathsf{hypot}\left(\sin kx, \sin ky\right)} \cdot th\\
\mathbf{elif}\;\sin kx \leq 0.002:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(kx, \sin ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < -0.0050000000000000001Initial program 99.4%
Taylor expanded in kx around inf
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Simplified99.4%
Taylor expanded in th around 0
Simplified53.5%
if -0.0050000000000000001 < (sin.f64 kx) < 2e-3Initial program 91.9%
Taylor expanded in kx around inf
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Taylor expanded in kx around 0
Simplified99.7%
if 2e-3 < (sin.f64 kx) Initial program 99.4%
Taylor expanded in ky around 0
sin-lowering-sin.f6463.1%
Simplified63.1%
Final simplification78.7%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin kx) -0.005)
(* (sin ky) (/ th (hypot (sin ky) (sin kx))))
(if (<= (sin kx) 0.002)
(* (sin th) (/ (sin ky) (hypot kx (sin ky))))
(* (sin th) (/ (sin ky) (sin kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= -0.005) {
tmp = sin(ky) * (th / hypot(sin(ky), sin(kx)));
} else if (sin(kx) <= 0.002) {
tmp = sin(th) * (sin(ky) / hypot(kx, sin(ky)));
} else {
tmp = sin(th) * (sin(ky) / sin(kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= -0.005) {
tmp = Math.sin(ky) * (th / Math.hypot(Math.sin(ky), Math.sin(kx)));
} else if (Math.sin(kx) <= 0.002) {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(kx, Math.sin(ky)));
} 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.005: tmp = math.sin(ky) * (th / math.hypot(math.sin(ky), math.sin(kx))) elif math.sin(kx) <= 0.002: tmp = math.sin(th) * (math.sin(ky) / math.hypot(kx, math.sin(ky))) 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.005) tmp = Float64(sin(ky) * Float64(th / hypot(sin(ky), sin(kx)))); elseif (sin(kx) <= 0.002) tmp = Float64(sin(th) * Float64(sin(ky) / hypot(kx, sin(ky)))); 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.005) tmp = sin(ky) * (th / hypot(sin(ky), sin(kx))); elseif (sin(kx) <= 0.002) tmp = sin(th) * (sin(ky) / hypot(kx, sin(ky))); else tmp = sin(th) * (sin(ky) / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[kx], $MachinePrecision], -0.005], N[(N[Sin[ky], $MachinePrecision] * N[(th / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 0.002], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[kx ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $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.005:\\
\;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\
\mathbf{elif}\;\sin kx \leq 0.002:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(kx, \sin ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < -0.0050000000000000001Initial program 99.4%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Simplified99.4%
Taylor expanded in th around 0
Simplified53.5%
if -0.0050000000000000001 < (sin.f64 kx) < 2e-3Initial program 91.9%
Taylor expanded in kx around inf
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Taylor expanded in kx around 0
Simplified99.7%
if 2e-3 < (sin.f64 kx) Initial program 99.4%
Taylor expanded in ky around 0
sin-lowering-sin.f6463.1%
Simplified63.1%
Final simplification78.7%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin kx) -0.005)
(* (sin ky) (/ th (hypot (sin ky) (sin kx))))
(if (<= (sin kx) 0.002)
(* (sin ky) (/ (sin th) (hypot (sin ky) kx)))
(* (sin th) (/ (sin ky) (sin kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= -0.005) {
tmp = sin(ky) * (th / hypot(sin(ky), sin(kx)));
} else if (sin(kx) <= 0.002) {
tmp = sin(ky) * (sin(th) / hypot(sin(ky), kx));
} else {
tmp = sin(th) * (sin(ky) / sin(kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= -0.005) {
tmp = Math.sin(ky) * (th / Math.hypot(Math.sin(ky), Math.sin(kx)));
} else if (Math.sin(kx) <= 0.002) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(Math.sin(ky), kx));
} 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.005: tmp = math.sin(ky) * (th / math.hypot(math.sin(ky), math.sin(kx))) elif math.sin(kx) <= 0.002: tmp = math.sin(ky) * (math.sin(th) / math.hypot(math.sin(ky), kx)) 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.005) tmp = Float64(sin(ky) * Float64(th / hypot(sin(ky), sin(kx)))); elseif (sin(kx) <= 0.002) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(sin(ky), kx))); 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.005) tmp = sin(ky) * (th / hypot(sin(ky), sin(kx))); elseif (sin(kx) <= 0.002) tmp = sin(ky) * (sin(th) / hypot(sin(ky), kx)); else tmp = sin(th) * (sin(ky) / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[kx], $MachinePrecision], -0.005], N[(N[Sin[ky], $MachinePrecision] * N[(th / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 0.002], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + kx ^ 2], $MachinePrecision]), $MachinePrecision]), $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.005:\\
\;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\
\mathbf{elif}\;\sin kx \leq 0.002:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(\sin ky, kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < -0.0050000000000000001Initial program 99.4%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Simplified99.4%
Taylor expanded in th around 0
Simplified53.5%
if -0.0050000000000000001 < (sin.f64 kx) < 2e-3Initial program 91.9%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
Taylor expanded in kx around 0
Simplified99.4%
if 2e-3 < (sin.f64 kx) Initial program 99.4%
Taylor expanded in ky around 0
sin-lowering-sin.f6463.1%
Simplified63.1%
Final simplification78.6%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin ky) -0.1)
(* (sin ky) (/ th (hypot (sin ky) (sin kx))))
(if (<= (sin ky) 0.05)
(* (sin ky) (/ (sin th) (hypot ky (sin kx))))
(sin th))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= -0.1) {
tmp = sin(ky) * (th / hypot(sin(ky), sin(kx)));
} else if (sin(ky) <= 0.05) {
tmp = sin(ky) * (sin(th) / hypot(ky, sin(kx)));
} else {
tmp = sin(th);
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(ky) <= -0.1) {
tmp = Math.sin(ky) * (th / Math.hypot(Math.sin(ky), Math.sin(kx)));
} else if (Math.sin(ky) <= 0.05) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(ky, Math.sin(kx)));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= -0.1: tmp = math.sin(ky) * (th / math.hypot(math.sin(ky), math.sin(kx))) elif math.sin(ky) <= 0.05: tmp = math.sin(ky) * (math.sin(th) / math.hypot(ky, math.sin(kx))) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= -0.1) tmp = Float64(sin(ky) * Float64(th / hypot(sin(ky), sin(kx)))); elseif (sin(ky) <= 0.05) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(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.1) tmp = sin(ky) * (th / hypot(sin(ky), sin(kx))); elseif (sin(ky) <= 0.05) tmp = sin(ky) * (sin(th) / hypot(ky, sin(kx))); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], -0.1], N[(N[Sin[ky], $MachinePrecision] * N[(th / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[ky], $MachinePrecision], 0.05], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[ky ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq -0.1:\\
\;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\
\mathbf{elif}\;\sin ky \leq 0.05:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(ky, \sin kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < -0.10000000000000001Initial program 99.8%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in th around 0
Simplified48.8%
if -0.10000000000000001 < (sin.f64 ky) < 0.050000000000000003Initial program 91.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Simplified99.5%
Taylor expanded in ky around 0
Simplified96.0%
if 0.050000000000000003 < (sin.f64 ky) Initial program 99.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
Taylor expanded in kx around 0
sin-lowering-sin.f6463.5%
Simplified63.5%
(FPCore (kx ky th)
:precision binary64
(if (<= (sin ky) -0.22)
(*
(sin ky)
(/ th (hypot (sin ky) (* kx (+ 1.0 (* -0.16666666666666666 (* kx kx)))))))
(if (<= (sin ky) 4e-13) (* (sin th) (/ (sin ky) (sin kx))) (sin th))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= -0.22) {
tmp = sin(ky) * (th / hypot(sin(ky), (kx * (1.0 + (-0.16666666666666666 * (kx * kx))))));
} else if (sin(ky) <= 4e-13) {
tmp = sin(th) * (sin(ky) / sin(kx));
} else {
tmp = sin(th);
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(ky) <= -0.22) {
tmp = Math.sin(ky) * (th / Math.hypot(Math.sin(ky), (kx * (1.0 + (-0.16666666666666666 * (kx * kx))))));
} else if (Math.sin(ky) <= 4e-13) {
tmp = Math.sin(th) * (Math.sin(ky) / Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= -0.22: tmp = math.sin(ky) * (th / math.hypot(math.sin(ky), (kx * (1.0 + (-0.16666666666666666 * (kx * kx)))))) elif math.sin(ky) <= 4e-13: tmp = math.sin(th) * (math.sin(ky) / math.sin(kx)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= -0.22) tmp = Float64(sin(ky) * Float64(th / hypot(sin(ky), Float64(kx * Float64(1.0 + Float64(-0.16666666666666666 * Float64(kx * kx))))))); elseif (sin(ky) <= 4e-13) tmp = Float64(sin(th) * Float64(sin(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.22) tmp = sin(ky) * (th / hypot(sin(ky), (kx * (1.0 + (-0.16666666666666666 * (kx * kx)))))); elseif (sin(ky) <= 4e-13) tmp = sin(th) * (sin(ky) / sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], -0.22], N[(N[Sin[ky], $MachinePrecision] * N[(th / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[(kx * N[(1.0 + N[(-0.16666666666666666 * N[(kx * kx), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[ky], $MachinePrecision], 4e-13], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq -0.22:\\
\;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin ky, kx \cdot \left(1 + -0.16666666666666666 \cdot \left(kx \cdot kx\right)\right)\right)}\\
\mathbf{elif}\;\sin ky \leq 4 \cdot 10^{-13}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < -0.220000000000000001Initial program 99.8%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in kx around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6460.6%
Simplified60.6%
Taylor expanded in th around 0
Simplified24.8%
if -0.220000000000000001 < (sin.f64 ky) < 4.0000000000000001e-13Initial program 91.6%
Taylor expanded in ky around 0
sin-lowering-sin.f6441.1%
Simplified41.1%
if 4.0000000000000001e-13 < (sin.f64 ky) Initial program 99.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6460.8%
Simplified60.8%
Final simplification42.1%
(FPCore (kx ky th) :precision binary64 (if (<= (sin kx) -0.05) (* (* (sin ky) th) (/ 1.0 (hypot ky (sin kx)))) (if (<= (sin kx) 4e-108) (sin th) (* (sin th) (/ (sin ky) (sin kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= -0.05) {
tmp = (sin(ky) * th) * (1.0 / hypot(ky, sin(kx)));
} else if (sin(kx) <= 4e-108) {
tmp = sin(th);
} else {
tmp = sin(th) * (sin(ky) / sin(kx));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (Math.sin(kx) <= -0.05) {
tmp = (Math.sin(ky) * th) * (1.0 / Math.hypot(ky, Math.sin(kx)));
} else if (Math.sin(kx) <= 4e-108) {
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.05: tmp = (math.sin(ky) * th) * (1.0 / math.hypot(ky, math.sin(kx))) elif math.sin(kx) <= 4e-108: 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.05) tmp = Float64(Float64(sin(ky) * th) * Float64(1.0 / hypot(ky, sin(kx)))); elseif (sin(kx) <= 4e-108) 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.05) tmp = (sin(ky) * th) * (1.0 / hypot(ky, sin(kx))); elseif (sin(kx) <= 4e-108) 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.05], N[(N[(N[Sin[ky], $MachinePrecision] * th), $MachinePrecision] * N[(1.0 / N[Sqrt[ky ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[kx], $MachinePrecision], 4e-108], 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.05:\\
\;\;\;\;\left(\sin ky \cdot th\right) \cdot \frac{1}{\mathsf{hypot}\left(ky, \sin kx\right)}\\
\mathbf{elif}\;\sin kx \leq 4 \cdot 10^{-108}:\\
\;\;\;\;\sin th\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < -0.050000000000000003Initial program 99.4%
Taylor expanded in kx around inf
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Simplified99.4%
associate-*l/N/A
div-invN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.3%
Applied egg-rr99.3%
Taylor expanded in th around 0
Simplified52.7%
Taylor expanded in ky around 0
Simplified34.1%
if -0.050000000000000003 < (sin.f64 kx) < 4.00000000000000016e-108Initial program 90.2%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
Taylor expanded in kx around 0
sin-lowering-sin.f6434.4%
Simplified34.4%
if 4.00000000000000016e-108 < (sin.f64 kx) Initial program 99.5%
Taylor expanded in ky around 0
sin-lowering-sin.f6454.3%
Simplified54.3%
Final simplification40.5%
(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 95.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
(FPCore (kx ky th) :precision binary64 (if (<= (sin kx) 4e-108) (* (* (sin ky) (sin th)) (/ 1.0 (sin ky))) (* (sin th) (/ (sin ky) (sin kx)))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(kx) <= 4e-108) {
tmp = (sin(ky) * sin(th)) * (1.0 / sin(ky));
} 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) <= 4d-108) then
tmp = (sin(ky) * sin(th)) * (1.0d0 / sin(ky))
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) <= 4e-108) {
tmp = (Math.sin(ky) * Math.sin(th)) * (1.0 / Math.sin(ky));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.sin(kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(kx) <= 4e-108: tmp = (math.sin(ky) * math.sin(th)) * (1.0 / math.sin(ky)) else: tmp = math.sin(th) * (math.sin(ky) / math.sin(kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(kx) <= 4e-108) tmp = Float64(Float64(sin(ky) * sin(th)) * Float64(1.0 / sin(ky))); 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) <= 4e-108) tmp = (sin(ky) * sin(th)) * (1.0 / sin(ky)); else tmp = sin(th) * (sin(ky) / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[kx], $MachinePrecision], 4e-108], N[(N[(N[Sin[ky], $MachinePrecision] * N[Sin[th], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $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 4 \cdot 10^{-108}:\\
\;\;\;\;\left(\sin ky \cdot \sin th\right) \cdot \frac{1}{\sin ky}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if (sin.f64 kx) < 4.00000000000000016e-108Initial program 93.9%
Taylor expanded in kx around inf
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
associate-*l/N/A
div-invN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6497.4%
Applied egg-rr97.4%
Taylor expanded in kx around 0
sin-lowering-sin.f6428.9%
Simplified28.9%
if 4.00000000000000016e-108 < (sin.f64 kx) Initial program 99.5%
Taylor expanded in ky around 0
sin-lowering-sin.f6454.3%
Simplified54.3%
Final simplification36.8%
(FPCore (kx ky th) :precision binary64 (if (<= th 1.12e+29) (* (sin ky) (/ th (hypot (sin ky) (sin kx)))) (if (<= th 2.1e+83) (* (sin ky) (/ (sin th) (sin kx))) (sin th))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 1.12e+29) {
tmp = sin(ky) * (th / hypot(sin(ky), sin(kx)));
} else if (th <= 2.1e+83) {
tmp = sin(ky) * (sin(th) / sin(kx));
} else {
tmp = sin(th);
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 1.12e+29) {
tmp = Math.sin(ky) * (th / Math.hypot(Math.sin(ky), Math.sin(kx)));
} else if (th <= 2.1e+83) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 1.12e+29: tmp = math.sin(ky) * (th / math.hypot(math.sin(ky), math.sin(kx))) elif th <= 2.1e+83: tmp = math.sin(ky) * (math.sin(th) / math.sin(kx)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 1.12e+29) tmp = Float64(sin(ky) * Float64(th / hypot(sin(ky), sin(kx)))); elseif (th <= 2.1e+83) tmp = Float64(sin(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 (th <= 1.12e+29) tmp = sin(ky) * (th / hypot(sin(ky), sin(kx))); elseif (th <= 2.1e+83) tmp = sin(ky) * (sin(th) / sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 1.12e+29], N[(N[Sin[ky], $MachinePrecision] * N[(th / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 2.1e+83], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 1.12 \cdot 10^{+29}:\\
\;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\
\mathbf{elif}\;th \leq 2.1 \cdot 10^{+83}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if th < 1.1200000000000001e29Initial program 95.3%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in th around 0
Simplified67.9%
if 1.1200000000000001e29 < th < 2.10000000000000002e83Initial program 99.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6429.1%
Simplified29.1%
if 2.10000000000000002e83 < th Initial program 96.0%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Simplified99.5%
Taylor expanded in kx around 0
sin-lowering-sin.f6426.2%
Simplified26.2%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) 4e-13) (* (sin th) (/ (* ky (+ 1.0 (* -0.16666666666666666 (* ky ky)))) (sin kx))) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= 4e-13) {
tmp = sin(th) * ((ky * (1.0 + (-0.16666666666666666 * (ky * 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) <= 4d-13) then
tmp = sin(th) * ((ky * (1.0d0 + ((-0.16666666666666666d0) * (ky * 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) <= 4e-13) {
tmp = Math.sin(th) * ((ky * (1.0 + (-0.16666666666666666 * (ky * ky)))) / Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= 4e-13: tmp = math.sin(th) * ((ky * (1.0 + (-0.16666666666666666 * (ky * ky)))) / math.sin(kx)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= 4e-13) tmp = Float64(sin(th) * Float64(Float64(ky * Float64(1.0 + Float64(-0.16666666666666666 * Float64(ky * ky)))) / sin(kx))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= 4e-13) tmp = sin(th) * ((ky * (1.0 + (-0.16666666666666666 * (ky * ky)))) / sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], 4e-13], N[(N[Sin[th], $MachinePrecision] * N[(N[(ky * N[(1.0 + N[(-0.16666666666666666 * N[(ky * ky), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq 4 \cdot 10^{-13}:\\
\;\;\;\;\sin th \cdot \frac{ky \cdot \left(1 + -0.16666666666666666 \cdot \left(ky \cdot ky\right)\right)}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < 4.0000000000000001e-13Initial program 94.3%
Taylor expanded in ky around 0
sin-lowering-sin.f6429.8%
Simplified29.8%
Taylor expanded in ky around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6427.8%
Simplified27.8%
if 4.0000000000000001e-13 < (sin.f64 ky) Initial program 99.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6460.8%
Simplified60.8%
Final simplification36.2%
(FPCore (kx ky th) :precision binary64 (if (<= kx 7.5e-108) (sin th) (* (sin th) (/ (sin ky) (sin kx)))))
double code(double kx, double ky, double th) {
double tmp;
if (kx <= 7.5e-108) {
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 (kx <= 7.5d-108) 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 (kx <= 7.5e-108) {
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 kx <= 7.5e-108: 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 (kx <= 7.5e-108) 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 (kx <= 7.5e-108) tmp = sin(th); else tmp = sin(th) * (sin(ky) / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[kx, 7.5e-108], 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}\;kx \leq 7.5 \cdot 10^{-108}:\\
\;\;\;\;\sin th\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\end{array}
\end{array}
if kx < 7.4999999999999993e-108Initial program 93.8%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6424.1%
Simplified24.1%
if 7.4999999999999993e-108 < kx Initial program 99.6%
Taylor expanded in ky around 0
sin-lowering-sin.f6442.3%
Simplified42.3%
Final simplification29.8%
(FPCore (kx ky th) :precision binary64 (if (<= kx 5.4e-108) (sin th) (* (sin ky) (/ (sin th) (sin kx)))))
double code(double kx, double ky, double th) {
double tmp;
if (kx <= 5.4e-108) {
tmp = sin(th);
} else {
tmp = sin(ky) * (sin(th) / 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 (kx <= 5.4d-108) then
tmp = sin(th)
else
tmp = sin(ky) * (sin(th) / sin(kx))
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (kx <= 5.4e-108) {
tmp = Math.sin(th);
} else {
tmp = Math.sin(ky) * (Math.sin(th) / Math.sin(kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if kx <= 5.4e-108: tmp = math.sin(th) else: tmp = math.sin(ky) * (math.sin(th) / math.sin(kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (kx <= 5.4e-108) tmp = sin(th); else tmp = Float64(sin(ky) * Float64(sin(th) / sin(kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (kx <= 5.4e-108) tmp = sin(th); else tmp = sin(ky) * (sin(th) / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[kx, 5.4e-108], N[Sin[th], $MachinePrecision], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;kx \leq 5.4 \cdot 10^{-108}:\\
\;\;\;\;\sin th\\
\mathbf{else}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\sin kx}\\
\end{array}
\end{array}
if kx < 5.4000000000000001e-108Initial program 93.8%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6424.1%
Simplified24.1%
if 5.4000000000000001e-108 < kx Initial program 99.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6442.2%
Simplified42.2%
(FPCore (kx ky th) :precision binary64 (if (<= ky 2.4e-13) (* (sin th) (/ ky (sin kx))) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.4e-13) {
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 (ky <= 2.4d-13) 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 (ky <= 2.4e-13) {
tmp = Math.sin(th) * (ky / Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 2.4e-13: tmp = math.sin(th) * (ky / math.sin(kx)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 2.4e-13) 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 (ky <= 2.4e-13) tmp = sin(th) * (ky / sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 2.4e-13], 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}\;ky \leq 2.4 \cdot 10^{-13}:\\
\;\;\;\;\sin th \cdot \frac{ky}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 2.3999999999999999e-13Initial program 93.8%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6430.4%
Simplified30.4%
if 2.3999999999999999e-13 < ky Initial program 99.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6429.4%
Simplified29.4%
Final simplification30.0%
(FPCore (kx ky th) :precision binary64 (if (<= ky 2.4e-13) (* ky (/ (sin th) (sin kx))) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.4e-13) {
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 (ky <= 2.4d-13) 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 (ky <= 2.4e-13) {
tmp = ky * (Math.sin(th) / Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 2.4e-13: tmp = ky * (math.sin(th) / math.sin(kx)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 2.4e-13) 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 (ky <= 2.4e-13) tmp = ky * (sin(th) / sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 2.4e-13], 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}\;ky \leq 2.4 \cdot 10^{-13}:\\
\;\;\;\;ky \cdot \frac{\sin th}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 2.3999999999999999e-13Initial program 93.8%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6430.9%
Simplified30.9%
Taylor expanded in ky around 0
Simplified30.3%
if 2.3999999999999999e-13 < ky Initial program 99.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6429.4%
Simplified29.4%
(FPCore (kx ky th) :precision binary64 (if (<= kx 0.065) (sin th) (* ky (/ th (sin kx)))))
double code(double kx, double ky, double th) {
double tmp;
if (kx <= 0.065) {
tmp = sin(th);
} else {
tmp = ky * (th / 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 (kx <= 0.065d0) then
tmp = sin(th)
else
tmp = ky * (th / sin(kx))
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (kx <= 0.065) {
tmp = Math.sin(th);
} else {
tmp = ky * (th / Math.sin(kx));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if kx <= 0.065: tmp = math.sin(th) else: tmp = ky * (th / math.sin(kx)) return tmp
function code(kx, ky, th) tmp = 0.0 if (kx <= 0.065) tmp = sin(th); else tmp = Float64(ky * Float64(th / sin(kx))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (kx <= 0.065) tmp = sin(th); else tmp = ky * (th / sin(kx)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[kx, 0.065], N[Sin[th], $MachinePrecision], N[(ky * N[(th / N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;kx \leq 0.065:\\
\;\;\;\;\sin th\\
\mathbf{else}:\\
\;\;\;\;ky \cdot \frac{th}{\sin kx}\\
\end{array}
\end{array}
if kx < 0.065000000000000002Initial program 94.5%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6424.8%
Simplified24.8%
if 0.065000000000000002 < kx Initial program 99.5%
Taylor expanded in kx around inf
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Simplified99.5%
associate-*l/N/A
div-invN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.2%
Applied egg-rr99.2%
Taylor expanded in th around 0
Simplified60.9%
Taylor expanded in ky around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6428.7%
Simplified28.7%
(FPCore (kx ky th)
:precision binary64
(if (<= ky 3.6e-183)
(*
(/ ky kx)
(/
(* th (+ 1.0 (* (* th th) -0.16666666666666666)))
(+ 1.0 (* -0.16666666666666666 (* kx kx)))))
(sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 3.6e-183) {
tmp = (ky / kx) * ((th * (1.0 + ((th * th) * -0.16666666666666666))) / (1.0 + (-0.16666666666666666 * (kx * 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 <= 3.6d-183) then
tmp = (ky / kx) * ((th * (1.0d0 + ((th * th) * (-0.16666666666666666d0)))) / (1.0d0 + ((-0.16666666666666666d0) * (kx * 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 <= 3.6e-183) {
tmp = (ky / kx) * ((th * (1.0 + ((th * th) * -0.16666666666666666))) / (1.0 + (-0.16666666666666666 * (kx * kx))));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 3.6e-183: tmp = (ky / kx) * ((th * (1.0 + ((th * th) * -0.16666666666666666))) / (1.0 + (-0.16666666666666666 * (kx * kx)))) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 3.6e-183) tmp = Float64(Float64(ky / kx) * Float64(Float64(th * Float64(1.0 + Float64(Float64(th * th) * -0.16666666666666666))) / Float64(1.0 + Float64(-0.16666666666666666 * Float64(kx * kx))))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 3.6e-183) tmp = (ky / kx) * ((th * (1.0 + ((th * th) * -0.16666666666666666))) / (1.0 + (-0.16666666666666666 * (kx * kx)))); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 3.6e-183], N[(N[(ky / kx), $MachinePrecision] * N[(N[(th * N[(1.0 + N[(N[(th * th), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(-0.16666666666666666 * N[(kx * kx), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 3.6 \cdot 10^{-183}:\\
\;\;\;\;\frac{ky}{kx} \cdot \frac{th \cdot \left(1 + \left(th \cdot th\right) \cdot -0.16666666666666666\right)}{1 + -0.16666666666666666 \cdot \left(kx \cdot kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 3.6000000000000001e-183Initial program 94.5%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in kx around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6462.3%
Simplified62.3%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.9%
Simplified32.9%
Taylor expanded in ky around 0
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6413.1%
Simplified13.1%
if 3.6000000000000001e-183 < ky Initial program 97.0%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Simplified99.5%
Taylor expanded in kx around 0
sin-lowering-sin.f6427.7%
Simplified27.7%
Final simplification19.6%
(FPCore (kx ky th)
:precision binary64
(if (<= ky 3.8e-129)
(*
(/ ky kx)
(/
(* th (+ 1.0 (* (* th th) -0.16666666666666666)))
(+ 1.0 (* -0.16666666666666666 (* kx kx)))))
th))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 3.8e-129) {
tmp = (ky / kx) * ((th * (1.0 + ((th * th) * -0.16666666666666666))) / (1.0 + (-0.16666666666666666 * (kx * kx))));
} else {
tmp = 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 <= 3.8d-129) then
tmp = (ky / kx) * ((th * (1.0d0 + ((th * th) * (-0.16666666666666666d0)))) / (1.0d0 + ((-0.16666666666666666d0) * (kx * kx))))
else
tmp = th
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 3.8e-129) {
tmp = (ky / kx) * ((th * (1.0 + ((th * th) * -0.16666666666666666))) / (1.0 + (-0.16666666666666666 * (kx * kx))));
} else {
tmp = th;
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 3.8e-129: tmp = (ky / kx) * ((th * (1.0 + ((th * th) * -0.16666666666666666))) / (1.0 + (-0.16666666666666666 * (kx * kx)))) else: tmp = th return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 3.8e-129) tmp = Float64(Float64(ky / kx) * Float64(Float64(th * Float64(1.0 + Float64(Float64(th * th) * -0.16666666666666666))) / Float64(1.0 + Float64(-0.16666666666666666 * Float64(kx * kx))))); else tmp = th; end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 3.8e-129) tmp = (ky / kx) * ((th * (1.0 + ((th * th) * -0.16666666666666666))) / (1.0 + (-0.16666666666666666 * (kx * kx)))); else tmp = th; end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 3.8e-129], N[(N[(ky / kx), $MachinePrecision] * N[(N[(th * N[(1.0 + N[(N[(th * th), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(-0.16666666666666666 * N[(kx * kx), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], th]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 3.8 \cdot 10^{-129}:\\
\;\;\;\;\frac{ky}{kx} \cdot \frac{th \cdot \left(1 + \left(th \cdot th\right) \cdot -0.16666666666666666\right)}{1 + -0.16666666666666666 \cdot \left(kx \cdot kx\right)}\\
\mathbf{else}:\\
\;\;\;\;th\\
\end{array}
\end{array}
if ky < 3.79999999999999985e-129Initial program 92.9%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in kx around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6463.2%
Simplified63.2%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6434.3%
Simplified34.3%
Taylor expanded in ky around 0
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.3%
Simplified14.3%
if 3.79999999999999985e-129 < ky Initial program 99.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Simplified99.5%
Taylor expanded in kx around 0
sin-lowering-sin.f6426.8%
Simplified26.8%
Taylor expanded in th around 0
Simplified15.5%
Final simplification14.8%
(FPCore (kx ky th) :precision binary64 (if (<= ky 4.4e-131) 0.0 th))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 4.4e-131) {
tmp = 0.0;
} else {
tmp = 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 <= 4.4d-131) then
tmp = 0.0d0
else
tmp = th
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 4.4e-131) {
tmp = 0.0;
} else {
tmp = th;
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 4.4e-131: tmp = 0.0 else: tmp = th return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 4.4e-131) tmp = 0.0; else tmp = th; end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 4.4e-131) tmp = 0.0; else tmp = th; end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 4.4e-131], 0.0, th]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 4.4 \cdot 10^{-131}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;th\\
\end{array}
\end{array}
if ky < 4.3999999999999999e-131Initial program 92.9%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6430.4%
Simplified30.4%
associate-*r/N/A
sin-multN/A
associate-/l/N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6415.5%
Applied egg-rr15.5%
Taylor expanded in ky around 0
cos-negN/A
div-subN/A
+-inversesN/A
metadata-eval15.4%
Simplified15.4%
if 4.3999999999999999e-131 < ky Initial program 99.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Simplified99.5%
Taylor expanded in kx around 0
sin-lowering-sin.f6426.8%
Simplified26.8%
Taylor expanded in th around 0
Simplified15.5%
(FPCore (kx ky th) :precision binary64 0.0)
double code(double kx, double ky, double th) {
return 0.0;
}
real(8) function code(kx, ky, th)
real(8), intent (in) :: kx
real(8), intent (in) :: ky
real(8), intent (in) :: th
code = 0.0d0
end function
public static double code(double kx, double ky, double th) {
return 0.0;
}
def code(kx, ky, th): return 0.0
function code(kx, ky, th) return 0.0 end
function tmp = code(kx, ky, th) tmp = 0.0; end
code[kx_, ky_, th_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 95.6%
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
+-commutativeN/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6424.5%
Simplified24.5%
associate-*r/N/A
sin-multN/A
associate-/l/N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
--lowering--.f64N/A
cos-lowering-cos.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6411.4%
Applied egg-rr11.4%
Taylor expanded in ky around 0
cos-negN/A
div-subN/A
+-inversesN/A
metadata-eval11.3%
Simplified11.3%
herbie shell --seed 2024288
(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)))