Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
9963866
Optimize sqrt using hardware binary floating-point sqrt
Jan 24, 2026
d5f0f21
feat: optimize sqrt with SoftFloat-style lookup table algorithm
Jan 25, 2026
1e25560
Optimize sqrt() using lookup table to reduce Newton iterations
Jan 25, 2026
1b8b6cb
fix: remove unused file
Jan 25, 2026
06d6d09
Optimize sqrt() using SoftFloat-style lookup table
Jan 25, 2026
cacc4c5
fix : delete commit message
Jan 25, 2026
2d3416d
perf(cmath): optimize sqrt with lookup table + remainder elimination
Jan 26, 2026
3ca937f
Update packages
mborland Jan 27, 2026
c21396f
Update vcpkg version
mborland Jan 27, 2026
3529ce1
Update CMake Version
mborland Jan 27, 2026
1cbf5c7
Add alignment support and testing
mborland Jan 28, 2026
24668a2
Update fmt example and example output
mborland Jan 28, 2026
fc2723a
Apply same changes to <format> support
mborland Jan 28, 2026
1ea8ae7
Update docs and examples
mborland Jan 28, 2026
3a0a81b
Merge pull request #1326 from cppalliance/1167
mborland Jan 28, 2026
7e6dea3
Remove in-development conan package
mborland Jan 29, 2026
29510d0
Remove in development vcpkg
mborland Jan 29, 2026
7e6dc3e
Match current super project development version
mborland Jan 29, 2026
40f2516
Update jamfile
mborland Jan 29, 2026
147b9eb
Add check cmake version test
mborland Jan 29, 2026
7cfb7b5
Remove local package manager refs from readme
mborland Jan 29, 2026
2ab34da
Update example URLs
mborland Jan 29, 2026
93e6f9b
Update issue URLs
mborland Jan 29, 2026
1f559ba
Update warning URL
mborland Jan 29, 2026
713e8e5
Update badges
mborland Jan 29, 2026
c8927bb
Fix root index.html links
mborland Jan 29, 2026
019b9d0
Remove superfluous bash file
mborland Jan 29, 2026
925c46a
Update jamfile
mborland Jan 29, 2026
580d2d7
Build in doc/html instead of doc/decimal/html
mborland Jan 29, 2026
ac6352a
Remove lunr-extension as boost org has doc search
mborland Jan 29, 2026
3a1ed90
Fix new dependency
mborland Jan 29, 2026
be078b6
Merge pull request #1327 from boostorg/boost_integration
mborland Jan 29, 2026
ca437bd
docs(doc): add decimal vs binary float representation and bit layout
Jan 30, 2026
6406099
perf(cmath): sqrt table + remainder elimination; doc: decimal float a…
Jan 30, 2026
c52ee49
fix(sqrt): use gx×recip_sqrt for initial value per doc; correct doc a…
Jan 30, 2026
f28ab2c
fix(docs): remove unused doc
Jan 30, 2026
e1d6233
feat(sqrt): use SoftFloat-style two-table (k0/k1), 128 bins, 2^e→10^e…
Jan 30, 2026
6b4b1ff
feat(doc):rebuild
Jan 30, 2026
70e81d8
refactor(sqrt): split into SoftFloat-style sqrt32/64/128 impl and sha…
Jan 30, 2026
6552768
feat(sqrt): use integer remainder and 90-entry table
Jan 31, 2026
492203a
Rework <cmath>-style sqrt and cbrt
ckormanyos Feb 1, 2026
a633f94
Simplify trials count
ckormanyos Feb 2, 2026
9ad6295
Finishing touches and more CI exercise
ckormanyos Feb 2, 2026
4f156cd
Handle review comments
ckormanyos Feb 2, 2026
ce524bc
fix(sqrt): align approx_recip_sqrt with SoftFloat for decimal32/64
Feb 3, 2026
e72fd34
Merge pull request #1328 from boostorg/rework_sqrt_cbrt
ckormanyos Feb 3, 2026
4d86e88
Initial correction but needs refinement
ckormanyos Feb 3, 2026
145acb6
perf(sqrt): use SoftFloat-style integer arithmetic for sqrt
Feb 3, 2026
969d8b4
refactor(sqrt): rename files, drop dead code, use snake_case
Feb 3, 2026
f336133
This one seems to not hang preliminarily
ckormanyos Feb 3, 2026
716db5b
Clunky version frexp-no-hang
ckormanyos Feb 3, 2026
7eb2727
Less clunky but still clunky
ckormanyos Feb 3, 2026
3172c63
Further simplifications with more to come
ckormanyos Feb 3, 2026
d54af19
Merge upstream/develop, keep our sqrt implementation
Feb 4, 2026
9bb1345
perf(sqrt): optimize sqrt and remove test files for PR
Feb 4, 2026
883987e
perf(sqrt): optimize sqrt and remove test files for PR
Feb 4, 2026
63e2cb2
chore: trigger CI
Feb 4, 2026
608be71
fix(sqrt128): remove unused scale15 variable
Feb 4, 2026
0bc38a4
Handle trivial overlooed compiler warning
ckormanyos Feb 4, 2026
9bf8402
Fix -Wsign-conversion in approx_recip_sqrt64
Feb 4, 2026
5284cb4
fix(sqrt): resolve MSVC C4189 unused scale16 in sqrt64_impl
Feb 4, 2026
31e65cc
Speed optimize and add 128-bit tests
ckormanyos Feb 4, 2026
a58284e
Disable some third-party warnings
ckormanyos Feb 4, 2026
c1ea775
Disable more warnings
ckormanyos Feb 4, 2026
4f0ba9d
Complete dropping of support for GCC-7
mborland Feb 4, 2026
a65e20e
refactor(sqrt): use portable int128 and umul256, remove sqrt64 fallback
Feb 4, 2026
702da16
fix(cmath): restore scale16 constant accidentally removed from sqrt64…
Feb 4, 2026
29a8633
Fine-tune a warning disabling
ckormanyos Feb 4, 2026
9c40f85
Merge branch '1329' of https://github.com/boostorg/decimal into 1329
ckormanyos Feb 4, 2026
d09ca31
Handle proper warnings
ckormanyos Feb 4, 2026
1cb398e
Handle yet another compiler warning
ckormanyos Feb 4, 2026
fd56afc
fix(cmath): remove unused variable scale15 in sqrt128_impl.hpp
Feb 5, 2026
585567f
perf(sqrt128): use 64×64→128 for scale33; docs: fix accuracy and dedu…
Feb 5, 2026
8feb583
docs(sqrt): add performance benchmark section
Feb 5, 2026
b1f37c5
docs(sqrt): add performance benchmark section
Feb 5, 2026
61cc96e
test(sqrt): improve coverage for sqrt32/64/128 implementations
Feb 5, 2026
5736a80
Handle MP but note deprecated-warn MP
ckormanyos Feb 5, 2026
30db62d
refactor(sqrt): remove redundant gx normalization in sqrt32/64/128 impl
Feb 5, 2026
2ef90af
chore: remove accidentally committed sqrt_baseline.hpp
Feb 5, 2026
5e2c93f
Change clang detection macro
mborland Feb 5, 2026
1f10e9c
fix(test): use double for decimal128 sqrt tests to avoid ARM64/S390X …
Feb 5, 2026
fa4ba65
Get missing frexp/ldexp cover and PP syntax
ckormanyos Feb 5, 2026
3c232f0
Merge pull request #1330 from boostorg/1329
ckormanyos Feb 6, 2026
ecd408c
Test tuning and improvement
ckormanyos Feb 6, 2026
4856a02
Fix C++17 check for windows platforms
mborland Feb 6, 2026
0389663
Merge pull request #1331 from justinzhuguangwen/develop
mborland Feb 6, 2026
d30eed4
Merge branch 'develop' into tuning_tests
ckormanyos Feb 6, 2026
db29470
Reduce tols and improve tests
ckormanyos Feb 6, 2026
0444beb
Merge pull request #1335 from boostorg/1334
mborland Feb 6, 2026
23d6c58
Merge branch 'develop' into tuning_tests
ckormanyos Feb 6, 2026
fa60877
Further test improvements
ckormanyos Feb 6, 2026
8ab550c
Repair typo causing compiler warning
ckormanyos Feb 6, 2026
5fc146f
Disable a warning on MSVC in test
ckormanyos Feb 7, 2026
2933b5f
Restore Laguerre test for _WIN32
ckormanyos Feb 7, 2026
087fb29
Refactor more tests and tolerances
ckormanyos Feb 7, 2026
fc669ff
Merge pull request #1333 from boostorg/tuning_tests
ckormanyos Feb 7, 2026
de1bfbf
Refactor tests and switch opt O1 to O0
ckormanyos Feb 7, 2026
46e9952
Merge branch 'develop' into tuning_tests
ckormanyos Feb 7, 2026
c46e0cd
Go back to optimization 1
ckormanyos Feb 8, 2026
0fdffe5
Return to -O0 for coverage comparison
ckormanyos Feb 8, 2026
885e8af
Optimize decimal sqrt: precompute target, add mul128By64, use 128-bit…
Feb 9, 2026
0f39329
Merge pull request #1338 from justinzhuguangwen/develop
ckormanyos Feb 9, 2026
17cfe8b
Merge pull request #1336 from boostorg/tuning_tests
ckormanyos Feb 9, 2026
999ce9f
Reuse `r.ptr` instead of using strlen to get return size
pps83 Feb 14, 2026
e8870b2
Merge pull request #1339 from pps83/develop-tostr-len
mborland Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
};

[
linux_pipeline(
"Linux 18.04 GCC 7* 32/64",
"cppalliance/droneubuntu1804:1",
{ TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '14,17', ADDRMD: '64' },
"nload",
),

linux_pipeline(
"Linux 18.04 GCC 8 32/64",
"cppalliance/droneubuntu1804:1",
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ jobs:
fail-fast: false
matrix:
include:
- toolset: gcc-7
cxxstd: "03,11,14,17"
address_model: 64
os: ubuntu-latest
container: ubuntu:18.04
install:
- g++-7-multilib
- toolset: gcc-8
cxxstd: "03,11,14,17,2a"
address_model: 32,64
Expand Down
9 changes: 1 addition & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@

cmake_minimum_required(VERSION 3.10...3.20)

# Set version explicitly if not part of Boost superproject
if(NOT BOOST_SUPERPROJECT_VERSION)
set(BOOST_DECIMAL_VERSION 6.0.0)
else()
set(BOOST_DECIMAL_VERSION ${BOOST_SUPERPROJECT_VERSION})
endif()

project(boost_decimal VERSION ${BOOST_DECIMAL_VERSION} LANGUAGES CXX)
project(boost_decimal VERSION 1.91.0 LANGUAGES CXX)

add_library(boost_decimal INTERFACE)

Expand Down
27 changes: 10 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

| | Master | Develop |
|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
| Drone | [![Build Status](https://drone.cpp.al/api/badges/cppalliance/decimal/status.svg?ref=refs/heads/master)](https://drone.cpp.al/cppalliance/decimal) | [![Build Status](https://drone.cpp.al/api/badges/cppalliance/decimal/status.svg?ref=refs/heads/develop)](https://drone.cpp.al/cppalliance/decimal) |
| Github Actions | [![CI](https://github.com/cppalliance/decimal/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/cppalliance/decimal/actions/workflows/ci.yml) | [![CI](https://github.com/cppalliance/decimal/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/cppalliance/decimal/actions/workflows/ci.yml)
| Codecov | [![codecov](https://codecov.io/gh/cppalliance/decimal/branch/master/graph/badge.svg?token=drvY8nnV5S)](https://codecov.io/gh/cppalliance/decimal) | [![codecov](https://codecov.io/gh/cppalliance/decimal/graph/badge.svg?token=drvY8nnV5S)](https://codecov.io/gh/cppalliance/decimal) |
| Fuzzing | [![Fuzzing](https://github.com/cppalliance/decimal/actions/workflows/fuzz.yml/badge.svg?branch=master)](https://github.com/cppalliance/decimal/actions/workflows/fuzz.yml) | [![Fuzzing](https://github.com/cppalliance/decimal/actions/workflows/fuzz.yml/badge.svg?branch=develop)](https://github.com/cppalliance/decimal/actions/workflows/fuzz.yml) |
| Metal | [![Metal](https://github.com/cppalliance/decimal/actions/workflows/metal.yml/badge.svg?branch=master)](https://github.com/cppalliance/decimal/actions/workflows/metal.yml) | [![Metal](https://github.com/cppalliance/decimal/actions/workflows/metal.yml/badge.svg?branch=develop)](https://github.com/cppalliance/decimal/actions/workflows/metal.yml) |
| Drone | [![Build Status](https://drone.cpp.al/api/badges/boostorg/decimal/status.svg?ref=refs/heads/master)](https://drone.cpp.al/boostorg/decimal) | [![Build Status](https://drone.cpp.al/api/badges/boostorg/decimal/status.svg?ref=refs/heads/develop)](https://drone.cpp.al/boostorg/decimal) |
| Github Actions | [![CI](https://github.com/boostorg/decimal/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/decimal/actions/workflows/ci.yml) | [![CI](https://github.com/boostorg/decimal/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/decimal/actions/workflows/ci.yml)
| Codecov | [![codecov](https://codecov.io/gh/boostorg/decimal/branch/master/graph/badge.svg?token=drvY8nnV5S)](https://codecov.io/gh/boostorg/decimal) | [![codecov](https://codecov.io/gh/boostorg/decimal/graph/badge.svg?token=drvY8nnV5S)](https://codecov.io/gh/boostorg/decimal) |
| Fuzzing | [![Fuzzing](https://github.com/boostorg/decimal/actions/workflows/fuzz.yml/badge.svg?branch=master)](https://github.com/boostorg/decimal/actions/workflows/fuzz.yml) | [![Fuzzing](https://github.com/boostorg/decimal/actions/workflows/fuzz.yml/badge.svg?branch=develop)](https://github.com/boostorg/decimal/actions/workflows/fuzz.yml) |
| Metal | [![Metal](https://github.com/boostorg/decimal/actions/workflows/metal.yml/badge.svg?branch=master)](https://github.com/boostorg/decimal/actions/workflows/metal.yml) | [![Metal](https://github.com/boostorg/decimal/actions/workflows/metal.yml/badge.svg?branch=develop)](https://github.com/boostorg/decimal/actions/workflows/metal.yml) |

---

Expand All @@ -21,7 +21,7 @@ Simply `#include` it and use it.
## CMake

```sh
git clone https://github.com/cppalliance/decimal
git clone https://github.com/boostorg/decimal
cd decimal
mkdir build && cd build
cmake .. OR cmake .. -DCMAKE_INSTALL_PREFIX=/your/custom/path
Expand All @@ -32,25 +32,18 @@ then you can use `find_package(boost_decimal REQUIRED)`

## vcpkg

```sh
git clone https://github.com/cppalliance/decimal
cd decimal
vcpkg install decimal --overlay-ports=ports/decimal
```
Available in official vcpkg sources soon

## Conan

```sh
git clone https://github.com/cppalliance/decimal
conan create decimal/conan --build missing
```
Available in official conan sources soon

# Supported Platforms

Boost.Decimal is tested natively on Ubuntu (x86_64, s390x, and aarch64), macOS (x86_64, and Apple Silicon),
and Windows (x32 and x64); as well as emulated PPC64LE and ARM Cortex-M using QEMU with the following compilers:

* GCC 7 and later
* GCC 8 and later
* Clang 6 and later
* Visual Studio 2019 and later
* Intel OneAPI DPC++
Expand Down Expand Up @@ -90,7 +83,7 @@ They have their own implementations of the Standard-Library functions
(e.g. like those found in `<cmath>`, `<charconv>`, `<cstdlib>`, etc.).
The entire library can be conveniently included with `#include <boost/decimal.hpp>`

Using the decimal types is simple and can be learned by [example](https://develop.decimal.cpp.al/decimal/examples.html).
Using the decimal types is straightforward and can be learned by [example](https://develop.decimal.cpp.al/decimal/examples.html).
Their usage closely resembles that of built-in binary floating point types by design.

# Full Documentation
Expand Down
7 changes: 2 additions & 5 deletions build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@

require-b2 5.2 ;

project /boost/decimal
: common-requirements
<include>include
;
project /boost/decimal ;

explicit
[ alias boost_decimal ]
[ alias boost_decimal : : : : <include>include <library>$(boost_dependencies) ]
[ alias all : boost_decimal test ]
;

Expand Down
102 changes: 0 additions & 102 deletions conan/conanfile.py

This file was deleted.

1 change: 0 additions & 1 deletion conan/targets.cmake

This file was deleted.

53 changes: 12 additions & 41 deletions doc/Jamfile.v2
Original file line number Diff line number Diff line change
@@ -1,57 +1,28 @@
import generate ;
import path ;
import property-set ;
import virtual-target ;
# Copyright 2026 Joaquin M Lopez Munoz
# Distributed under 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)

path-constant HERE : . ;
import path ;

make html/index.html : build_antora.sh : @run-script ;
generate files-to-install : html/index.html : <generating-rule>@delayed-glob ;
install install
: files-to-install
: <location>html
<install-source-root>html/decimal
;
explicit html/index.html files-to-install ;
make html_ : build_antora.sh : @run-script ;

# this runs the antora script
actions run-script
{
bash $(>)
}

# this globs after its sources are created
rule delayed-glob ( project name : property-set : sources * )
{
for local src in $(sources)
{
# the next line causes the source to be generated immediately
# and not later (which it normally would)
UPDATE_NOW [ $(src).actualize ] ;
}
path-constant DOC_DIR : . ;
.node_modules = [ path.join $(DOC_DIR) node_modules ] ;

# we need to construct the path to the globbed directory;
# this path would be <current-project>/antora
local root = [ path.root html [ $(project).location ] ] ;
local files ;
make cleanup_node_modules_ : html_ : @cleanup-node-modules ;

# actual globbing happens here
for local file in [ path.glob-tree $(root) : * ]
{
# we have to skip directories, because our match expression accepts anything
if [ CHECK_IF_FILE $(file) ]
{
# we construct a list of targets to copy
files += [ virtual-target.from-file $(file:D=) : $(file:D) : $(project) ] ;
}
}

# we prepend empty usage requirements to the result
return [ property-set.empty ] $(files) ;
actions cleanup-node-modules
{
rm -rf $(.node_modules)
}

###############################################################################
alias boostdoc ;
explicit boostdoc ;
alias boostrelease : install ;
alias boostrelease : html_ cleanup_node_modules_ ;
explicit boostrelease ;
2 changes: 1 addition & 1 deletion doc/antora.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: decimal
name: ROOT
version: ~
title: Boost.Decimal
nav:
Expand Down
9 changes: 0 additions & 9 deletions doc/antora_docs.sh

This file was deleted.

5 changes: 2 additions & 3 deletions doc/decimal-playbook.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
site:
title: Boost.Decimal
start_page: decimal::index.adoc
start_page: ROOT::overview.adoc
content:
sources:
- url: ..
Expand All @@ -11,8 +11,7 @@ output:
ui:
bundle:
url: https://github.com/boostorg/website-v2-docs/releases/download/ui-develop/ui-bundle.zip
output_dir: decimal/_
output_dir: _
antora:
extensions:
- require: '@cppalliance/antora-downloads-extension'
- require: '@antora/lunr-extension'
Loading
Loading