• C

'Invalid floating point' urgent dilemma!

I have recently completed a C program and when it is run, one of its options
causes the program to stop and bring up an error of 'floating point invalid'
I cannot for the life of me figure out this problem!!!

I have the source code and a input file(*.raw) used within the program if anybody wishes to find where the problem is and I cannot seem to find out where the problem is lying.

I will e-mail the problem if you wish

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi, i translate and run you programm.
1. My BC 5.1 reports about 5 warning(declared, but never used)
2. What is the value (for test) of next vars:
      THRESHOLD = 0.5;//get_threshold();
      num_iter = 200;//get_num_iter();
      angle = 30;//get_angle();

      slope_type = 2;//get_slope_type();
fot my values i runm you programm without errors
please write your e-mail address and i'll send you a request for your code.
( my email is zulti@cimatron.co.il )
please send the code, input file and which option made the error you talk about.

Please send your program to asteroids_88@hotmail.com and I will try my best to help you.

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Send it to rbr@tip-informatik.at pls.
Me too!

I've managed to reproduce this problem by passing floats to a function that uses int's, even if I use typecasting! Yes the compiler is supposed to convert it, no it doesn't do it properly. I got around it by defining a few int types and storing the floats in these variables, then passing them to the function. It's messy, it's slow, but it works.

Any comments on this would be app...

Borland C++ V4.5
send me too at
email to khutchinson@tvgnetwork.com... I'd be glad to look at it for you...
please as i wrote, insted of every one of us will write his (hers) E-mail
(it's a good way to collect all of our E-mails :) )
please write yours, and every one that will want to join the crowdwill write you, and you will reply the program.
Where are you altsmith? You seem to have 'disappeared'. Please send your code and everything to everyone of us here who have listed our email address in an attempt to help you.

Where are you altsmith? You seem to have 'disappeared'. Please send your code and everything to everyone of us here who have listed our email address in an attempt to help you.

honquin, i 've get code, and i can post it you (and others), but if altsmith
"disappeared", i don't see sence in this...  
Is there 'sense' in anything?
To AlexVirochovsky

It is meant to be a joke and that's why I quote it with a single quote.

that's what i saw :

1. with option 4 had no problem.
2. i replaced the following line
case 3:
   for(y=0; y < 100; y++)
      for(x=0; x < 100; x++)

   for(y=1; y < 101; y++)
      for(x=0; x < 100; x++)
( the index was too big started from 100 to 100099 and not 0 to 99999 )

3. change all the float to double !!!
   and all the %f to %lf.
   the line
has an overflow when using float.
double is good enough.

after those correction all worked fine.

the line
   case 4:
      for (y = 1;y >= 101 ;y++)

is not understandable !!!
should be ( as i understand )
   case 4:
      for (y = 0;y < 100 ;y++)

as all other cases.

where r u ?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.