# Real numbers for \`define macro

**URL:** <https://verificationacademy.com/forums/t/real-numbers-for-define-macro/29707>\
**Category:** SystemVerilog\
**Tags:** real-numbers, SystemVerilog, define-macro\
**Created:** [July 15, 2014, 9:13am UTC](https://verificationacademy.com/forums/t/real-numbers-for-define-macro/29707 "2014-07-15T09:13:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reuben](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/reuben/32/1409_2.png) [@Reuben](https://verificationacademy.com/forums/u/Reuben)\
**Post date:** [July 15, 2014, 9:13am UTC](https://verificationacademy.com/forums/t/real-numbers-for-define-macro/29707/1 "2014-07-15T09:13:21Z")

</div>

I’m planning to use a real number for `define macro.

```verilog

`define LTOL 0.8
`define HTOL 1.2

```

But when I tried to use display, the result is:

```verilog

$display("LTOL = %0.2f, HTOL = %0.2f", `LTOL, `HTOL);

// Result
LTOL = 2.00, HTOL = 2.00

```

It seems that using real numbers in `define macro is not working.  
Is there a way to make this work?  
And why does the result print a value of 2.00?

Thanks.

---

<div class="post-metadata">

**Author:** ![Reuben](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/reuben/32/1409_2.png) [@Reuben](https://verificationacademy.com/forums/u/Reuben)\
**Post date:** [July 15, 2014, 10:01am UTC](https://verificationacademy.com/forums/t/real-numbers-for-define-macro/29707/2 "2014-07-15T10:01:19Z")

</div>

Oh my bad… The reason why I’m getting other values for LTOL and HTOL is because I have other declaration of it in other file.

This is now okay. Real numbers can be used in `define macro.
