Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ideas from the C++ numerics library #9

Open
11 tasks
wolfram77 opened this issue Jan 20, 2023 · 1 comment
Open
11 tasks

Use ideas from the C++ numerics library #9

wolfram77 opened this issue Jan 20, 2023 · 1 comment
Assignees

Comments

@wolfram77
Copy link
Member

wolfram77 commented Jan 20, 2023

Consider the following enhancements. Include any functions that have not already been mentioned.

Basic operations

Floating point manipulation functions

Classification and comparison

Factor operations

Interpolation operations

@wolfram77
Copy link
Member Author

About copysign()

The copysign() function can be useful in situations where you want to preserve the magnitude of a number but change its sign based on another value. For example, it can be used in mathematical operations where the result should be positive or negative depending on the input, such as finding the distance between two points, or in physics simulations where the direction of movement is determined by the sign of the velocity.

It can also be useful in financial applications where the sign of a value represents the direction of a trade (positive for a buy, negative for a sell) but the magnitude represents the quantity of the trade, and you want to change the direction of the trade but preserve the quantity. Another use case can be in Computer Graphics when you want to keep the magnitude of a value (e.g. length) but change its sign based on the orientation of a surface or object.

@wolfram77 wolfram77 self-assigned this Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant