From: corey taylor <corey.taylor@gmail.com>
To: Ming-Xiang Fu <deadly@cmlab.csie.ntu.edu.tw>
Cc: gcc-help@gcc.gnu.org
Subject: Re: 3.4.4 vs 3.2.5 ; fabs: cant use as a function..
Date: Thu, 28 Jul 2005 04:54:00 -0000 [thread overview]
Message-ID: <2e393d08050727215414182be6@mail.gmail.com> (raw)
In-Reply-To: <20050728041558.M68708@cmlab.csie.ntu.edu.tw>
Hi Fu,
The code you attached doesn't show an include of cmath, but I assume
that you did try it.
What happens when you explicitly call std::fabs ?
corey
On 7/27/05, Ming-Xiang Fu <deadly@cmlab.csie.ntu.edu.tw> wrote:
>
>
> hi, I am having some problem to compile a code by gcc 3.4.4 which is
> successfully compiled in gcc 3.2.5.
>
>
> At the begining, it complains about abs(float) is ambiguous..and sin(), cos()
> not declares.
>
> And then, I include <cmath>, resolve some problem, and new problem occurs.
>
> " ` fabs' cannot be used as a function "
>
>
>
> please give me some guide, I will be appreciate about that.
> Thanks anyway. :)
>
>
> RedMo
> part of src code as below.
>
> ------------------------------------------------------------------------------------------------------------------------------------
>
> // GlobalObject.cpp: implementation of the CGlobalObject class.
> //
> //////////////////////////////////////////////////////////////////////
>
> #include "GlobalObject.h"
> #include <iomanip>
> #include <math.h>
> #include "../../Node/DEBUG.H"
>
> using namespace std;
>
> void VsMathObject::Evaluate(int member, VsValue& value, VsExprList &args,
> VsFunctionCall *parent)
> {
>
> switch(member)
> {
>
> case fabs:
> value.SetNumber( fabs(arg0.GetNumber()) );
> // arg0.GetNumber() returns a float number.
> break;
> case ffabs:
> value.SetNumber( fabs(arg0.GetNumber()) );
> break;
> case facos:
> value.SetNumber( acos(arg0.GetNumber()) );
> break;
> case fasin:
> value.SetNumber( asin(arg0.GetNumber()) );
> break;
>
> default:
> ASSERT(false);
> }
> }
>
> ---------------------------------------------------------------------------------------------------------------------------
>
>
>
>
>
> --
> Communication and Multimedia Laboratory
> Dept. of Computer Science and Information Engineering, NTU
>
>
>
>
next prev parent reply other threads:[~2005-07-28 4:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-28 4:16 Ming-Xiang Fu
2005-07-28 4:54 ` corey taylor [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-07-26 10:54 Ming-Xiang Fu
2005-07-26 14:33 ` Eljay Love-Jensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e393d08050727215414182be6@mail.gmail.com \
--to=corey.taylor@gmail.com \
--cc=deadly@cmlab.csie.ntu.edu.tw \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).