cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Floating Point Errror

Highlighted
Participant

Floating Point Errror

Hi everyone!

I am coding with Mathcad a worksheet that is supposed to generate the response spectra for earthquake data. I have achieved it using the Implicit Method, but when I use the Explicit Method (Central Difference Method) I get the message that there is a floating point error. Could somene please help me to fix this problem? 

Thank you

 

9 REPLIES 9

Re: Floating Point Errror

Please find attached the Mathcad file

Re: Floating Point Errror

You have included no data for ug!!

 

Alan

Re: Floating Point Errror

Hi Alan!

Sorry for that, mine opens with ug inserted. Please find attached the data I used as ug.

 

Re: Floating Point Errror

The local variable u gets bigger with every step, and at step 97 you get a floating point overflow when calculating phat. I'll also note that udot and udotdot are not used for anything, and could be deleted.

 

Overflow.PNG

Re: Floating Point Errror

OK, Richard has beaten me 😉

Pic1.png

If i is 96 the multiplication a*u_i exceeds Mathcads limit of 10^307 and throws the error.

You'll have to check the algorithm used.

 

 For whatever it may be worth find attached the file with embedded data.

 

 

Re: Floating Point Errror


@WernerExinger wrote:

OK, Richard has beaten me 😉

 


  You were snoozing!

Re: Floating Point Errror

Or snoring Cat Happy?

Re: Floating Point Errror


@RichardJ wrote:

@WernerExinger wrote:

OK, Richard has beaten me 😉

 


  You were snoozing!


Yeah! Looks like I am getting lazy and slow

Re: Floating Point Errror

Thank you all for your quick response! 🙂 I´ll check the algorithm used