Floor Parameter giving incorrect result.

Floor Parameter giving incorrect result.

jack.scolding
Contributor Contributor
425 Views
3 Replies
Message 1 of 4

Floor Parameter giving incorrect result.

jack.scolding
Contributor
Contributor

When using the floor parameter with an external parameter as shown in the screenshot, it will result in an incorrect answer some of the time. this only happens when the external parameter has a number added to it. Which does not make sense as it should still be a whole number being put into the floor function so it should result in the same number. when adding the numbers separately but within the function it works as intended. This error does not occur with every addition outcome. only some random number. hopefully there is an easy fix

 

Thanks 

0 Likes
Accepted solutions (1)
426 Views
3 Replies
Replies (3)
Message 2 of 4

Rushikesh.kadam
Autodesk
Autodesk
Accepted solution

@jack.scolding I am able to reproduce the issue. As stated, it is observed only for some random values. I have created a ticket with the concerned team. Thank you for reporting the case.

Appreciate your effort in developing the software.

 

Regards,




Rushikesh Kadam
Senior QA Engineer
Quality Assurance
Autodesk, Inc.


0 Likes
Message 3 of 4

jack.scolding
Contributor
Contributor

I have found a work around solution for anyone with this problem, until it is fixed itself. all you need to do is add a small number in front of the equation inside the floor function as shown in the screen grab. With a small enough number it wont effect what number is generated but will push a whole number very slightly over the integer which stops the floor function from decreasing i.e floor((reference-164)+0.00001) goes from 163 to the correct 164.

0 Likes
Message 4 of 4

jeff_strater
Community Manager
Community Manager

the floor function is designed to be used on "unitless" parameters.  If you really want to use floor(), I would recommend constructing user parameters which are unitless, applying floor(), and then incorporating those values into a distance-type parameter (e.g. mm units).


Jeff Strater
Engineering Director
0 Likes