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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Floating point error problem in programming

vvenkatesan
1-Newbie

Floating point error problem in programming

I have done pressure calculations in normal worksheet format and i got results without any error. but it needs to change a value once for every iterations. So i moved on to programming. I compiled the program using while loop and break conditions. After completing and running the program i got error message showing "encountered a floating point error".Dont know how to fix the bug.. Can anyone help me pls?????????

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:vvenkatesan)

Vigneshwar Venkatesan wrote:

I have done pressure calculations in normal worksheet format and i got results without any error. but it needs to change a value once for every iterations. So i moved on to programming. I compiled the program using while loop and break conditions. After completing and running the program i got error message showing "encountered a floating point error".Dont know how to fix the bug.. Can anyone help me pls?????????

Somewhere within your loop the deltaP .dc and .r variables are blowing up to the limits of numeric handling (ie, they're in the order of 10307 )

Stuart

View solution in original post

1 REPLY 1
StuartBruff
23-Emerald III
(To:vvenkatesan)

Vigneshwar Venkatesan wrote:

I have done pressure calculations in normal worksheet format and i got results without any error. but it needs to change a value once for every iterations. So i moved on to programming. I compiled the program using while loop and break conditions. After completing and running the program i got error message showing "encountered a floating point error".Dont know how to fix the bug.. Can anyone help me pls?????????

Somewhere within your loop the deltaP .dc and .r variables are blowing up to the limits of numeric handling (ie, they're in the order of 10307 )

Stuart

Announcements

Top Tags