std::feupdateenv(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

std::feupdateenv(3) πŸ’…

okay bestie, welcome to the std::feupdateenv page from the C++ Standard Libary β€” yes, that's the manual name, typo and all, not me 😭. This is the C++ standard library glow-up of the floating-point environment vibe check.


πŸ’– NAME πŸ’–

std::feupdateenv - std::feupdateenv

Literally the name twice. Iconic. No notes.


🌸 Synopsis 🌸

Defined in header <cfenv>
int feupdateenv( const std::fenv_t* envp )  (since C++11)

So here's the sequence, and it matters: first, std::feupdateenv remembers the floating-point exceptions that are currently raised. Then it restores the floating-point environment from the object pointed to by envp β€” similar to std::fesetenv. Then it raises the floating-point exceptions that were saved. Full little relay race, periodt.

This function may be used to end the non-stop mode established by an earlier call to std::feholdexcept. iykyk ✨


πŸŽ€ Parameters πŸŽ€

  • envp β€” pointer to the object of type std::fenv_t set by an earlier call to std::feholdexcept or std::fegetenv, or equal to FE_DFL_ENV. <butterfly>That's the whole parameter, bestie, and every option for where it can come from is right there.</butterfly>

πŸ¦‹ Return value πŸ¦‹

0 on success, non-zero otherwise. Short, sweet, and absolutely not going to elaborate further.


⭐ See also ⭐

  • feholdexcept (C++11) β€” saves the environment, clears all status flags and ignores all future errors (function)
  • fegetenv (C++11) β€” saves or restores the current floating-point environment (function)
  • fesetenv (C++11) β€” saves or restores the current floating-point environment (function)
  • FE_DFL_ENV (C++11) β€” default floating-point environment (macro constant)
  • C documentation for feupdateenv

mwah πŸ’– source: http://cppreference.com Β· version/date: 2024.06.10 Β· std::feupdateenv(3) β€” byeee, go restore that environment responsibly 🫢

πŸ“¦ where this page comes from