octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #62283] max (a, b) produces unintuitive result


From: Rik
Subject: [Octave-bug-tracker] [bug #62283] max (a, b) produces unintuitive results when mixing integers and floating point values
Date: Mon, 6 Jun 2022 11:22:37 -0400 (EDT)

Follow-up Comment #10, bug #62283 (project octave):

I think "conversion" is appropriate.  Type double is the default for
calculations in Octave, but whenever it is mixed with another type the rules
(inherited from Matlab) require using the more restricted data type and that
means values may be changed (such as dropping decimal portion of floating
point on conversion to integer).  Conversions:


double OPERATOR single -> single data type
floating point (single or double) OPERATOR integer -> integer data type





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62283>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]