• 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. Custom IC Design
  3. How to increase the number resolution shown by OCEAN

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 14202
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to increase the number resolution shown by OCEAN

RFStuff
RFStuff over 12 years ago

 Dear All,

I want to increase the  the number resolution shown by OCEAN ( in Engineering Fomat).

Currently, I am getting something like this:_

Say X is one out put variable in OCEAN

X=2.503413e+09

I like X to be shown as

X=2.503413xxxe+09 ( i.e. three more decimal points)

How it an be achieved ?

Kind Regards,

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Variables in SKILL (and OCEAN of course) are double precision floating point numbers (i.e. about 15 digits plus the exponent). It depends how you're displaying them. Some examples (in these, sometimes I'm using => to be the return value, sometimes the print output - essentially anything using print/println is showing the print output):

    ; using the default print representation
    defMathConstants('const)
    const.PI => 3.141593
    println(const.PI) =>  3.141593

    ; increase the default precision for printed numbers in SKILL
    sstatus(fullPrecision t)
    const.PI => 3.141592653589793

    ; using printf
    printf("PI is %g\n" const.PI)  => PI is 3.14159
    printf("PI is %.15g\n" const.PI) => PI is 3.14159265358979
    printf("PI is %e\n" const.PI) => PI is 3.141593e+00
    printf("PI is %.15e\n" const.PI) => PI is 3.141592653589793e+00

    ; using aelSuffixNotation
    aelEngNotation(const.PI 12) => "3.14159265359"
    aelEngNotation(const.PI*1e6 12) => "3.14159265359e6"

    ; using ocnPrint (have to push the signif digits up first)
    aelPushSignifDigits(12)
    ocnPrint(const.PI ?precision 11) => 3.1415926536

    Does that help?

    Regards,

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFStuff
    RFStuff over 12 years ago

     Dear Andrew,

    Thanks a lot. That indeed helped.

    Kind Regards,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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