Skip to content

Cgal core thread local precision efif - #9885

Open
efifogel wants to merge 2 commits into
CGAL:mainfrom
efifogel:CGAL_Core-thread_local_precision-efif
Open

efifogel wants to merge 2 commits into
CGAL:mainfrom
efifogel:CGAL_Core-thread_local_precision-efif

Conversation

@efifogel

@efifogel efifogel commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary of Changes

Made the precisions of CORE thread-local

The default relative and absolute precisions, and the precisions of BigFloat division and square root, were shared by all threads. The algebraic kernels set them temporarily (through set_precision() of the bigfloat intervals), so concurrent computations with algebraic numbers used the precisions of each other, which could produce wrong results or failed assertions. Every thread now has its own precision, which starts with the defaults.

I added a test and kept changes to a minimum.

Release Management

  • Affected package(s): CGAL_Core
  • Issue(s) solved (if any): fix #0000, fix #0000,...
  • Feature/Small Feature (if any):
  • Link to compiled documentation (obligatory for small feature) wrong link name to be changed
  • License and copyright ownership: unchanged

The default relative and absolute precisions, and the precisions of BigFloat
division and square root, were shared by all threads. The algebraic kernels set
them temporarily (through set_precision() of the bigfloat intervals), so
concurrent computations with algebraic numbers used the precisions of each
other, which could produce wrong results or failed assertions. Every thread now
has its own precisions, which start with the defaults. Added a test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant