Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
161ca2f
test commit
demroz Jun 24, 2025
d8bd5e7
test commit
mzhelyez Jun 25, 2025
83d7b1a
Add macOS long double to fp_traits for double precision
mborland Jun 30, 2025
008a31c
MSVC also uses 64-bit long doubles
mborland Jul 3, 2025
e6af424
working rvar
mzhelyez Jul 15, 2025
62b56b9
Merge branch 'boostorg:develop' into develop
demroz Jul 15, 2025
c66cf2b
working differentiation
mzhelyez Jul 21, 2025
89f846a
working differentiation
mzhelyez Jul 21, 2025
506129e
working tape management
mzhelyez Jul 23, 2025
73b2931
working differentiation
mzhelyez Jul 23, 2025
d2645c6
clean up code
mzhelyez Jul 23, 2025
34b866a
working higher order derivatives
mzhelyez Jul 29, 2025
4698857
removed build files
Jul 29, 2025
27ed863
added constant mult/add
Jul 29, 2025
a65ec02
added constant mult/add
Jul 29, 2025
c572315
added subtraction adndivision and fixed tests
mzhelyez Jul 31, 2025
dfc5631
added bool overloads and tests
mzhelyez Jul 31, 2025
c9e115d
fixes
mzhelyez Jul 31, 2025
5629386
Avoid using long double in fourier integrals when not supported
andrjohns Aug 1, 2025
3d86cef
Merge pull request #1290 from andrjohns/fourier-long-double
mborland Aug 1, 2025
31b94bf
Use `if constexpr` for type based branching in fourier integrals
mborland Aug 1, 2025
c68d746
Merge pull request #1291 from boostorg/ooura_constexpr
mborland Aug 1, 2025
800e35f
added stl functions
Aug 5, 2025
6868623
Merge branch 'boostorg:develop' into develop
demroz Aug 5, 2025
4285d87
added linear regression example
Aug 6, 2025
83e9b33
resolve merge conflics
Aug 6, 2025
ae8d70f
Merge pull request #2 from demroz/working_differentiation
demroz Aug 6, 2025
cf93c69
added linear regression example
Aug 6, 2025
1db9e2f
Merge pull request #3 from demroz/working_differentiation
demroz Aug 6, 2025
f52df1c
Investigate small-arg logic as in issue
ckormanyos Aug 7, 2025
018010e
Rework logic and check some branch cover
ckormanyos Aug 7, 2025
0703718
Handle review comments and add tests
ckormanyos Aug 7, 2025
c95226b
Handle further review comments
ckormanyos Aug 7, 2025
5df2a0b
fixed some tests not passing on intel cpu
mzhelyez Aug 7, 2025
93717ba
Simplify issue1292 test code
ckormanyos Aug 9, 2025
ad3eace
Merge pull request #1293 from boostorg/issue1292
ckormanyos Aug 9, 2025
505511f
Fix the 'function' name for the logistic logcdf function.
WarrenWeckesser Aug 9, 2025
39f9385
remove eigen dir
mzhelyez Aug 10, 2025
357477d
cleanup eigen sanity check
mzhelyez Aug 10, 2025
4ead0b9
removed eigen stuff
mzhelyez Aug 10, 2025
4d7d6e1
Merge pull request #1295 from WarrenWeckesser/fix-logistic-logcdf-name
mborland Aug 11, 2025
aa445f6
Implement logistic function
mborland Aug 12, 2025
3ffbcfe
Add logistic function testing
mborland Aug 12, 2025
bb699fa
Implement logit function
mborland Aug 12, 2025
2e66849
Rename
mborland Aug 12, 2025
c26f50f
Add missing pragma
mborland Aug 12, 2025
ce144e2
Add logit test set
mborland Aug 12, 2025
064ca93
Explicitly cast to result
mborland Aug 12, 2025
b33d31a
Use new functions with logisitic distribution
mborland Aug 12, 2025
f3a823d
Add reproducer for github issue 1294
mborland Aug 12, 2025
a3d22ea
Adjust tolerances
mborland Aug 12, 2025
6068d7a
Only adjust the FPU flags when we have access
mborland Aug 12, 2025
488cd2f
Action review comments replacing fenv manipulation
mborland Aug 12, 2025
a453cb3
Ignore lines that should not be hit
mborland Aug 12, 2025
4c086e6
Fix return types for concept tests
mborland Aug 12, 2025
6893b74
Add and fix additional test case
mborland Aug 12, 2025
79ab23f
Move sign position
mborland Aug 12, 2025
24e59fd
Remove double negatives and now excess using statements
mborland Aug 13, 2025
940fdd8
Add log_pi constant and tests
andrjohns Aug 13, 2025
4b201ab
Missed tests
andrjohns Aug 13, 2025
0353afe
Add log_pi to pi related constants doc section
mborland Aug 14, 2025
b042910
Make power a promoted real type
mborland Aug 14, 2025
c49115c
Add make_forwarding_policy and make_forwarding_policy_t
mborland Aug 14, 2025
dc23aa3
Disable further promotion with forwarding policy
mborland Aug 14, 2025
d87ce89
Check validity of initial policy
mborland Aug 14, 2025
067c6e7
Add documentation
mborland Aug 14, 2025
2519259
Merge pull request #1298 from andrjohns/log-pi-constant
mborland Aug 14, 2025
f87d826
Remove incorrect assertion
mborland Aug 14, 2025
8af493f
added gamma function overloads
mzhelyez Aug 14, 2025
483f36c
Merge pull request #1297 from boostorg/1296
mborland Aug 14, 2025
47cf220
more special function changes
mzhelyez Aug 15, 2025
047df54
erf/erfc/inverse support
mzhelyez Aug 15, 2025
b0e1193
Repair issue1292 adhoc tests for MP types
ckormanyos Aug 15, 2025
dadd45c
Merge pull request #1300 from boostorg/repair_issue1292_test
ckormanyos Aug 16, 2025
716b6fc
Repair yet again issue 1292 tests
ckormanyos Aug 16, 2025
451479c
Properly handle real_concept tolerance
ckormanyos Aug 16, 2025
bacc88b
grad fixes, and added black and scholes example
mzhelyez Aug 16, 2025
7535ee1
Merge pull request #1301 from boostorg/repair_issue1292
ckormanyos Aug 16, 2025
0f26461
fixed failining tests and added test support to jamfile
mzhelyez Aug 16, 2025
e2d5c3c
added license
mzhelyez Aug 16, 2025
0aa218a
added examples to jamfile
mzhelyez Aug 16, 2025
b5429d4
Merge pull request #4 from demroz/integrate_b2_build
demroz Aug 16, 2025
0b319a3
Merge branch 'boostorg:develop' into develop
demroz Aug 16, 2025
88d8346
cleaneed up files
mzhelyez Aug 16, 2025
94a1a92
more files cleaned up
mzhelyez Aug 16, 2025
6bae05e
removed old test
mzhelyez Aug 16, 2025
c7f9f57
added licence files and removed py files
Aug 16, 2025
7ed0c86
removed tabs, added licence, removed old files
Aug 16, 2025
8d3b036
boost assert
Aug 16, 2025
712c96e
removed tabs in comments
Aug 16, 2025
96f12fc
Remove documentation for z-test function which doesn't exist
andrjohns Aug 16, 2025
21abd02
Explicitly use precise FP and remove a warning
ckormanyos Aug 17, 2025
88fcb70
Remember to try the tests on all runners
ckormanyos Aug 17, 2025
309d95e
Merge pull request #1303 from andrjohns/z-test-docs
mborland Aug 17, 2025
af813e4
Attempt template resolution on old GCC
ckormanyos Aug 17, 2025
85f457d
Merge branch 'develop' into failing_jso_test
ckormanyos Aug 17, 2025
dcb6c1a
Try for all runners on jSO tests
ckormanyos Aug 17, 2025
ce428a7
Merge branch 'develop' of https://github.com/demroz/math into develop
mzhelyez Aug 17, 2025
07ee991
Exclude strangely enough only GCC8 from jSO
ckormanyos Aug 17, 2025
8b1a03d
Repair non-portable PP-directives
ckormanyos Aug 17, 2025
62b47b5
msvc builds should ideally pass now
mzhelyez Aug 17, 2025
73d7523
Merge pull request #1304 from boostorg/failing_jso_test
ckormanyos Aug 17, 2025
4a433c4
removed tabs from reverse_mode_autodiff_stl_overloads.hpp
mzhelyez Aug 17, 2025
ccb6ad0
cleaned up code base don mborland's suggestions [ci skip]
mzhelyez Aug 18, 2025
0471ccc
removed unused parameters from derivative functions [ci skip]
mzhelyez Aug 19, 2025
5193b61
Handle trivial warns GCC/clang/MSVC
ckormanyos Aug 20, 2025
602f227
Merge pull request #5 from ckormanyos/warnings_gcc_clang_msvc
demroz Aug 20, 2025
b53cfc2
modified template variable names, changed copies to references
mzhelyez Aug 21, 2025
d95fe16
fixed overwritten conflicts from last merge, added .reserve to vector…
mzhelyez Aug 21, 2025
5f86216
Handle more conversion warnings
ckormanyos Aug 22, 2025
e4f1d82
Repair CI failures
ckormanyos Aug 22, 2025
4d5ec95
Remove optimize-tests Boost.Units types
ckormanyos Aug 22, 2025
c2284b4
Merge pull request #1306 from boostorg/more_warnings
ckormanyos Aug 22, 2025
1c7ef46
added autodiff reverse docs
mzhelyez Aug 24, 2025
8bb3a24
added graphs
mzhelyez Aug 24, 2025
21b8e70
Merge pull request #8 from demroz/rdiff-docs
demroz Aug 24, 2025
afc6577
added ability to turn off ets with a macro
mzhelyez Aug 25, 2025
b390ae0
Update doc/differentiation/autodiff_reverse.qbk
demroz Aug 25, 2025
d3e440c
Apply suggestions from code review
demroz Aug 25, 2025
33e2c24
modified docs
mzhelyez Aug 25, 2025
af4d914
rewrote reverse mode over reverse mode part of docs
mzhelyez Aug 25, 2025
dac677c
Correct garbage result in non-central beta and T.
jzmaddock Aug 25, 2025
8aa7b57
Repair again adhoc BesselJ tests
ckormanyos Aug 25, 2025
2c943fb
added CMakeLists.txt back
mzhelyez Aug 25, 2025
12bf580
Merge pull request #1311 from boostorg/repair_bessel_tests
ckormanyos Aug 25, 2025
7967bda
Merge pull request #1310 from boostorg/issue1308
jzmaddock Aug 26, 2025
4a71610
Merge remote-tracking branch 'origin/develop' into add_no_expression_…
mzhelyez Aug 26, 2025
92076c6
Merge pull request #1302 from demroz/develop
mborland Aug 26, 2025
dd0dcfd
Simply remove the special 1292 tests
ckormanyos Aug 26, 2025
e3e7854
Merge branch 'develop' into remove_1292_special_tests
ckormanyos Aug 26, 2025
b936754
added docs and renamed ET macro
mzhelyez Aug 27, 2025
d9b9a4c
Merge pull request #9 from demroz/add_no_expression_template_support
demroz Aug 27, 2025
4323902
Merge pull request #1312 from boostorg/remove_1292_special_tests
ckormanyos Aug 28, 2025
cf12642
Repair neg-zero and tiny-arg erf and erfc
ckormanyos Aug 29, 2025
739f483
Further simplify erf and add tests
ckormanyos Aug 29, 2025
c1d2bec
Repair erroneous implicit cast
ckormanyos Aug 29, 2025
5561669
Fix return type in catmull_rom doc
andrjohns Aug 29, 2025
004b138
Merge pull request #1316 from andrjohns/catmull_rom-doc
mborland Aug 29, 2025
0992ba6
Merge pull request #1283 from boostorg/ldbl
mborland Aug 29, 2025
ab265d4
Merge pull request #1315 from boostorg/edges_c99_funcs
ckormanyos Aug 29, 2025
a0d785f
added tests for c++23 <stdfloat>
mzhelyez Sep 2, 2025
be841f2
add explicit HUGE value test for ldexp
mzhelyez Sep 2, 2025
0234808
modifed ET macro
mzhelyez Sep 2, 2025
5ba3c38
Add 3-arg hypot impl
mborland Sep 8, 2025
1b565ea
Add forward decl
mborland Sep 8, 2025
fb5641a
Fix SFINAE for 2-arg + policy and 3 arg w/o policy
mborland Sep 8, 2025
5f15c8f
Add div by 0 check
mborland Sep 8, 2025
2955888
Fix naming convention
mborland Sep 8, 2025
8f09cda
Add three arg test cases
mborland Sep 8, 2025
b8e1276
Add doc blurb
mborland Sep 8, 2025
26f4e2b
autogenerated compile tests and added table to docs
mzhelyez Sep 8, 2025
8a1b04f
jamfiole fixes
mzhelyez Sep 8, 2025
ec3fd50
another jamfile fix
mzhelyez Sep 8, 2025
669557e
Add to compile and instantiate tests
mborland Sep 9, 2025
0830511
Strip cv ref t from is_policy and add C++17-esque overload
mborland Sep 9, 2025
8c2c5be
Use is_policy for SFINAE
mborland Sep 9, 2025
e97efb1
Merge pull request #1318 from boostorg/1114
mborland Sep 9, 2025
9a5158c
added licence, hopefully fixed the jamfile, modified docs, fixed airy…
mzhelyez Sep 9, 2025
36d7f22
removed quote in Jamfile
mzhelyez Sep 9, 2025
fb72a65
added licence to some files, removed unused tests
mzhelyez Sep 9, 2025
66175e3
hopefully fix mscvc tests [windows]
mzhelyez Sep 9, 2025
7535a6e
added boost_math_std_using to trunc overload [windows]
mzhelyez Sep 9, 2025
5a5225d
Add limited runners for testing of reverse mode auto diff with long test
mborland Sep 10, 2025
04b5fef
Merge remote-tracking branch 'origin/develop' into develop
mborland Sep 10, 2025
f4ef5c6
updated compile tests
mzhelyez Sep 13, 2025
0d83439
adjusted test tolerances
mzhelyez Sep 13, 2025
274415a
doc fix
mzhelyez Sep 13, 2025
69d1fa7
added license to python scripts
mzhelyez Sep 13, 2025
d0d1d44
added newline characters to end of all cpp files inside the test_reve…
mzhelyez Sep 14, 2025
5da8c52
removed tabs from .py file
mzhelyez Sep 14, 2025
3f1a5a7
added boost-no-inspect to autogen script
mzhelyez Sep 15, 2025
9733e12
Add limited runners for testing of reverse mode auto diff with long test
mborland Sep 10, 2025
9224e97
should fix c++23 types
mzhelyez Sep 17, 2025
811fa5a
added newline
mzhelyez Sep 17, 2025
758a9fc
Merge pull request #1319 from demroz/fix-long-running-tests
mborland Sep 18, 2025
260f9d4
Stop using ccache
mborland Sep 18, 2025
c53d28c
Add coverage of reverse-mode autodiff
mborland Sep 18, 2025
2697069
Merge pull request #1320 from boostorg/ci_changes
mborland Sep 18, 2025
b684b66
Fix the name in the inverse_chi_squared mean error message.
WarrenWeckesser Sep 23, 2025
d1b3948
Make SYCL device support opt-in for us too
mborland Sep 26, 2025
c116bc3
Merge pull request #1321 from WarrenWeckesser/invchi2-mean-err-typo
mborland Sep 26, 2025
37c492e
Add doc note that SYCL support is opt-in
mborland Sep 26, 2025
3bb781a
Don't check second macro if user said to use sycl
mborland Sep 26, 2025
abcd08c
Fix CMake not passing macro to all unit tests
mborland Sep 26, 2025
0eacea6
Merge pull request #1323 from boostorg/sycl
mborland Sep 26, 2025
868f959
Delete boost::math::is_trivial & is_trivial_v.
Romain-Geissler-1A Oct 1, 2025
4eaf33c
Merge pull request #1324 from Romain-Geissler-1A/remove-is_trivial
mborland Oct 1, 2025
d1eb25c
Update project version and cmake minimum versions, require C++14
mborland Oct 3, 2025
975672b
Merge pull request #1325 from boostorg/update_cmake
mborland Oct 3, 2025
1d7afe1
Fix undefined types with new GCC
mborland Oct 23, 2025
863c7eb
Add std namespace and header for cstdint types
mborland Oct 23, 2025
6ee28f2
Merge pull request #1331 from boostorg/fix_missing_headers
mborland Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def main(ctx):
things_to_test = [ "special_fun", "distribution_tests", "mp", "misc", "interpolators", "quadrature", "autodiff", "long-running-tests", "float128_tests", "concepts" ]
gcc13_things_to_test = [ "special_fun", "distribution_tests", "mp", "misc", "interpolators", "quadrature", "autodiff", "long-running-tests", "float128_tests", "concepts", "new_floats" ]
sanitizer_test = [ "special_fun", "distribution_tests", "misc", "interpolators", "quadrature", "float128_tests" ]
reverse_mode_autodiff_test = [ "test_reverse_mode_autodiff", "autodiff-long-running-tests" ]
gnu_5_stds = [ "gnu++14", "c++14" ]
gnu_6_stds = [ "gnu++14", "c++14", "gnu++17", "c++17" ]
clang_6_stds = [ "c++14", "c++17" ]
Expand Down Expand Up @@ -68,6 +69,10 @@ def main(ctx):
for cxx in gcc13_stds:
result.append(linux_cxx("Ubuntu g++-13 " + cxx + " " + suite, "g++-13", packages="g++-13", buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-13', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
result.append(linux_cxx("Ubuntu g++-14 " + cxx + " " + suite, "g++-14", packages="g++-14", buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-14', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
for suite in reverse_mode_autodiff_test:
for cxx in gcc13_stds:
result.append(linux_cxx("Ubuntu g++-13 " + cxx + " " + suite, "g++-13", packages="g++-13", buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-13', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
result.append(linux_cxx("Ubuntu g++-14 " + cxx + " " + suite, "g++-14", packages="g++-14", buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-14', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))

return result

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ jobs:
compiler: gcc-12, cxxstd: '20', os: ubuntu-22.04, install: 'g++-12-multilib', address-model: '64', suite: 'interpolators' }
- { name: Collect coverage autodiff, coverage: yes,
compiler: gcc-12, cxxstd: '20', os: ubuntu-22.04, install: 'g++-12-multilib', address-model: '64', suite: 'autodiff' }
- { name: Collect coverage reverse-autodiff, coverage: yes,
compiler: gcc-12, cxxstd: '20', os: ubuntu-22.04, install: 'g++-12-multilib', address-model: '64', suite: 'test_reverse_mode_autodiff' }
timeout-minutes: 360
runs-on: ${{matrix.os}}
container: ${{matrix.container}}
env: {B2_USE_CCACHE: 1}
env: {B2_USE_CCACHE: 0}

steps:
- name: Setup environment
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ test/cuda
**/.temps/*
build/*
.vscode/*
*.svg
#*.svg
tools/bin/**
.idea/*

# autogenerated for table in reverse mode docs
doc/differentiation/compilation_table.txt
test/test_reverse_mode_autodiff_special_functions_compile/generated_jam_compile_commands.txt
# CMake Related Options
*.a
*.o
Expand All @@ -28,3 +30,4 @@ cmake-build-debug/*
build.ninja
.ninja*
a.out

6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt

cmake_minimum_required(VERSION 3.5...3.16)
cmake_minimum_required(VERSION 3.8...3.16)

project(boost_math VERSION 1.89.0 LANGUAGES CXX)
project(boost_math VERSION 1.90.0 LANGUAGES CXX)

add_library(boost_math INTERFACE)

Expand Down Expand Up @@ -45,6 +45,8 @@ else()

endif()

target_compile_features(boost_math INTERFACE cxx_std_14)

if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

add_subdirectory(test)
Expand Down
1 change: 1 addition & 0 deletions doc/constants/constants.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ This section lists the mathematical constants, their use(s) (and sometimes ratio
[[pi_minus_three] [[pi]-3] [0.141593] [] ]
[[four_minus_pi] [4 -[pi]] [0.858407] [] ]
[[pi_pow_e] [[pi][super e]] [22.4591] [] ]
[[log_pi] [ln([pi])] [1.14473] [] ]

[[pi_sqr] [[pi][super 2]] [9.86960] [] ]
[[pi_sqr_div_six] [[pi][super 2]/6] [1.64493] [] ]
Expand Down
809 changes: 809 additions & 0 deletions doc/differentiation/autodiff_reverse.qbk

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions doc/equations/autodiff/reverse_mode_autodiff_ex_eq.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,230 changes: 1,230 additions & 0 deletions doc/graphs/autodiff/autodiff_reverse_graph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6,843 changes: 6,843 additions & 0 deletions doc/html/math_toolkit/autodiff0.html

Large diffs are not rendered by default.

207 changes: 207 additions & 0 deletions doc/html/math_toolkit/dist_ref/dists/holtsmark_dist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Holtsmark Distribution</title>
<link rel="stylesheet" href="../../../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="../../../index.html" title="Math Toolkit 4.2.1">
<link rel="up" href="../dists.html" title="Distributions">
<link rel="prev" href="geometric_dist.html" title="Geometric Distribution">
<link rel="next" href="hyperexponential_dist.html" title="Hyperexponential Distribution">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="geometric_dist.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="hyperexponential_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="math_toolkit.dist_ref.dists.holtsmark_dist"></a><a class="link" href="holtsmark_dist.html" title="Holtsmark Distribution">Holtsmark
Distribution</a>
</h4></div></div></div>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">distributions</span><span class="special">/</span><span class="identifier">holtsmark</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></pre>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span> <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span>
<span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a> <span class="special">=</span> <a class="link" href="../../pol_ref/pol_ref_ref.html" title="Policy Class Reference">policies::policy&lt;&gt;</a> <span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">holtsmark_distribution</span><span class="special">;</span>

<span class="keyword">typedef</span> <span class="identifier">holtsmark_distribution</span><span class="special">&lt;&gt;</span> <span class="identifier">holtsmark</span><span class="special">;</span>

<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">RealType</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../../policy.html" title="Chapter 22. Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">holtsmark_distribution</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">RealType</span> <span class="identifier">value_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">Policy</span> <span class="identifier">policy_type</span><span class="special">;</span>

<span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">holtsmark_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">location</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span>

<span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">location</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<p>
The <a href="http://en.wikipedia.org/wiki/holtsmark_distribution" target="_top">Holtsmark
distribution</a> is named after Johan Peter Holtsmark. It is special
case of a <a href="http://en.wikipedia.org/wiki/Stable_distribution" target="_top">stable
distribution</a> with shape parameter α=3/2, β=0.
</p>
<p>
<a href="http://en.wikipedia.org/wiki/Probability_distribution" target="_top">probability
distribution function PDF</a> given by:
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../../../equations/holtsmark_ref1.svg"></span>

</p></blockquote></div>
<p>
The location parameter μ is the location of the distribution, while the scale
parameter [c] determines the width of the distribution. If the location
is zero, and the scale 1, then the result is a standard holtsmark distribution.
</p>
<p>
The distribution especially used in astrophysics for modeling gravitational
bodies.
</p>
<p>
The following graph shows how the distributions moves as the location parameter
changes:
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../../../graphs/holtsmark_pdf1.svg" align="middle"></span>

</p></blockquote></div>
<p>
While the following graph shows how the shape (scale) parameter alters
the distribution:
</p>
<div class="blockquote"><blockquote class="blockquote"><p>
<span class="inlinemediaobject"><img src="../../../../graphs/holtsmark_pdf2.svg" align="middle"></span>

</p></blockquote></div>
<h5>
<a name="math_toolkit.dist_ref.dists.holtsmark_dist.h0"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.holtsmark_dist.member_functions"></a></span><a class="link" href="holtsmark_dist.html#math_toolkit.dist_ref.dists.holtsmark_dist.member_functions">Member
Functions</a>
</h5>
<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">holtsmark_distribution</span><span class="special">(</span><span class="identifier">RealType</span> <span class="identifier">location</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">RealType</span> <span class="identifier">scale</span> <span class="special">=</span> <span class="number">1</span><span class="special">);</span>
</pre>
<p>
Constructs a holtsmark distribution, with location parameter <span class="emphasis"><em>location</em></span>
and scale parameter <span class="emphasis"><em>scale</em></span>. When these parameters take
their default values (location = 0, scale = 1) then the result is a Standard
holtsmark Distribution.
</p>
<p>
Requires scale &gt; 0, otherwise calls <a class="link" href="../../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>.
</p>
<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">location</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
Returns the location parameter of the distribution.
</p>
<pre class="programlisting"><span class="identifier">BOOST_MATH_GPU_ENABLED</span> <span class="identifier">RealType</span> <span class="identifier">scale</span><span class="special">()</span><span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
Returns the scale parameter of the distribution.
</p>
<h5>
<a name="math_toolkit.dist_ref.dists.holtsmark_dist.h1"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.holtsmark_dist.non_member_accessors"></a></span><a class="link" href="holtsmark_dist.html#math_toolkit.dist_ref.dists.holtsmark_dist.non_member_accessors">Non-member
Accessors</a>
</h5>
<p>
All the <a class="link" href="../nmp.html" title="Non-Member Properties">usual non-member accessor
functions</a> that are generic to all distributions are supported:
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.cdf">Cumulative Distribution Function</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.pdf">Probability Density Function</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.quantile">Quantile</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.hazard">Hazard Function</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.chf">Cumulative Hazard Function</a>,
__logcdf, __logpdf, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mean">mean</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.median">median</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.mode">mode</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.variance">variance</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.sd">standard deviation</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.skewness">skewness</a>, <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis">kurtosis</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis_excess">kurtosis_excess</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.range">range</a> and <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.support">support</a>. For this distribution
all non-member accessor functions are marked with <code class="computeroutput"><span class="identifier">BOOST_MATH_GPU_ENABLED</span></code>
and can be run on both host and device.
</p>
<p>
Note however that the holtsmark distribution does not have a skewness,
kurtosis, etc. See <a class="link" href="../../pol_ref/assert_undefined.html" title="Mathematically Undefined Function Policies">mathematically
undefined function</a> to control whether these should fail to compile
with a BOOST_STATIC_ASSERTION_FAILURE, which is the default.
</p>
<p>
Alternately, the functions <a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.skewness">skewness</a>,
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis">kurtosis</a> and
<a class="link" href="../nmp.html#math_toolkit.dist_ref.nmp.kurtosis_excess">kurtosis_excess</a>
will all return a <a class="link" href="../../error_handling.html#math_toolkit.error_handling.domain_error">domain_error</a>
if called.
</p>
<p>
The domain of the random variable is [-[max_value], +[min_value]].
</p>
<h5>
<a name="math_toolkit.dist_ref.dists.holtsmark_dist.h2"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.holtsmark_dist.accuracy"></a></span><a class="link" href="holtsmark_dist.html#math_toolkit.dist_ref.dists.holtsmark_dist.accuracy">Accuracy</a>
</h5>
<p>
The error is within 4 epsilon.
</p>
<p>
Errors in the PDF at 64-bit double precision:
</p>
<p>
<span class="inlinemediaobject"><img src="../../../../graphs/holtsmark_pdf_accuracy_64.png"></span>
</p>
<p>
Errors in the CDF-complement at 64-bit double precision:
</p>
<p>
<span class="inlinemediaobject"><img src="../../../../graphs/holtsmark_ccdf_accuracy_64.png"></span>
</p>
<h5>
<a name="math_toolkit.dist_ref.dists.holtsmark_dist.h3"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.holtsmark_dist.implementation"></a></span><a class="link" href="holtsmark_dist.html#math_toolkit.dist_ref.dists.holtsmark_dist.implementation">Implementation</a>
</h5>
<p>
See references.
</p>
<h5>
<a name="math_toolkit.dist_ref.dists.holtsmark_dist.h4"></a>
<span class="phrase"><a name="math_toolkit.dist_ref.dists.holtsmark_dist.references"></a></span><a class="link" href="holtsmark_dist.html#math_toolkit.dist_ref.dists.holtsmark_dist.references">References</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<a href="http://en.wikipedia.org/wiki/holtsmark_distribution" target="_top">Holtsmark
Distribution</a>
</li>
<li class="listitem">
T. Yoshimura, Numerical Evaluation and High Precision Approximation
Formula for Holtsmark Distribution, DOI: 10.36227/techrxiv.172054657.73020014/v1,
2024.
</li>
</ul></div>
</div>
<div class="copyright-footer">Copyright © 2006-2021 Nikhar Agrawal, Anton Bikineev, Matthew Borland,
Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert Holin, Bruno
Lalande, John Maddock, Evan Miller, Jeremy Murphy, Matthew Pulver, Johan Råde,
Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, Daryle
Walker and Xiaogang Zhang<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="geometric_dist.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../dists.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="hyperexponential_dist.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Loading