Files
2025-10-25 03:02:53 +03:00

37 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[cfenv.thread]
# 29 Numerics library [[numerics]](./#numerics)
## 29.3 The floating-point environment [[cfenv]](cfenv#thread)
### 29.3.2 Threads [cfenv.thread]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L159)
The floating-point environment has [thread storage duration](basic.stc.thread#def:storage_duration,thread "6.8.6.3Thread storage duration[basic.stc.thread]")[.](#1.sentence-1)
The initial state for a thread's floating-point
environment is the state of the floating-point environment of the thread that constructs
the corresponding thread object ([[thread.thread.class]](thread.thread.class "32.4.3Class thread"))
or jthread object ([[thread.jthread.class]](thread.jthread.class "32.4.4Class jthread"))
at the time it
constructed the object[.](#1.sentence-2)
[*Note [1](#note-1)*:
That is, the child thread gets the floating-point
state of the parent thread at the time of the child's creation[.](#1.sentence-3)
— *end note*]
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L172)
A separate floating-point environment is maintained for each thread[.](#2.sentence-1)
Each function
accesses the environment corresponding to its calling thread[.](#2.sentence-2)