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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Floating Point Errror

camacogacu
4-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
camacogacu
4-Participant
(To:camacogacu)

Please find attached the Mathcad file

You have included no data for ug!!

 

Alan

Hi Alan!

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

 

RichardJ
19-Tanzanite
(To:camacogacu)

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

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.

 

 

RichardJ
19-Tanzanite
(To:Werner_E)


@WernerExinger wrote:

OK, Richard has beaten me 😉

 


  You were snoozing!

Or snoring Cat Happy?


@RichardJ wrote:

@WernerExinger wrote:

OK, Richard has beaten me 😉

 


  You were snoozing!


Yeah! Looks like I am getting lazy and slow

camacogacu
4-Participant
(To:camacogacu)

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

Top Tags