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

Promotion inconsistency in min/max pair float #5490

Open
hiiamboris opened this issue Feb 25, 2024 · 0 comments
Open

Promotion inconsistency in min/max pair float #5490

hiiamboris opened this issue Feb 25, 2024 · 0 comments
Assignees
Labels
type.review Ticket describes a possible improvement.

Comments

@hiiamboris
Copy link
Collaborator

Describe the bug

>> min 1x1 (1.#inf,1.#inf) 
== (1, 1) 
>> min 1x1 1.#inf 
== *** Script Error: integer! overflow/underflow
*** Where: min
*** Near : min 1x1 1.#INF

These operations are reasonable to expect to be equivalent, but they aren't. Also:

>> max 1x1 (1.#nan,1.#nan) 
== (1.#NaN, 1.#NaN) 
>> max 1x1 1.#nan 
== *** Script Error: integer! overflow/underflow
*** Where: max
*** Near : max 1x1 1.#NaN
*** Stack: startup process-into process-into thrown call-cli-func do-events trap with-thrown process-any-event process-next-event dispatch with-stop process-event do-handlers do-handler trap with-thrown evaluate-since evaluate trap with-thrown capture-output fcatch with-thrown 

Expected behavior

Promote scalar into relevant 2D type then compute min/max.

Platform version
Red 0.6.5 for Windows built 22-Feb-2024/16:47:26+03:00 commit #5521b51

@dockimbel dockimbel self-assigned this Feb 25, 2024
@dockimbel dockimbel added the type.review Ticket describes a possible improvement. label Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type.review Ticket describes a possible improvement.
Projects
None yet
Development

No branches or pull requests

2 participants