2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Handle issue 1255 and update docs

This commit is contained in:
ckormanyos
2025-04-11 12:49:36 +02:00
parent a5c062542a
commit d07b79d377
4 changed files with 48 additions and 13 deletions

View File

@@ -3,11 +3,12 @@ Boost Math Library
>ANNOUNCEMENT: This library requires a compliant C++14 compiler.
| | Master | Develop |
|------------------|----------|-------------|
| Drone | [![Build Status](https://drone.cpp.al/api/badges/boostorg/math/status.svg?ref=refs/heads/master)](https://drone.cpp.al/boostorg/math) | [![Build Status](https://drone.cpp.al/api/badges/boostorg/math/status.svg)](https://drone.cpp.al/boostorg/math) |
| Github Actions | [![Build Status](https://github.com/boostorg/math/workflows/CI/badge.svg?branch=master)](https://github.com/boostorg/math/actions) | [![Build Status](https://github.com/boostorg/math/workflows/CI/badge.svg?branch=develop)](https://github.com/boostorg/math/actions) |
| Codecov | [![codecov](https://codecov.io/gh/boostorg/math/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/math/branch/master) | [![codecov](https://codecov.io/gh/boostorg/math/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/math/branch/develop) |
| Drone | [![Build Status](https://drone.cpp.al/api/badges/boostorg/math/status.svg?ref=refs/heads/master)](https://drone.cpp.al/boostorg/math) | [![Build Status](https://drone.cpp.al/api/badges/boostorg/math/status.svg)](https://drone.cpp.al/boostorg/math) |
| Github Actions | [![Build Status](https://github.com/boostorg/math/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/math/actions?query=branch%3Amaster) | [![Build Status](https://github.com/boostorg/math/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/math/actions?query=branch%3Adevelop) |
| Codecov | [![codecov](https://codecov.io/gh/boostorg/math/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/math/branch/master) | [![codecov](https://codecov.io/gh/boostorg/math/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/math/branch/develop) |
The Math library provides numerous advanced mathematical functions
@@ -26,11 +27,11 @@ Utility functions for dealing with floating point arithmetic, includes functions
### Specific Width Floating Point Types
A set of typedefs similar to those provided by `<cstdint>` but for floating point types.
A set of `typedef`s similar to those provided by C++20's `<stdfloat>` but in `namespace boost`.
### Mathematical Constants
A wide range of constants ranging from various multiples of π, fractions, Euler's constant, etc.
A wide range of constants ranging from fractions to various multiples of $\pi$, Euler's constant, etc.
These are of course usable from template code, or as non-templates with a simplified interface if that is more appropriate.
@@ -100,12 +101,12 @@ The full documentation is available on [boost.org](http://www.boost.org/doc/libs
### Standalone Mode
Defining BOOST_MATH_STANDALONE allows Boost.Math to be used without any Boost dependencies.
Defining `BOOST_MATH_STANDALONE` allows Boost.Math to be used without any Boost dependencies.
Some functionality is reduced in this mode. A static_assert message will alert you
if a particular feature has been disabled by standalone mode. Standalone mode is not designed to
be used with the rest of boost, and may result in compiler errors.
## Supported Compilers ##
## Supported Compilers
The following compilers are tested with the CI system, and are known to work.
Currently a compiler that is fully compliant with C++14 is required to use Boost.Math.
@@ -114,7 +115,7 @@ Currently a compiler that is fully compliant with C++14 is required to use Boost
* clang++ 5 or later
* Visual Studio 2015 (14.0) or later
## Support, bugs and feature requests ##
## Support, bugs and feature requests
Bugs and feature requests can be reported through the [GitHub issue tracker](https://github.com/boostorg/math/issues)
(see [open issues](https://github.com/boostorg/math/issues) and
@@ -125,7 +126,7 @@ You can submit your changes through a [pull request](https://github.com/boostorg
There is no mailing-list specific to Boost Math, although you can use the general-purpose Boost [mailing-list](http://lists.boost.org/mailman/listinfo.cgi/boost-users) using the tag [math].
## Development ##
## Development
Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)):
@@ -135,7 +136,8 @@ Clone the whole boost project, which includes the individual Boost projects as s
The Boost Math Library is located in `libs/math/`.
### Running tests ###
### Running tests
First, make sure you are in `libs/math/test`.
You can either run all the tests listed in `Jamfile.v2` or run a single test:
@@ -144,7 +146,8 @@ You can either run all the tests listed in `Jamfile.v2` or run a single test:
test$ # A more advanced syntax, demoing various options for building the tests:
test$ ../../../b2 -a -j2 -q --reconfigure toolset=clang cxxflags="--std=c++14 -fsanitize=address -fsanitize=undefined" linkflags="-fsanitize=undefined -fsanitize=address"
### Continuous Integration ###
### Continuous Integration
The default action for a PR or commit to a PR is for CI to run the full complement of tests. The following can be appended to the end of a commit message to modify behavior:
* [ci skip] to skip all tests
@@ -153,7 +156,8 @@ The default action for a PR or commit to a PR is for CI to run the full compleme
* [windows] to test MSVC-14.0, MSVC-14.2, MSVC-14.3, CYGWIN, and mingw on the latest version of Windows.
* [standalone] to run standalone mode compile tests
### Building documentation ###
### Building documentation
Full instructions can be found [here](https://svn.boost.org/trac10/wiki/BoostDocs/GettingStarted), but to reiterate slightly:

View File

@@ -59,7 +59,7 @@ BOOST_MATH_GPU_ENABLED T bessel_yn(int n, T x, const Policy& pol)
value = bessel_yn_small_z(n, x, &scale, pol);
if (tools::max_value<T>() * fabs(scale) < fabs(value))
return boost::math::sign(scale) * boost::math::sign(value) * policies::raise_overflow_error<T>(function, nullptr, pol);
value /= scale;
value = (factor * value) / scale;
}
else if(asymptotic_bessel_large_x_limit(n, x))
{

View File

@@ -194,6 +194,7 @@ test-suite special_fun :
[ run git_issue_1139.cpp ]
[ run git_issue_1175.cpp ]
[ run git_issue_1194.cpp ]
[ run git_issue_1255.cpp ]
[ run special_functions_test.cpp /boost/test//boost_unit_test_framework ]
[ run test_airy.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ]
[ run test_bessel_j.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ]

30
test/git_issue_1255.cpp Normal file
View File

@@ -0,0 +1,30 @@
// (C) Copyright Christopher Kormanyos 2025.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/core/lightweight_test.hpp>
#include <boost/math/special_functions/bessel.hpp>
#include <cmath>
#include <limits>
auto main() -> int
{
using float_type = float;
const float_type x { 0x1.03ebbp-128F };
const float_type ctrl { 0x1.41085ep+127F };
const float_type result = ::boost::math::cyl_neumann(-1, x);
const float_type tol = std::numeric_limits<float_type>::epsilon() * 16;
using std::fabs;
BOOST_TEST(result > 0);
BOOST_TEST(fabs(1 - (result / ctrl)) < tol);
return boost::report_errors();
}