Engineering functions
BESSELY
Known larger differences on 2 of 258 recorded answers
Of 258 recorded answers (46 in the answer bank and 212 workbook cells), 2 do not match: 1 differ by more than 16 ULP, 1 differ by at most 16 ULP. How we measure this · See the Rust code
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | BESSELY |
| Bulgarian | BESSELY |
| Czech | BESSELY |
| Danish | BESSELY |
| German | BESSELY |
| Greek | BESSELY |
| English (Australia) | BESSELY |
| English (United Kingdom) | BESSELY |
| English (United States) | BESSELY |
| Spanish | BESSELY |
| Estonian | BESSELY |
| Finnish | BESSELY |
| French | BESSELY |
| Hebrew | BESSELY |
| Croatian | BESSELY |
| Hungarian | BESSELY |
| Indonesian | BESSELY |
| Italian | BESSELY |
| Japanese | BESSELY |
| Korean | BESSELY |
| Lithuanian | BESSELY |
| Latvian | BESSELY |
| Norwegian | BESSELY |
| Dutch | BESSELY |
| Polish | BESSEL.Y |
| Portuguese (Brazil) | BESSELY |
| Portuguese (Portugal) | BESSELY |
| Romanian | BESSELY |
| Russian | БЕССЕЛЬ.Y |
| Slovak | BESSELY |
| Slovenian | BESSELY |
| Serbian (Latin) | BESSELY |
| Swedish | BESSELY |
| Thai | BESSELY |
| Turkish | BESSELY işlevi |
| Ukrainian | BESSELY |
| Vietnamese | BESSELY |
| Chinese (Simplified) | BESSELY |
| Chinese (Hong Kong) | BESSELY |
| Chinese (Traditional) | BESSELY |
Names from Microsoft's support site.
What it does
BESSELY(x, n)
BESSELY(x,n) evaluates the order-n Bessel function of the second kind. It is a special function used in radial and oscillatory problems, rather than an elementary trigonometric function. The order is truncated to an integer.
Try it
=BESSELY(2,0) evaluates the order-zero function at two. The mathematical value is about 0.51037567; =BESSELY(0,0) is outside the current positive-x domain and gives #NUM!.
Quirks
Nonnumeric arguments give #VALUE!; a negative order gives #NUM!. The current real-valued kernel requires positive x. Recorded code also limits truncated order to 10,000,000 and applies phase-based large-argument admission. Published approximation methods remain distinct from an identification of Excel’s numerical body.
How to implement
Validate x and the order before selecting a numerical route. Use order-zero and order-one seed approximations. For higher orders the recurrence is C_(j+1)=(2*j/x)*C_j-C_(j-1). The current code runs forward from its Y0 and Y1 seeds. For example the recurrence gives C2=(2/x)*C1-C0; its numbers depend on both seed values. Seed coefficients, phase grouping and flushing are separate compatibility questions, with residual differences still recorded. This is a published-method implementation outline, not a claim that every Excel stage is solved.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
BESSELY · 1 lines · calc-func/src/catalogue/engineering.rs on GitHub63 bessely "BESSELY" (2, 2) [V "x", V "n"] |s, a, sv| { bessel(s, a, k::bessel::bessely_kernel, false) }
y0 · 12 lines · calc-func/src/ported/bessel.rs on GitHubfn y0(x: D) -> R {
admit_phase(x, 0.785398164)?;
if x.0 >= 8.0 {
let value = super::bessel_rational::y0_large(x.0);
return if value.is_finite() { Ok(D::new(value)) } else { Err(WorksheetErrorCode::Num) };
}
if x.0 > 0.0 && x.0 < 8.0 {
let value = super::bessel_rational::y0(x.0);
return if value.is_finite() { Ok(D::new(value)) } else { Err(WorksheetErrorCode::Num) };
}
Ok(D::new(libm::y0(x.0))) }
y1 · 12 lines · calc-func/src/ported/bessel.rs on GitHubfn y1(x: D) -> R {
admit_phase(x, 2.356194491)?;
if x.0 >= 8.0 {
let value = super::bessel_rational::y1_large(x.0);
return if value.is_finite() { Ok(D::new(value)) } else { Err(WorksheetErrorCode::Num) };
}
if x.0 > 0.0 && x.0 < 8.0 {
let value = super::bessel_rational::y1(x.0);
return if value.is_finite() { Ok(D::new(value)) } else { Err(WorksheetErrorCode::Num) };
}
Ok(D::new(libm::y1(x.0))) }
bessely_kernel · 14 lines · calc-func/src/ported/bessel.rs on GitHub/// `BESSELY(x, n)`.
pub fn bessely_kernel(x: f64, n: f64) -> Result<f64, WorksheetErrorCode> {
if !x.is_finite() { return Err(WorksheetErrorCode::Num); }
let n = order(n)?;
let x = D::new(x);
if !(x.0 > 0.0) {
return Err(WorksheetErrorCode::Num);
}
finish(match n {
0 => y0(x),
1 => y1(x),
_ => Ok(forward(x, n, y0(x)?, y1(x)?, false)),
})
}
y0 · 5 lines · calc-func/src/ported/bessel_rational.rs on GitHubpub(super) fn y0(x: f64) -> f64 {
let square = x * x;
let rational = polynomial(square, Y0_NUM) / polynomial(square, Y0_DEN);
rational + j0(x) * (W * excel_log(x))
}
y1 · 5 lines · calc-func/src/ported/bessel_rational.rs on GitHubpub(super) fn y1(x: f64) -> f64 {
let square = x * x;
let rational = (x * polynomial(square, Y1_NUM)) / polynomial(square, Y1_DEN);
rational + W * (j1(x) * excel_log(x) - 1.0 / x)
}
y1_large · 12 lines · calc-func/src/ported/bessel_rational.rs on GitHubpub(super) fn y1_large(x: f64) -> f64 {
let square = x * x;
let phase = x - 2.356194491;
let reduction = 64.0 / square;
let amplitude = polynomial(reduction, AMP1);
let correction = polynomial(reduction, PHASE1);
let leading = excel_sin(phase) * amplitude;
let trailing = ((8.0 / x) * excel_cos(phase)) * correction;
let combined = leading + trailing;
let scale = (W / x).sqrt();
scale * combined
}
y0_large · 11 lines · calc-func/src/ported/bessel_rational.rs on GitHubpub(super) fn y0_large(x: f64) -> f64 {
let square = x * x;
let phase = x - 0.785398164;
let reduction = 64.0 / square;
let amplitude = polynomial(reduction, AMP0);
let correction = polynomial(reduction, PHASE_Y0);
let leading = excel_sin(phase) * amplitude;
let trailing = ((8.0 / x) * excel_cos(phase)) * correction;
let scale = (W / x).sqrt();
scale * (leading + trailing)
}
Kernels shared with other functions
radix_kindcatalogue/engineeringbesselcatalogue/engineeringabsported/besseladmit_phaseported/besselorderported/besselforwardported/besselfinishported/besselpolynomialported/bessel_rationalpolynomial_withported/bessel_rationalj0ported/bessel_rationalj1ported/bessel_rationalsin_withported/excel_numericcos_withported/excel_numericexcel_sinported/excel_numericexcel_cosported/excel_numericpack_rawported/excel_numeric/soft87zeroported/excel_numeric/soft87infported/excel_numeric/soft87packported/excel_numeric/soft87ext_piported/excel_numeric/soft87ext_oneported/excel_numeric/soft87ext_absported/excel_numeric/soft87ext_chsported/excel_numeric/soft87
Argument and result plumbing
No implementation has been published with a Handbook test suite for this function.
Version differences
No same-input comparison between named Excel builds is recorded for this function here. The documented behaviour below is not a measurement of every Excel release.
Alternatives
BESSELI and BESSELK are modified Bessel functions. BESSELJ supplies the other ordinary kind.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents