×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Unpredictable floor() !!!

Unpredictable floor() !!!

Unpredictable floor() !!!

(OP)
I wrote following expressions

i=24
j=floor(i/12)

Surprisingly I got j=1 !!

To cross-check the result I created one more expression

k=floor(2)

which gave me k=2 !!

John, why floor() function is so unpredictable? I checked it in NX4 as well as in NX6.

RE: Unpredictable floor() !!!

OK, I've verified what's happening and it was something which I thought we had fully addressed a while back but apparently not.  But let me ask you this, you're working in Imperial (AKA, English) units, correct?

Note that I will open a PR and will let you know what I learn.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

To an Engineer, the glass is twice as big as it needs to be.
 

RE: Unpredictable floor() !!!

(OP)
yes John, I am using Inch units only.

RE: Unpredictable floor() !!!

As a workaround, change the dimensionality of 'i' to 'Constant'.  Irrespective of the units which you are working in, this will mitigate the problem and should not effect your other expressions.  I know it's a pain, but hopefully we can get this fixed ASAP.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

To an Engineer, the glass is twice as big as it needs to be.
 

RE: Unpredictable floor() !!!

(OP)
Thanks for your replies, and workaround.

RE: Unpredictable floor() !!!

OK, I just got a status on the PR I wrote.  The fix will be in NX 6.0.3.x, which should be available around Mid-Year, perhaps a little before that.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

To an Engineer, the glass is twice as big as it needs to be.
 

RE: Unpredictable floor() !!!

(OP)
Whether this will be fixed in NX4 too.

RE: Unpredictable floor() !!!

At this point in time, in order for any fix to to be a candidate for back-porting to NX 4, it would have to address something with a much larger impact than this issue has.  I can say this for two reasons:

First, we've provided what we consider as being an acceptable workaround, that is using 'Constant' valued Expressions when utilizing either the Floor or Ceiling functions.

And second, the problem ONLY manifests itself when working in Imperial (English) units.  And while I know that some here in the U.S. will not appreciate this, it's been estimated that something close to 80% of all NX licenses are being used by organizations who work exclusively in Metric units.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/

To an Engineer, the glass is twice as big as it needs to be.
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources