comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Interesting Rant
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Interesting Rant [message #51371 is a reply to message #51314] Thu, 16 November 2006 01:51 Go to previous messageGo to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
Francis Burton wrote:

> In article <1163605646.246847.326220@i42g2000cwa.googlegroups.com>,
> Braedley <mike.braedley@gmail.com> wrote:
>> His comments about the 7/2 by themselves tell me that he doesn't know
>> jack about programming.

It's not just that example which show his general ignorance. Apparently he's a
CS major who has never bothered to learn anything about actually programming
and using computers.

>> I know for sure that at least 2 of the 4
>> competing languages (the C family, Java and possibly Maltab) all do the
>> exact same thing as IDL. EXACT! (Okay, maybe Matlab doesn't, I
>> haven't used it in 8 months.) The fourth is Maple, and it may still do

Every language which provides integer arithmetic does this. It's a fact of life
of integer arithmetic. That the author of that rant doesn't know this only
demonstrated his ignorance, it does not show a fault in any of those languages.
The author would probably be equally surprised and annoyed by the loss of
precision in floating point and have a rant at other languages because they
can't do simple arithmetic correctly.

>
> In MATLAB, both 7/2 and 7/2. evaluate to 3.5 (displayed as
> 3.5000 by default).

MATLAB defaults to using double precision for all variables. As a corollary to
the IDL "problem" of 7/2, try the same integer calculation in MATLAB to see how
useful the opposite camp can be:

>> int16(7)/int16(2)

That one rather annoyed me when MATLAB first introduced non-double matrices.
After I spent several days reprogramming a MATLAB to C interface so it returned
integer matrices for integer data I discovered just how comprehensive their
support of non-double data types was.


For those of you who don't have access to MATLAB, the result of the MATLAB
integer division is:

??? Error using ==> /
Function '/' is not defined for values of class 'int16'.

I wonder how much that would annoy our CS major ranter?

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Bitmap vectorization
Next Topic: Color background with PLOT

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:27:49 PDT 2025

Total time taken to generate the page: 0.00468 seconds