
(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 th) (/ (hypot (sin kx) (sin ky)) (sin ky))))
double code(double kx, double ky, double th) {
return sin(th) / (hypot(sin(kx), sin(ky)) / sin(ky));
}
public static double code(double kx, double ky, double th) {
return Math.sin(th) / (Math.hypot(Math.sin(kx), Math.sin(ky)) / Math.sin(ky));
}
def code(kx, ky, th): return math.sin(th) / (math.hypot(math.sin(kx), math.sin(ky)) / math.sin(ky))
function code(kx, ky, th) return Float64(sin(th) / Float64(hypot(sin(kx), sin(ky)) / sin(ky))) end
function tmp = code(kx, ky, th) tmp = sin(th) / (hypot(sin(kx), sin(ky)) / sin(ky)); end
code[kx_, ky_, th_] := N[(N[Sin[th], $MachinePrecision] / N[(N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin kx, \sin ky\right)}{\sin ky}}
\end{array}
Initial program 90.8%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) -0.1) (/ th (/ (hypot kx (sin ky)) (sin ky))) (if (<= (sin ky) 1e-29) (/ (sin th) (/ (sin kx) (sin ky))) (sin th))))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= -0.1) {
tmp = th / (hypot(kx, sin(ky)) / sin(ky));
} else if (sin(ky) <= 1e-29) {
tmp = sin(th) / (sin(kx) / sin(ky));
} 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 = th / (Math.hypot(kx, Math.sin(ky)) / Math.sin(ky));
} else if (Math.sin(ky) <= 1e-29) {
tmp = Math.sin(th) / (Math.sin(kx) / Math.sin(ky));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= -0.1: tmp = th / (math.hypot(kx, math.sin(ky)) / math.sin(ky)) elif math.sin(ky) <= 1e-29: tmp = math.sin(th) / (math.sin(kx) / math.sin(ky)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= -0.1) tmp = Float64(th / Float64(hypot(kx, sin(ky)) / sin(ky))); elseif (sin(ky) <= 1e-29) tmp = Float64(sin(th) / Float64(sin(kx) / sin(ky))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= -0.1) tmp = th / (hypot(kx, sin(ky)) / sin(ky)); elseif (sin(ky) <= 1e-29) tmp = sin(th) / (sin(kx) / sin(ky)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], -0.1], N[(th / N[(N[Sqrt[kx ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Sin[ky], $MachinePrecision], 1e-29], N[(N[Sin[th], $MachinePrecision] / N[(N[Sin[kx], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq -0.1:\\
\;\;\;\;\frac{th}{\frac{\mathsf{hypot}\left(kx, \sin ky\right)}{\sin ky}}\\
\mathbf{elif}\;\sin ky \leq 10^{-29}:\\
\;\;\;\;\frac{\sin th}{\frac{\sin kx}{\sin ky}}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < -0.10000000000000001Initial program 99.7%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in th around 0
Simplified60.4%
Taylor expanded in kx around 0
Simplified30.5%
if -0.10000000000000001 < (sin.f64 ky) < 9.99999999999999943e-30Initial program 82.8%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in ky around 0
sin-lowering-sin.f6444.3%
Simplified44.3%
if 9.99999999999999943e-30 < (sin.f64 ky) Initial program 99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6448.4%
Simplified48.4%
(FPCore (kx ky th) :precision binary64 (* (sin th) (/ (sin ky) (hypot (sin ky) (sin kx)))))
double code(double kx, double ky, double th) {
return sin(th) * (sin(ky) / hypot(sin(ky), sin(kx)));
}
public static double code(double kx, double ky, double th) {
return Math.sin(th) * (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx)));
}
def code(kx, ky, th): return math.sin(th) * (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx)))
function code(kx, ky, th) return Float64(sin(th) * Float64(sin(ky) / hypot(sin(ky), sin(kx)))) end
function tmp = code(kx, ky, th) tmp = sin(th) * (sin(ky) / hypot(sin(ky), sin(kx))); end
code[kx_, ky_, th_] := N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}
\end{array}
Initial program 90.8%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (kx ky th)
:precision binary64
(if (<= th 75000000.0)
(/
(sin ky)
(/
(* (hypot (sin kx) (sin ky)) (+ (* 0.16666666666666666 (* th th)) 1.0))
th))
(if (<= th 4.9e+116)
(* (sin ky) (/ (sin th) (hypot kx (sin ky))))
(/ (sin th) (/ (hypot (sin kx) ky) (sin ky))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 75000000.0) {
tmp = sin(ky) / ((hypot(sin(kx), sin(ky)) * ((0.16666666666666666 * (th * th)) + 1.0)) / th);
} else if (th <= 4.9e+116) {
tmp = sin(ky) * (sin(th) / hypot(kx, sin(ky)));
} else {
tmp = sin(th) / (hypot(sin(kx), ky) / sin(ky));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 75000000.0) {
tmp = Math.sin(ky) / ((Math.hypot(Math.sin(kx), Math.sin(ky)) * ((0.16666666666666666 * (th * th)) + 1.0)) / th);
} else if (th <= 4.9e+116) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(kx, Math.sin(ky)));
} else {
tmp = Math.sin(th) / (Math.hypot(Math.sin(kx), ky) / Math.sin(ky));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 75000000.0: tmp = math.sin(ky) / ((math.hypot(math.sin(kx), math.sin(ky)) * ((0.16666666666666666 * (th * th)) + 1.0)) / th) elif th <= 4.9e+116: tmp = math.sin(ky) * (math.sin(th) / math.hypot(kx, math.sin(ky))) else: tmp = math.sin(th) / (math.hypot(math.sin(kx), ky) / math.sin(ky)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 75000000.0) tmp = Float64(sin(ky) / Float64(Float64(hypot(sin(kx), sin(ky)) * Float64(Float64(0.16666666666666666 * Float64(th * th)) + 1.0)) / th)); elseif (th <= 4.9e+116) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(kx, sin(ky)))); else tmp = Float64(sin(th) / Float64(hypot(sin(kx), ky) / sin(ky))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 75000000.0) tmp = sin(ky) / ((hypot(sin(kx), sin(ky)) * ((0.16666666666666666 * (th * th)) + 1.0)) / th); elseif (th <= 4.9e+116) tmp = sin(ky) * (sin(th) / hypot(kx, sin(ky))); else tmp = sin(th) / (hypot(sin(kx), ky) / sin(ky)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 75000000.0], N[(N[Sin[ky], $MachinePrecision] / N[(N[(N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[(0.16666666666666666 * N[(th * th), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / th), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 4.9e+116], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[kx ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] / N[(N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + ky ^ 2], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 75000000:\\
\;\;\;\;\frac{\sin ky}{\frac{\mathsf{hypot}\left(\sin kx, \sin ky\right) \cdot \left(0.16666666666666666 \cdot \left(th \cdot th\right) + 1\right)}{th}}\\
\mathbf{elif}\;th \leq 4.9 \cdot 10^{+116}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(kx, \sin ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin kx, ky\right)}{\sin ky}}\\
\end{array}
\end{array}
if th < 7.5e7Initial program 92.5%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
associate-/r/N/A
*-commutativeN/A
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
/-lowering-/.f64N/A
Simplified68.9%
if 7.5e7 < th < 4.8999999999999998e116Initial program 90.7%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Applied egg-rr99.4%
Taylor expanded in kx around 0
Simplified61.3%
if 4.8999999999999998e116 < th Initial program 82.6%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
Simplified59.0%
Final simplification66.7%
(FPCore (kx ky th)
:precision binary64
(if (<= th 11.0)
(*
(/ (sin ky) (hypot (sin ky) (sin kx)))
(* th (+ 1.0 (* th (* th -0.16666666666666666)))))
(if (<= th 6.1e+116)
(* (sin ky) (/ (sin th) (hypot kx (sin ky))))
(/ (sin th) (/ (hypot (sin kx) ky) (sin ky))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 11.0) {
tmp = (sin(ky) / hypot(sin(ky), sin(kx))) * (th * (1.0 + (th * (th * -0.16666666666666666))));
} else if (th <= 6.1e+116) {
tmp = sin(ky) * (sin(th) / hypot(kx, sin(ky)));
} else {
tmp = sin(th) / (hypot(sin(kx), ky) / sin(ky));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 11.0) {
tmp = (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx))) * (th * (1.0 + (th * (th * -0.16666666666666666))));
} else if (th <= 6.1e+116) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(kx, Math.sin(ky)));
} else {
tmp = Math.sin(th) / (Math.hypot(Math.sin(kx), ky) / Math.sin(ky));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 11.0: tmp = (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx))) * (th * (1.0 + (th * (th * -0.16666666666666666)))) elif th <= 6.1e+116: tmp = math.sin(ky) * (math.sin(th) / math.hypot(kx, math.sin(ky))) else: tmp = math.sin(th) / (math.hypot(math.sin(kx), ky) / math.sin(ky)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 11.0) tmp = Float64(Float64(sin(ky) / hypot(sin(ky), sin(kx))) * Float64(th * Float64(1.0 + Float64(th * Float64(th * -0.16666666666666666))))); elseif (th <= 6.1e+116) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(kx, sin(ky)))); else tmp = Float64(sin(th) / Float64(hypot(sin(kx), ky) / sin(ky))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 11.0) tmp = (sin(ky) / hypot(sin(ky), sin(kx))) * (th * (1.0 + (th * (th * -0.16666666666666666)))); elseif (th <= 6.1e+116) tmp = sin(ky) * (sin(th) / hypot(kx, sin(ky))); else tmp = sin(th) / (hypot(sin(kx), ky) / sin(ky)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 11.0], N[(N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(th * N[(1.0 + N[(th * N[(th * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 6.1e+116], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[kx ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] / N[(N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + ky ^ 2], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 11:\\
\;\;\;\;\frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)} \cdot \left(th \cdot \left(1 + th \cdot \left(th \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{elif}\;th \leq 6.1 \cdot 10^{+116}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(kx, \sin ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin kx, ky\right)}{\sin ky}}\\
\end{array}
\end{array}
if th < 11Initial program 92.4%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.4%
Simplified68.4%
if 11 < th < 6.10000000000000018e116Initial program 91.1%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Applied egg-rr99.4%
Taylor expanded in kx around 0
Simplified59.0%
if 6.10000000000000018e116 < th Initial program 82.6%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
Simplified59.0%
Final simplification66.1%
(FPCore (kx ky th)
:precision binary64
(if (<= th 75000000.0)
(* th (/ (sin ky) (hypot (sin ky) (sin kx))))
(if (<= th 6.2e+116)
(* (sin ky) (/ (sin th) (hypot kx (sin ky))))
(/ (sin th) (/ (hypot (sin kx) ky) (sin ky))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 75000000.0) {
tmp = th * (sin(ky) / hypot(sin(ky), sin(kx)));
} else if (th <= 6.2e+116) {
tmp = sin(ky) * (sin(th) / hypot(kx, sin(ky)));
} else {
tmp = sin(th) / (hypot(sin(kx), ky) / sin(ky));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 75000000.0) {
tmp = th * (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx)));
} else if (th <= 6.2e+116) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(kx, Math.sin(ky)));
} else {
tmp = Math.sin(th) / (Math.hypot(Math.sin(kx), ky) / Math.sin(ky));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 75000000.0: tmp = th * (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx))) elif th <= 6.2e+116: tmp = math.sin(ky) * (math.sin(th) / math.hypot(kx, math.sin(ky))) else: tmp = math.sin(th) / (math.hypot(math.sin(kx), ky) / math.sin(ky)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 75000000.0) tmp = Float64(th * Float64(sin(ky) / hypot(sin(ky), sin(kx)))); elseif (th <= 6.2e+116) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(kx, sin(ky)))); else tmp = Float64(sin(th) / Float64(hypot(sin(kx), ky) / sin(ky))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 75000000.0) tmp = th * (sin(ky) / hypot(sin(ky), sin(kx))); elseif (th <= 6.2e+116) tmp = sin(ky) * (sin(th) / hypot(kx, sin(ky))); else tmp = sin(th) / (hypot(sin(kx), ky) / sin(ky)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 75000000.0], N[(th * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 6.2e+116], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[kx ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] / N[(N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + ky ^ 2], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 75000000:\\
\;\;\;\;th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\
\mathbf{elif}\;th \leq 6.2 \cdot 10^{+116}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(kx, \sin ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin th}{\frac{\mathsf{hypot}\left(\sin kx, ky\right)}{\sin ky}}\\
\end{array}
\end{array}
if th < 7.5e7Initial program 92.5%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
Simplified68.5%
if 7.5e7 < th < 6.19999999999999992e116Initial program 90.7%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Applied egg-rr99.4%
Taylor expanded in kx around 0
Simplified61.3%
if 6.19999999999999992e116 < th Initial program 82.6%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
Simplified59.0%
Final simplification66.4%
(FPCore (kx ky th)
:precision binary64
(if (<= th 75000000.0)
(* th (/ (sin ky) (hypot (sin ky) (sin kx))))
(if (<= th 5.5e+116)
(* (sin ky) (/ (sin th) (hypot kx (sin ky))))
(/ (sin ky) (/ (hypot (sin kx) ky) (sin th))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 75000000.0) {
tmp = th * (sin(ky) / hypot(sin(ky), sin(kx)));
} else if (th <= 5.5e+116) {
tmp = sin(ky) * (sin(th) / hypot(kx, sin(ky)));
} else {
tmp = sin(ky) / (hypot(sin(kx), ky) / sin(th));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 75000000.0) {
tmp = th * (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx)));
} else if (th <= 5.5e+116) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(kx, Math.sin(ky)));
} else {
tmp = Math.sin(ky) / (Math.hypot(Math.sin(kx), ky) / Math.sin(th));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 75000000.0: tmp = th * (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx))) elif th <= 5.5e+116: tmp = math.sin(ky) * (math.sin(th) / math.hypot(kx, math.sin(ky))) else: tmp = math.sin(ky) / (math.hypot(math.sin(kx), ky) / math.sin(th)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 75000000.0) tmp = Float64(th * Float64(sin(ky) / hypot(sin(ky), sin(kx)))); elseif (th <= 5.5e+116) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(kx, sin(ky)))); else tmp = Float64(sin(ky) / Float64(hypot(sin(kx), ky) / sin(th))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 75000000.0) tmp = th * (sin(ky) / hypot(sin(ky), sin(kx))); elseif (th <= 5.5e+116) tmp = sin(ky) * (sin(th) / hypot(kx, sin(ky))); else tmp = sin(ky) / (hypot(sin(kx), ky) / sin(th)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 75000000.0], N[(th * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 5.5e+116], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[kx ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[ky], $MachinePrecision] / N[(N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + ky ^ 2], $MachinePrecision] / N[Sin[th], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 75000000:\\
\;\;\;\;th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\
\mathbf{elif}\;th \leq 5.5 \cdot 10^{+116}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(kx, \sin ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin ky}{\frac{\mathsf{hypot}\left(\sin kx, ky\right)}{\sin th}}\\
\end{array}
\end{array}
if th < 7.5e7Initial program 92.5%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
Simplified68.5%
if 7.5e7 < th < 5.50000000000000035e116Initial program 90.7%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Applied egg-rr99.4%
Taylor expanded in kx around 0
Simplified61.3%
if 5.50000000000000035e116 < th Initial program 82.6%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
associate-/r/N/A
*-commutativeN/A
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Applied egg-rr99.4%
Taylor expanded in ky around 0
Simplified59.1%
Final simplification66.4%
(FPCore (kx ky th)
:precision binary64
(if (<= th 75000000.0)
(* th (/ (sin ky) (hypot (sin ky) (sin kx))))
(if (<= th 3.4e+116)
(* (sin ky) (/ (sin th) (hypot kx (sin ky))))
(* (sin th) (/ (sin ky) (hypot ky (sin kx)))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 75000000.0) {
tmp = th * (sin(ky) / hypot(sin(ky), sin(kx)));
} else if (th <= 3.4e+116) {
tmp = sin(ky) * (sin(th) / hypot(kx, sin(ky)));
} else {
tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx)));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 75000000.0) {
tmp = th * (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx)));
} else if (th <= 3.4e+116) {
tmp = Math.sin(ky) * (Math.sin(th) / Math.hypot(kx, Math.sin(ky)));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(ky, Math.sin(kx)));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 75000000.0: tmp = th * (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx))) elif th <= 3.4e+116: tmp = math.sin(ky) * (math.sin(th) / math.hypot(kx, math.sin(ky))) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(ky, math.sin(kx))) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 75000000.0) tmp = Float64(th * Float64(sin(ky) / hypot(sin(ky), sin(kx)))); elseif (th <= 3.4e+116) tmp = Float64(sin(ky) * Float64(sin(th) / hypot(kx, sin(ky)))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(ky, sin(kx)))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 75000000.0) tmp = th * (sin(ky) / hypot(sin(ky), sin(kx))); elseif (th <= 3.4e+116) tmp = sin(ky) * (sin(th) / hypot(kx, sin(ky))); else tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx))); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 75000000.0], N[(th * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 3.4e+116], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / N[Sqrt[kx ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[ky ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 75000000:\\
\;\;\;\;th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\
\mathbf{elif}\;th \leq 3.4 \cdot 10^{+116}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{\mathsf{hypot}\left(kx, \sin ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(ky, \sin kx\right)}\\
\end{array}
\end{array}
if th < 7.5e7Initial program 92.5%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
Simplified68.5%
if 7.5e7 < th < 3.40000000000000023e116Initial program 90.7%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.4%
Applied egg-rr99.4%
Taylor expanded in kx around 0
Simplified61.3%
if 3.40000000000000023e116 < th Initial program 82.6%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.5%
Applied egg-rr99.5%
Taylor expanded in ky around 0
Simplified59.0%
Final simplification66.4%
(FPCore (kx ky th) :precision binary64 (if (<= th 0.0025) (* th (/ (sin ky) (hypot (sin ky) (sin kx)))) (* (sin th) (/ (sin ky) (hypot ky (sin kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.0025) {
tmp = th * (sin(ky) / hypot(sin(ky), sin(kx)));
} else {
tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx)));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.0025) {
tmp = th * (Math.sin(ky) / Math.hypot(Math.sin(ky), Math.sin(kx)));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(ky, Math.sin(kx)));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.0025: tmp = th * (math.sin(ky) / math.hypot(math.sin(ky), math.sin(kx))) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(ky, math.sin(kx))) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.0025) tmp = Float64(th * Float64(sin(ky) / hypot(sin(ky), sin(kx)))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(ky, sin(kx)))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.0025) tmp = th * (sin(ky) / hypot(sin(ky), sin(kx))); else tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx))); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.0025], N[(th * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[N[Sin[ky], $MachinePrecision] ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[ky ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.0025:\\
\;\;\;\;th \cdot \frac{\sin ky}{\mathsf{hypot}\left(\sin ky, \sin kx\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(ky, \sin kx\right)}\\
\end{array}
\end{array}
if th < 0.00250000000000000005Initial program 92.4%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in th around 0
Simplified68.8%
if 0.00250000000000000005 < th Initial program 85.7%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
Simplified53.9%
Final simplification65.1%
(FPCore (kx ky th) :precision binary64 (if (<= th 0.00031) (* (sin ky) (/ th (hypot (sin kx) (sin ky)))) (* (sin th) (/ (sin ky) (hypot ky (sin kx))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.00031) {
tmp = sin(ky) * (th / hypot(sin(kx), sin(ky)));
} else {
tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx)));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 0.00031) {
tmp = Math.sin(ky) * (th / Math.hypot(Math.sin(kx), Math.sin(ky)));
} else {
tmp = Math.sin(th) * (Math.sin(ky) / Math.hypot(ky, Math.sin(kx)));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 0.00031: tmp = math.sin(ky) * (th / math.hypot(math.sin(kx), math.sin(ky))) else: tmp = math.sin(th) * (math.sin(ky) / math.hypot(ky, math.sin(kx))) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 0.00031) tmp = Float64(sin(ky) * Float64(th / hypot(sin(kx), sin(ky)))); else tmp = Float64(sin(th) * Float64(sin(ky) / hypot(ky, sin(kx)))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 0.00031) tmp = sin(ky) * (th / hypot(sin(kx), sin(ky))); else tmp = sin(th) * (sin(ky) / hypot(ky, sin(kx))); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 0.00031], N[(N[Sin[ky], $MachinePrecision] * N[(th / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / N[Sqrt[ky ^ 2 + N[Sin[kx], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 0.00031:\\
\;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin kx, \sin ky\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\mathsf{hypot}\left(ky, \sin kx\right)}\\
\end{array}
\end{array}
if th < 3.1e-4Initial program 92.4%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
Simplified68.7%
if 3.1e-4 < th Initial program 85.7%
+-commutativeN/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
Simplified53.9%
Final simplification65.0%
(FPCore (kx ky th) :precision binary64 (if (<= th 75000000.0) (* (sin ky) (/ th (hypot (sin kx) (sin ky)))) (if (<= th 1.16e+73) (sin th) (/ (sin th) (/ (sin kx) (sin ky))))))
double code(double kx, double ky, double th) {
double tmp;
if (th <= 75000000.0) {
tmp = sin(ky) * (th / hypot(sin(kx), sin(ky)));
} else if (th <= 1.16e+73) {
tmp = sin(th);
} else {
tmp = sin(th) / (sin(kx) / sin(ky));
}
return tmp;
}
public static double code(double kx, double ky, double th) {
double tmp;
if (th <= 75000000.0) {
tmp = Math.sin(ky) * (th / Math.hypot(Math.sin(kx), Math.sin(ky)));
} else if (th <= 1.16e+73) {
tmp = Math.sin(th);
} else {
tmp = Math.sin(th) / (Math.sin(kx) / Math.sin(ky));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if th <= 75000000.0: tmp = math.sin(ky) * (th / math.hypot(math.sin(kx), math.sin(ky))) elif th <= 1.16e+73: tmp = math.sin(th) else: tmp = math.sin(th) / (math.sin(kx) / math.sin(ky)) return tmp
function code(kx, ky, th) tmp = 0.0 if (th <= 75000000.0) tmp = Float64(sin(ky) * Float64(th / hypot(sin(kx), sin(ky)))); elseif (th <= 1.16e+73) tmp = sin(th); else tmp = Float64(sin(th) / Float64(sin(kx) / sin(ky))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (th <= 75000000.0) tmp = sin(ky) * (th / hypot(sin(kx), sin(ky))); elseif (th <= 1.16e+73) tmp = sin(th); else tmp = sin(th) / (sin(kx) / sin(ky)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[th, 75000000.0], N[(N[Sin[ky], $MachinePrecision] * N[(th / N[Sqrt[N[Sin[kx], $MachinePrecision] ^ 2 + N[Sin[ky], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[th, 1.16e+73], N[Sin[th], $MachinePrecision], N[(N[Sin[th], $MachinePrecision] / N[(N[Sin[kx], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;th \leq 75000000:\\
\;\;\;\;\sin ky \cdot \frac{th}{\mathsf{hypot}\left(\sin kx, \sin ky\right)}\\
\mathbf{elif}\;th \leq 1.16 \cdot 10^{+73}:\\
\;\;\;\;\sin th\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin th}{\frac{\sin kx}{\sin ky}}\\
\end{array}
\end{array}
if th < 7.5e7Initial program 92.5%
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in th around 0
Simplified68.4%
if 7.5e7 < th < 1.16000000000000007e73Initial program 89.9%
Taylor expanded in kx around 0
sin-lowering-sin.f6433.1%
Simplified33.1%
if 1.16000000000000007e73 < th Initial program 84.6%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
sin-lowering-sin.f6418.0%
Simplified18.0%
Final simplification56.8%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) 1e-29) (/ (sin th) (/ (sin kx) (sin ky))) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= 1e-29) {
tmp = sin(th) / (sin(kx) / sin(ky));
} 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) <= 1d-29) then
tmp = sin(th) / (sin(kx) / sin(ky))
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) <= 1e-29) {
tmp = Math.sin(th) / (Math.sin(kx) / Math.sin(ky));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= 1e-29: tmp = math.sin(th) / (math.sin(kx) / math.sin(ky)) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= 1e-29) tmp = Float64(sin(th) / Float64(sin(kx) / sin(ky))); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= 1e-29) tmp = sin(th) / (sin(kx) / sin(ky)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], 1e-29], N[(N[Sin[th], $MachinePrecision] / N[(N[Sin[kx], $MachinePrecision] / N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq 10^{-29}:\\
\;\;\;\;\frac{\sin th}{\frac{\sin kx}{\sin ky}}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < 9.99999999999999943e-30Initial program 87.7%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in ky around 0
sin-lowering-sin.f6433.8%
Simplified33.8%
if 9.99999999999999943e-30 < (sin.f64 ky) Initial program 99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6448.4%
Simplified48.4%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) 1e-29) (* (sin th) (/ (sin ky) (sin kx))) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= 1e-29) {
tmp = sin(th) * (sin(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) <= 1d-29) then
tmp = sin(th) * (sin(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) <= 1e-29) {
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) <= 1e-29: 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) <= 1e-29) 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) <= 1e-29) 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], 1e-29], 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 10^{-29}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < 9.99999999999999943e-30Initial program 87.7%
Taylor expanded in ky around 0
sin-lowering-sin.f6433.8%
Simplified33.8%
if 9.99999999999999943e-30 < (sin.f64 ky) Initial program 99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6448.4%
Simplified48.4%
Final simplification37.6%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) 1e-29) (/ (sin th) (/ (* (sin kx) (+ 1.0 (* 0.16666666666666666 (* ky ky)))) ky)) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= 1e-29) {
tmp = sin(th) / ((sin(kx) * (1.0 + (0.16666666666666666 * (ky * ky)))) / ky);
} 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) <= 1d-29) then
tmp = sin(th) / ((sin(kx) * (1.0d0 + (0.16666666666666666d0 * (ky * ky)))) / ky)
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) <= 1e-29) {
tmp = Math.sin(th) / ((Math.sin(kx) * (1.0 + (0.16666666666666666 * (ky * ky)))) / ky);
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= 1e-29: tmp = math.sin(th) / ((math.sin(kx) * (1.0 + (0.16666666666666666 * (ky * ky)))) / ky) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= 1e-29) tmp = Float64(sin(th) / Float64(Float64(sin(kx) * Float64(1.0 + Float64(0.16666666666666666 * Float64(ky * ky)))) / ky)); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= 1e-29) tmp = sin(th) / ((sin(kx) * (1.0 + (0.16666666666666666 * (ky * ky)))) / ky); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], 1e-29], N[(N[Sin[th], $MachinePrecision] / N[(N[(N[Sin[kx], $MachinePrecision] * N[(1.0 + N[(0.16666666666666666 * N[(ky * ky), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / ky), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq 10^{-29}:\\
\;\;\;\;\frac{\sin th}{\frac{\sin kx \cdot \left(1 + 0.16666666666666666 \cdot \left(ky \cdot ky\right)\right)}{ky}}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < 9.99999999999999943e-30Initial program 87.7%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in ky around 0
sin-lowering-sin.f6433.8%
Simplified33.8%
Taylor expanded in ky around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6433.1%
Simplified33.1%
if 9.99999999999999943e-30 < (sin.f64 ky) Initial program 99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6448.4%
Simplified48.4%
Final simplification37.1%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) 4e-88) (* (sin th) (/ (sin ky) kx)) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= 4e-88) {
tmp = sin(th) * (sin(ky) / 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-88) then
tmp = sin(th) * (sin(ky) / 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-88) {
tmp = Math.sin(th) * (Math.sin(ky) / kx);
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= 4e-88: tmp = math.sin(th) * (math.sin(ky) / kx) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= 4e-88) tmp = Float64(sin(th) * Float64(sin(ky) / kx)); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= 4e-88) tmp = sin(th) * (sin(ky) / kx); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], 4e-88], N[(N[Sin[th], $MachinePrecision] * N[(N[Sin[ky], $MachinePrecision] / kx), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq 4 \cdot 10^{-88}:\\
\;\;\;\;\sin th \cdot \frac{\sin ky}{kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < 3.99999999999999974e-88Initial program 86.9%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in ky around 0
sin-lowering-sin.f6434.0%
Simplified34.0%
Taylor expanded in kx around 0
/-lowering-/.f64N/A
associate-*r*N/A
distribute-lft1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6416.9%
Simplified16.9%
Taylor expanded in kx around 0
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6424.0%
Simplified24.0%
if 3.99999999999999974e-88 < (sin.f64 ky) Initial program 99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6445.3%
Simplified45.3%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) 4e-88) (* (sin ky) (/ (sin th) kx)) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= 4e-88) {
tmp = sin(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 (sin(ky) <= 4d-88) then
tmp = sin(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 (Math.sin(ky) <= 4e-88) {
tmp = Math.sin(ky) * (Math.sin(th) / kx);
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= 4e-88: tmp = math.sin(ky) * (math.sin(th) / kx) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= 4e-88) tmp = Float64(sin(ky) * Float64(sin(th) / kx)); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (sin(ky) <= 4e-88) tmp = sin(ky) * (sin(th) / kx); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], 4e-88], N[(N[Sin[ky], $MachinePrecision] * N[(N[Sin[th], $MachinePrecision] / kx), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq 4 \cdot 10^{-88}:\\
\;\;\;\;\sin ky \cdot \frac{\sin th}{kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < 3.99999999999999974e-88Initial program 86.9%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.7%
Applied egg-rr99.7%
Taylor expanded in ky around 0
sin-lowering-sin.f6434.0%
Simplified34.0%
Taylor expanded in kx around 0
associate-/l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6424.0%
Simplified24.0%
if 3.99999999999999974e-88 < (sin.f64 ky) Initial program 99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6445.3%
Simplified45.3%
(FPCore (kx ky th) :precision binary64 (if (<= (sin ky) 4e-88) (* (sin th) (/ ky (* kx (+ 1.0 (* -0.16666666666666666 (* kx kx)))))) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (sin(ky) <= 4e-88) {
tmp = sin(th) * (ky / (kx * (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 (sin(ky) <= 4d-88) then
tmp = sin(th) * (ky / (kx * (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 (Math.sin(ky) <= 4e-88) {
tmp = Math.sin(th) * (ky / (kx * (1.0 + (-0.16666666666666666 * (kx * kx)))));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if math.sin(ky) <= 4e-88: tmp = math.sin(th) * (ky / (kx * (1.0 + (-0.16666666666666666 * (kx * kx))))) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (sin(ky) <= 4e-88) tmp = Float64(sin(th) * Float64(ky / Float64(kx * 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 (sin(ky) <= 4e-88) tmp = sin(th) * (ky / (kx * (1.0 + (-0.16666666666666666 * (kx * kx))))); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[N[Sin[ky], $MachinePrecision], 4e-88], N[(N[Sin[th], $MachinePrecision] * N[(ky / N[(kx * N[(1.0 + N[(-0.16666666666666666 * N[(kx * kx), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sin ky \leq 4 \cdot 10^{-88}:\\
\;\;\;\;\sin th \cdot \frac{ky}{kx \cdot \left(1 + -0.16666666666666666 \cdot \left(kx \cdot kx\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if (sin.f64 ky) < 3.99999999999999974e-88Initial program 86.9%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6432.7%
Simplified32.7%
Taylor expanded in kx around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6423.9%
Simplified23.9%
if 3.99999999999999974e-88 < (sin.f64 ky) Initial program 99.6%
Taylor expanded in kx around 0
sin-lowering-sin.f6445.3%
Simplified45.3%
Final simplification30.4%
(FPCore (kx ky th) :precision binary64 (if (<= ky 1.4e-29) (/ (sin th) (/ (sin kx) ky)) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 1.4e-29) {
tmp = sin(th) / (sin(kx) / ky);
} 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 <= 1.4d-29) then
tmp = sin(th) / (sin(kx) / ky)
else
tmp = sin(th)
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (ky <= 1.4e-29) {
tmp = Math.sin(th) / (Math.sin(kx) / ky);
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 1.4e-29: tmp = math.sin(th) / (math.sin(kx) / ky) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 1.4e-29) tmp = Float64(sin(th) / Float64(sin(kx) / ky)); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 1.4e-29) tmp = sin(th) / (sin(kx) / ky); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 1.4e-29], N[(N[Sin[th], $MachinePrecision] / N[(N[Sin[kx], $MachinePrecision] / ky), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 1.4 \cdot 10^{-29}:\\
\;\;\;\;\frac{\sin th}{\frac{\sin kx}{ky}}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 1.4000000000000001e-29Initial program 88.0%
*-commutativeN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
unpow2N/A
unpow2N/A
accelerator-lowering-hypot.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6431.7%
Simplified31.7%
if 1.4000000000000001e-29 < ky Initial program 99.8%
Taylor expanded in kx around 0
sin-lowering-sin.f6435.6%
Simplified35.6%
(FPCore (kx ky th) :precision binary64 (if (<= ky 1e-29) (* (sin th) (/ ky (sin kx))) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 1e-29) {
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 <= 1d-29) 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 <= 1e-29) {
tmp = Math.sin(th) * (ky / Math.sin(kx));
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 1e-29: 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 <= 1e-29) 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 <= 1e-29) tmp = sin(th) * (ky / sin(kx)); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 1e-29], 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 10^{-29}:\\
\;\;\;\;\sin th \cdot \frac{ky}{\sin kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 9.99999999999999943e-30Initial program 88.0%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6431.7%
Simplified31.7%
if 9.99999999999999943e-30 < ky Initial program 99.8%
Taylor expanded in kx around 0
sin-lowering-sin.f6435.6%
Simplified35.6%
Final simplification32.6%
(FPCore (kx ky th) :precision binary64 (if (<= ky 2.3e-88) (* (sin th) (/ ky kx)) (sin th)))
double code(double kx, double ky, double th) {
double tmp;
if (ky <= 2.3e-88) {
tmp = sin(th) * (ky / 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.3d-88) then
tmp = sin(th) * (ky / 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.3e-88) {
tmp = Math.sin(th) * (ky / kx);
} else {
tmp = Math.sin(th);
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if ky <= 2.3e-88: tmp = math.sin(th) * (ky / kx) else: tmp = math.sin(th) return tmp
function code(kx, ky, th) tmp = 0.0 if (ky <= 2.3e-88) tmp = Float64(sin(th) * Float64(ky / kx)); else tmp = sin(th); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (ky <= 2.3e-88) tmp = sin(th) * (ky / kx); else tmp = sin(th); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[ky, 2.3e-88], N[(N[Sin[th], $MachinePrecision] * N[(ky / kx), $MachinePrecision]), $MachinePrecision], N[Sin[th], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;ky \leq 2.3 \cdot 10^{-88}:\\
\;\;\;\;\sin th \cdot \frac{ky}{kx}\\
\mathbf{else}:\\
\;\;\;\;\sin th\\
\end{array}
\end{array}
if ky < 2.29999999999999986e-88Initial program 87.3%
Taylor expanded in ky around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6431.8%
Simplified31.8%
Taylor expanded in kx around 0
/-lowering-/.f6423.2%
Simplified23.2%
if 2.29999999999999986e-88 < ky Initial program 99.7%
Taylor expanded in kx around 0
sin-lowering-sin.f6434.2%
Simplified34.2%
Final simplification26.3%
(FPCore (kx ky th) :precision binary64 (if (<= kx 1.45e+38) (sin th) (* -0.16666666666666666 (* th (* th th)))))
double code(double kx, double ky, double th) {
double tmp;
if (kx <= 1.45e+38) {
tmp = sin(th);
} else {
tmp = -0.16666666666666666 * (th * (th * 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 <= 1.45d+38) then
tmp = sin(th)
else
tmp = (-0.16666666666666666d0) * (th * (th * th))
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (kx <= 1.45e+38) {
tmp = Math.sin(th);
} else {
tmp = -0.16666666666666666 * (th * (th * th));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if kx <= 1.45e+38: tmp = math.sin(th) else: tmp = -0.16666666666666666 * (th * (th * th)) return tmp
function code(kx, ky, th) tmp = 0.0 if (kx <= 1.45e+38) tmp = sin(th); else tmp = Float64(-0.16666666666666666 * Float64(th * Float64(th * th))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (kx <= 1.45e+38) tmp = sin(th); else tmp = -0.16666666666666666 * (th * (th * th)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[kx, 1.45e+38], N[Sin[th], $MachinePrecision], N[(-0.16666666666666666 * N[(th * N[(th * th), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;kx \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\sin th\\
\mathbf{else}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(th \cdot \left(th \cdot th\right)\right)\\
\end{array}
\end{array}
if kx < 1.45000000000000003e38Initial program 88.4%
Taylor expanded in kx around 0
sin-lowering-sin.f6420.9%
Simplified20.9%
if 1.45000000000000003e38 < kx Initial program 99.2%
Taylor expanded in kx around 0
sin-lowering-sin.f649.2%
Simplified9.2%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f646.0%
Simplified6.0%
Taylor expanded in th around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f649.3%
Simplified9.3%
(FPCore (kx ky th) :precision binary64 (if (<= kx 12000.0) th (* -0.16666666666666666 (* th (* th th)))))
double code(double kx, double ky, double th) {
double tmp;
if (kx <= 12000.0) {
tmp = th;
} else {
tmp = -0.16666666666666666 * (th * (th * 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 <= 12000.0d0) then
tmp = th
else
tmp = (-0.16666666666666666d0) * (th * (th * th))
end if
code = tmp
end function
public static double code(double kx, double ky, double th) {
double tmp;
if (kx <= 12000.0) {
tmp = th;
} else {
tmp = -0.16666666666666666 * (th * (th * th));
}
return tmp;
}
def code(kx, ky, th): tmp = 0 if kx <= 12000.0: tmp = th else: tmp = -0.16666666666666666 * (th * (th * th)) return tmp
function code(kx, ky, th) tmp = 0.0 if (kx <= 12000.0) tmp = th; else tmp = Float64(-0.16666666666666666 * Float64(th * Float64(th * th))); end return tmp end
function tmp_2 = code(kx, ky, th) tmp = 0.0; if (kx <= 12000.0) tmp = th; else tmp = -0.16666666666666666 * (th * (th * th)); end tmp_2 = tmp; end
code[kx_, ky_, th_] := If[LessEqual[kx, 12000.0], th, N[(-0.16666666666666666 * N[(th * N[(th * th), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;kx \leq 12000:\\
\;\;\;\;th\\
\mathbf{else}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(th \cdot \left(th \cdot th\right)\right)\\
\end{array}
\end{array}
if kx < 12000Initial program 88.1%
Taylor expanded in kx around 0
sin-lowering-sin.f6421.4%
Simplified21.4%
Taylor expanded in th around 0
Simplified12.1%
if 12000 < kx Initial program 99.3%
Taylor expanded in kx around 0
sin-lowering-sin.f648.9%
Simplified8.9%
Taylor expanded in th around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f645.8%
Simplified5.8%
Taylor expanded in th around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f649.3%
Simplified9.3%
(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 90.8%
Taylor expanded in kx around 0
sin-lowering-sin.f6418.4%
Simplified18.4%
Taylor expanded in th around 0
Simplified10.6%
herbie shell --seed 2024191
(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)))