Article View: alt.comp.sys.palmtops.pilot
Article #200Re: Mathlib functions always returning 0
From: Arthur Hagen
Date: Tue, 21 Oct 2003 03:26
Date: Tue, 21 Oct 2003 03:26
18 lines
2053 bytes
2053 bytes
"Luc M." <luc_martineau@hotmail.com> wrote in message news:7Q0lb.2265$aw5.156000@news20.bellglobal.com... > I get '0' from a mathlib functions when I try to pass a parameter. > The functions return the proper value if the parameter is checked before > calling the function. Silent typecasting is often unreliable, especially with compiler optimisations, and is bad programming too. Try c=sqrt((double)index); /* if sqrt expects a double in your case */ Also try compiling with lower levels of optimisation and with warnings enabled. Regards, -- *Art
Technical Details
Message-ID:
<djle61-89u.ln1@kether.broomstick.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!in.100proofnews.com!in.100proofnews.com!cycny01.gnilink.net!cyclone1.gnilink.net!peer01.cox.net!cox.net!p01!lakeread05.POSTED!kether.broomstick.com!newsReferences:
<7Q0lb.2265$aw5.156000@news20.bellglobal.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109e18,9fa37096d9ae1ba3 X-Google-Attributes: gid109e18,public X-Google-Thread: 10baa0,9fa37096d9ae1ba3 X-Google-Attributes: gid10baa0,public X-Google-Thread: 11219a,9fa37096d9ae1ba3 X-Google-Attributes: gid11219a,public X-Google-Thread: 112073,9fa37096d9ae1ba3 X-Google-Attributes: gid112073,public X-Google-ArrivalTime: 2003-10-20 20:45:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!in.100proofnews.com!in.100proofnews.com!cycny01.gnilink.net!cyclone1.gnilink.net!peer01.cox.net!cox.net!p01!lakeread05.POSTED!kether.broomstick.com!news From: "Arthur Hagen" <art@broomstick.com> Newsgroups: alt.comp.sys.palmtops.pilot,comp.sys.palmtops,comp.sys.palmtops.pilot,codewarrior.palm References: <7Q0lb.2265$aw5.156000@news20.bellglobal.com> Subject: Re: Mathlib functions always returning 0 Lines: 19 Organization: Broomstick Net Services MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: <djle61-89u.ln1@kether.broomstick.com> Date: Mon, 20 Oct 2003 23:26:00 -0400 NNTP-Posting-Host: 68.0.196.231 X-Complaints-To: abuse@cox.net X-Trace: lakeread05 1066707904 68.0.196.231 (Mon, 20 Oct 2003 23:45:04 EDT) NNTP-Posting-Date: Mon, 20 Oct 2003 23:45:04 EDT