Update math constants and functions - #521
Merged
Merged
Conversation
nkoukpaizan
marked this pull request as ready for review
August 4, 2026 20:39
nkoukpaizan
requested review from
lukelowry and
pelesh
and removed request for
pelesh
August 4, 2026 20:39
lukelowry
approved these changes
Aug 4, 2026
lukelowry
left a comment
Collaborator
There was a problem hiding this comment.
Good cleanup, all mechanical is seems. Two non-issues I left a comment for
nkoukpaizan
force-pushed
the
nicholson/math-updates
branch
from
August 4, 2026 20:56
8b427d3 to
1e9d88a
Compare
7 tasks
pelesh
approved these changes
Aug 4, 2026
pelesh
left a comment
Collaborator
There was a problem hiding this comment.
I think this is good to merge.
@alexander-novo please check changes to Distributed Generator.
…for math functions.
nkoukpaizan
force-pushed
the
nicholson/math-updates
branch
from
August 4, 2026 23:34
6b0689a to
4a91e5f
Compare
andrewxu319
pushed a commit
that referenced
this pull request
Aug 6, 2026
* Fix typo in expected errors message. * Include number in Constants.hpp. * Remove MATH_DEFINES, replace M_PI with std::numbers::pi_v; use std:: for math functions. * Remove cmath include from PhasorDynamics models. * Remove explicit cmath include from PhasorDynamics tests and apps. * Make DG Jacobian implementation a little more readable. * Use assign for DG rtemp instead of hard-coding repeated values. * Fix machine equations alignment with pi. * Additional spacing fixes for std::numbers::pi_v. --------- Co-authored-by: nkoukpaizan <nkoukpaizan@users.noreply.github.com>
andrewxu319
pushed a commit
that referenced
this pull request
Aug 6, 2026
* Fix typo in expected errors message. * Include number in Constants.hpp. * Remove MATH_DEFINES, replace M_PI with std::numbers::pi_v; use std:: for math functions. * Remove cmath include from PhasorDynamics models. * Remove explicit cmath include from PhasorDynamics tests and apps. * Make DG Jacobian implementation a little more readable. * Use assign for DG rtemp instead of hard-coding repeated values. * Fix machine equations alignment with pi. * Additional spacing fixes for std::numbers::pi_v. --------- Co-authored-by: nkoukpaizan <nkoukpaizan@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This updates the math constants and functions to used
std::numbers.Closes #95
Proposed changes
#define _USE_MATH_DEFINES#include <numbers>toConstants.hppand removed unnecessary includes in other files.M_PIforstd::numbers::pi_v<RealT>std::for the instances I could find.Checklist
-Wall -Wpedantic -Wconversion -Wextra.Further comments