473,382 Members | 1,646 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,382 software developers and data experts.

floating point error: overflow?

Hi,

i´ve got an iteration with random generated floating point numbers.
During the iteration process sometimes the programm stops with the error:
"floating point error: overflow"

Is the number out of range? what does it exactly mean?

Thanks, Chris
Nov 13 '05 #1
3 9806

"C. Sengstock" <c.*********@urz.uni-heidelberg.de> wrote in message
news:bk**********@news.urz.uni-heidelberg.de...
Hi,

i´ve got an iteration with random generated floating point numbers.
During the iteration process sometimes the programm stops with the error:
"floating point error: overflow"

Is the number out of range?
Essentially yes.
what does it exactly mean?


You tried to store a representation that is
invalid for a floating point type on your
implementation.

-Mike
Nov 13 '05 #2
On Thu, 25 Sep 2003 03:19:53 GMT, "Mike Wahler"
<mk******@mkwahler.net> wrote in comp.lang.c:

"C. Sengstock" <c.*********@urz.uni-heidelberg.de> wrote in message
news:bk**********@news.urz.uni-heidelberg.de...
Hi,

i´ve got an iteration with random generated floating point numbers.
During the iteration process sometimes the programm stops with the error:
"floating point error: overflow"

Is the number out of range?


Essentially yes.
what does it exactly mean?


You tried to store a representation that is
invalid for a floating point type on your
implementation.

-Mike


Not even store, necessarily. Just generate.

double d = DBL_MAX;
++d;

....can generate an exception or trap.

BTW, could you start using a proper signature separator?

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 13 '05 #3

"Jack Klein" <ja*******@spamcop.net> wrote in message
news:9r********************************@4ax.com...
On Thu, 25 Sep 2003 03:19:53 GMT, "Mike Wahler"
<mk******@mkwahler.net> wrote in comp.lang.c:

"C. Sengstock" <c.*********@urz.uni-heidelberg.de> wrote in message
news:bk**********@news.urz.uni-heidelberg.de...
Hi,

i´ve got an iteration with random generated floating point numbers.
During the iteration process sometimes the programm stops with the error: "floating point error: overflow"

Is the number out of range?
Essentially yes.
what does it exactly mean?


You tried to store a representation that is
invalid for a floating point type on your
implementation.

-Mike


Not even store, necessarily. Just generate.


Right. Thanks.
double d = DBL_MAX;
++d;

...can generate an exception or trap.

BTW, could you start using a proper signature separator?


Sure, as soon as I start using a sig.

-Mike
Nov 13 '05 #4

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

Similar topics

10
by: Vinny | last post by:
I have a few floating point questions/issues I wish to ask. An answer or discussion would be nice too :) Any links discussion the subject would be nice too.. 1. How do I generate an underflow...
12
by: Dave Rahardja | last post by:
Does the C++ standard specify the behavior of floating point numbers during "exceptional" (exceptional with respect to floating point numbers, not exceptions) conditions? For example: double...
0
by: C. Sengstock | last post by:
Hi, i´ve got an iteration with random generated floating point numbers. During the iteration process sometimes the programm stops with the error: "floating point error: overflow" Is the...
7
by: Daniel Vallstrom | last post by:
I am having trouble with floating point addition because of the limited accuracy of floating types. Consider e.g. x0 += f(n) where x0 and f are of some floating type. Sometimes x0 is much larger...
3
by: Mark L Pappin | last post by:
<puts on Compiler Vendor hat> I've recently discovered that our compilers don't make any attempt to handle floating point overflow in add/subtract/ multiply/divide, with the result that...
13
by: tings | last post by:
An article states: "In floating point maths, where if you divide by a sufficiently large number sufficiently often, you will always be able to reach a value too small to distinguish from zero,...
2
by: Benjamin Rutt | last post by:
Does anyone have C code laying around to do this? I have to read in some binary data files that contains some 4-byte IBM/370 floating point values. I would like a function to convert 4-byte...
4
by: jacob navia | last post by:
Hi people I continue to work in the tutorial for lcc-win32, and started to try to explain the floating point flags. Here is the relevant part of the tutorial. Since it is a difficult part, I...
26
by: y8ycgl | last post by:
i have a program that i made in my class in Turbo C++ on windows 95or98 i belive. it is made to solve for factorials. th problem is that : A) it puts it in exponents B) theres too many numbers to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.