473,808 Members | 2,835 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

isinf

1 New Member
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?

Thanks
Jul 16 '07 #1
3 3348
mac11
256 Contributor
Just a guess, but maybe you need to tell your compiler to link the math library? (I use gnu c so I would tell my compiler '-lm' but your compiler might be different)
Jul 16 '07 #2
sicarie
4,677 Recognized Expert Moderator Specialist
From what I saw, there are lots of issues with different versions of C/C++ not allowing access to those functions. Haven't seen a fix, though...
Jul 16 '07 #3
JosAH
11,448 Recognized Expert MVP
Have a look at the frexp() function; it splits a floating point number in the
mantissa (aka significant) an exponent. If the mantissa is zero and the exponent
has its maximum value (from the top of my head: 2047) the value is +- infinite.
You can determine the sign by checking the sign bit of the floating point number.

Also: google is your friend.

kind regards,

Jos
Jul 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

61
8676
by: norb1 | last post by:
After tracking down a bug in my Fortran program, I found that it assumed max(NaN,0.) = 0. This makes no sense, as the outcome of the operation is undefined and should be NaN. max(NaN,0.) = NaN After researching, it appears the first outcome is accepted behavior, and might be included in the revised IEEE 754 standard, which affects
2
49867
by: Priya | last post by:
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>
10
106365
by: zl2k | last post by:
hi, Can someone let me know the command to check if a value is inf or NaN in c++? I am using gcc in linux. Thanks for help. zl2k
12
2574
by: horacius.rex | last post by:
Hi, I have a code that in some part of the program calculates 1/x for a lot of different x's. About 1 of 100 times x is equal to zero, so when I print the result I obtain inf. I wonder if there is a way to detect this "infinity" and convert it to the float zero. I mean something like for i = .... calculate 1/x_i
16
5660
by: istillshine | last post by:
In my code I used NAN and isnan(x). I found they were convenient to use. I also noticed that older C standard does not support NAN and isnan(x). When I compiled my program using: gcc -Wall -c it was fine.
9
9952
by: void main | last post by:
I'm rather new to complex numbers in C and was wondering, how do I initialize a complex variable properly if the imaginary part is 0. I tried -------- #include <complex.h> float complex c = 1.0f; --------
9
6884
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: http://www.gnu.org/software/libtool/manual/autoconf/Function-Portability.html The given definition of isinf(x) boils down to return isnan (x - x), which will return true for NaNs. Surely this is wrong? -- Richard
3
3374
by: MM | last post by:
Hi to all, I'm trying to import a tab separated values file onto Excel with the following script: import csv from pyExcelerator import * w = Workbook() worksheet = w.add_sheet('sim1')
8
3636
by: john.goodleaf | last post by:
I'm poking at writing data out to a SAS XPORT file (transport file). Each record must be 80 bytes long, ASCII. Integers should be "IBM- style integers" and floats should be "IBM-style doubles." Now I have some idea what that means from reading a C source file documented by the SAS institute, but before I go over the deep end trying to write my own routines, does anyone know of an already-done means of writing integers and floats out to...
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10631
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10374
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10114
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9196
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.