Skip to content

Conversation

@HansOlsson
Copy link
Collaborator

Looking at #3651 I realized that there is no real reason not to vectorize min/max with two arguments.
One use-case would be that you can ensure that each element of a vector is >=0 by using: max(0, x).

@HansOlsson HansOlsson added the enhancement New feature or request label Nov 5, 2025
@HansOlsson HansOlsson added this to the 2025-November milestone Nov 5, 2025
@HansOlsson
Copy link
Collaborator Author

Language group: Ok.

Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to avoid raising expectations on where we point out that an operator or function is vectorizable.

Copy link
Collaborator

@henrikt-ma henrikt-ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@HansOlsson HansOlsson merged commit ae8359f into modelica:master Dec 1, 2025
1 check passed
@HansOlsson HansOlsson deleted the VectorizedMinMax branch December 1, 2025 08:23
@HansOlsson HansOlsson added M37 For pull requests merged into Modelica 3.7 semanticChanges For pull request that changes the semantics (neither used for fixes nor enhancements). labels Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request M37 For pull requests merged into Modelica 3.7 semanticChanges For pull request that changes the semantics (neither used for fixes nor enhancements).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants