[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.3 Thread 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.3 Class thread"))
or jthread object ([[thread.jthread.class]](thread.jthread.class "32.4.4 Class 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)
