473,396 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

isinf() & isnan()

Halo.

I am using isinf() & isnan() in my code, and i get an error

error LNK2001: unresolved external symbol "int __cdecl isnan(double)"
(?isnan@@YAHN@Z)

my code is the implementation of LambertW function

#include <math.h>
#include <cmath>
#include <stdio.h>
#include <iostream>
using namespace std;

double LambertW(const double z) {

.....
....
...
if (z<-em1 || isinf(z) || isnan(z)) {
fprintf(stderr,"LambertW: bad argument %g, exiting.\n",z); exit(1);

}

...
...
}

Could anyone let me know, how to resolve this??

I am working on Visual C++ 2005 Express edition

Thank you,
priya

Sep 19 '06 #1
2 49837
"Priya" <ha*************@gmail.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
I am using isinf() & isnan() in my code, and i get an error

error LNK2001: unresolved external symbol "int __cdecl isnan(double)"
(?isnan@@YAHN@Z)

my code is the implementation of LambertW function

#include <math.h>
#include <cmath>
#include <stdio.h>
#include <iostream>
using namespace std;

double LambertW(const double z) {

....
...
..
if (z<-em1 || isinf(z) || isnan(z)) {
fprintf(stderr,"LambertW: bad argument %g, exiting.\n",z); exit(1);

}

..
..
}

Could anyone let me know, how to resolve this??

I am working on Visual C++ 2005 Express edition
VC++ is nowhere near C99 compliant yet, and you're trying to use
C99 functions. Unless the compiler subverts your efforts, you can
usually define isnan as:

#define isnan(x) ((x) != (x))

HTH,

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Sep 19 '06 #2
Hi,

Thank you! it works now:)

regards,
priya

Sep 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Skybuck Flying | last post by:
Hi, I have one more remaining "problem" with compiling a unix source code for windows/visual c/c++ 6.0 What does the isnan routine do ? Documentation says it checks for NaN ? What does that...
4
by: Pertti Martikainen | last post by:
Hi, The following lines are from my Immediate - window: dValue NaN Double.IsNaN(dValue) false I evaluate variable dValue, I get NaN but IsNaN returns
4
by: siaj | last post by:
I am new to jscript.. I am trying to validate if a textbox on my ASP.NET page has numeric value.. The code I am using is function IsValidAmount() { var intTotalAmt =...
0
by: Seok Bee | last post by:
Dear Experts, I am having a wizard control in my web app. I have some textbox controls within the wizard control. At the same time, I have a hyperlink to run a pop-up window for calendar. The...
3
by: newbie1123 | last post by:
Hi! I am using Borland c++ builder version 6.0 and when I compile a program containing isinf() (I did include math.h) I get 'call to undefined function isinf'. Anyone knows what is wrong? ...
6
by: Java script Dude | last post by:
Small glitch (IMHO) in JavaScript is related to isNaN() boolean function. If passed a null, it returns true which is incorrect. This one cause me quite a bit of grief until I detected it and was...
4
by: jacob navia | last post by:
Hi Has C++ defined the function isnan() for complex numbers? What is the definition? Thanks in advance -- jacob navia jacob at jacob point remcomp point fr
9
by: Richard Tobin | last post by:
The GNU Autoconf manual provides a work-around for missing isinf() and isnan() functions, which exist in C99 and many, but not all, pre-C99 implementations: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.