octave-maintainers
[Top][All Lists]
Advanced

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

Re: Single/Double precision equality


From: Daniel J Sebald
Subject: Re: Single/Double precision equality
Date: Sat, 27 Sep 2014 16:49:17 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 09/27/2014 04:09 PM, Ben Abbott wrote:

On Sep 27, 2014, at 1:41 PM, Daniel J Sebald<address@hidden>  wrote:

Maybe the easiest thing is to concede to arbitrariness and in the documentation add a 
third column, an "operator evaluation" column:

      Mixed Operation     Evaluate      Storage
     -------------------------------------------
     double OP single      single       single
     double OP integer     double       integer
     double OP char        double       double
     double OP logical     double       double
     single OP integer     single       integer
     single OP char        single       single
     single OP logical     single       single

I like this idea.  I wrote a script and ran it in Matlab to allow for a quick 
comparison ...

precedence
class ( double (0) +  double (1)) ->  double
[snip]
class (  uint8 (0) +   uint8 (1)) ->  uint8

That would make a good demo script. Maybe 'test' and 'demo' should apply to operators as well. E.g.,

test ==
demo +

Dan



reply via email to

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