• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Rounding of floating numbers

Stats

  • Replies 7
  • Subscribers 159
  • Views 21153
  • Members are here 0
More Content

Rounding of floating numbers

archive
archive over 17 years ago

I am comparing testpoint locations layout-to-fixture. Some Via testpoints are not on a 1 mil grid, and the round function in allegro seems to work differently than our manufacturer's fixture software round function. example; Allegro: round(145.47) - result 145 Fixture: 145.47 gets rounded to 146 If I know anything about rounding it seems that the fixture number is rounded correctly. How can I get allegro to round a number like the Fixture example?


Originally posted in cdnusers.org by Geoffm
  • Sign in to reply
  • Cancel
Parents
  • archive
    archive over 17 years ago

    I Guess the following examples will be more clear for your usage.!!
    fix( n_arg ) => x_result
    The largest integer not greater than n_arg. If an integer is given as an argument, it returns the argument.
    fix(1.9) => 1
    fix(-5.6) => -6
    fix(100) => 100

    floor( n_number ) => x_integer
    Returns the largest integer not larger than the given argument.
    (floor -4.3) => -5
    (floor 3.5) => 3

    ceiling( n_number )
    Returns the smallest integer not smaller than the given argument.
    (ceiling -4.3) => -4
    (ceiling 3.5) => 4

    round( n_arg ) => x_result
    round(1.5) => 2
    round(-1.49) => -1
    round(1.49) => 1


    Originally posted in cdnusers.org by sagirameshraju
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • archive
    archive over 17 years ago

    I Guess the following examples will be more clear for your usage.!!
    fix( n_arg ) => x_result
    The largest integer not greater than n_arg. If an integer is given as an argument, it returns the argument.
    fix(1.9) => 1
    fix(-5.6) => -6
    fix(100) => 100

    floor( n_number ) => x_integer
    Returns the largest integer not larger than the given argument.
    (floor -4.3) => -5
    (floor 3.5) => 3

    ceiling( n_number )
    Returns the smallest integer not smaller than the given argument.
    (ceiling -4.3) => -4
    (ceiling 3.5) => 4

    round( n_arg ) => x_result
    round(1.5) => 2
    round(-1.49) => -1
    round(1.49) => 1


    Originally posted in cdnusers.org by sagirameshraju
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information