# STEP Exponential Number format

**URL:** <https://forums.buildingsmart.org/t/step-exponential-number-format/4688>\
**Category:** Serializations\
**Created:** [March 30, 2023, 5:00am UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688 "2023-03-30T05:00:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonm](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/jonm/32/16_2.png) [@jonm](https://forums.buildingsmart.org/u/jonm)\
**Post date:** [March 30, 2023, 5:00am UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688/1 "2023-03-30T05:00:13Z")

</div>

Does STEP serialization support numbers formated to an exponential format (eg -1E-04 )?  
I see several toolkits writing this, but when validating on the buildingSMART website an error is suggested when this is used. ie  
#1739= IFCPOLYNOMIALCURVE(#219,(0.0,1.0),(0.0,0.0,-1E-04),$);

Thanks,

Jon

---

<div class="post-metadata">

**Author:** ![angel.velez](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@angel.velez](https://forums.buildingsmart.org/u/angel.velez)\
**Post date:** [March 31, 2023, 5:37am UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688/2 "2023-03-31T05:37:56Z")

</div>

What’s the error?

---

<div class="post-metadata">

**Author:** ![jonm](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/jonm/32/16_2.png) [@jonm](https://forums.buildingsmart.org/u/jonm)\
**Post date:** [March 31, 2023, 8:02am UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688/3 "2023-03-31T08:02:13Z")

</div>

Nominates a syntax error :

On line 1750 column 53:  
Unexpected \_\_anon\_3 (‘E’)  
Expecting one of COMMA RPAR  
01750 | #1739= IFCPOLYNOMIALCURVE(#219,(0.0,1.0),(0.0,0.0,-1E-04),$);

---

<div class="post-metadata">

**Author:** ![aothms](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@aothms](https://forums.buildingsmart.org/u/aothms)\
**Post date:** [March 31, 2023, 9:31am UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688/5 "2023-03-31T09:31:23Z")

</div>

This is one of those things where the express grammar deviates from conventional number formatting. (So you can’t rely on your normal language number formatting routine to write reals to ifc.)

The definition is

```auto
REAL = [SIGN] DIGIT { DIGIT } "." { DIGIT }
                    ["E" [ SIGN] DIGIT { DIGIT } ] .

```

This means the dot/period is **manditory**. This applies regardless of whether an exponent notation is used. An integer literal is not a valid representation for a real (but that would trigger a schema error, not a syntax error).

`-1E-04` invalid  
`-1.E-04` valid

---

<div class="post-metadata">

**Author:** ![jonm](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/jonm/32/16_2.png) [@jonm](https://forums.buildingsmart.org/u/jonm)\
**Post date:** [March 31, 2023, 11:03am UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688/6 "2023-03-31T11:03:54Z")

</div>

Thanks Thomas, that’s very helpful.

---

<div class="post-metadata">

**Author:** ![jwouellette](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/jwouellette/32/2140_2.png) [@jwouellette](https://forums.buildingsmart.org/u/jwouellette)\
**Post date:** [April 3, 2023, 1:36pm UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688/8 "2023-04-03T13:36:56Z")

</div>

@aothms, @Evandro is that in the IFC html documentation? If so, where? If not, shouldn’t it be and where?

---

<div class="post-metadata">

**Author:** ![aothms](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@aothms](https://forums.buildingsmart.org/u/aothms)\
**Post date:** [April 3, 2023, 4:57pm UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688/9 "2023-04-03T16:57:48Z")

</div>

Occasionally there are questions like this that are really about the 10303-21. (We had a similar question some month ago about the encoding of boolean values in 10303-21.) I don’t know what’s the proper way to, at the same time: provide a comprehensive specification for ifc + don’t violate iso copyrights + don’t spend a lot of time editing specs already defined elsewhere.

---

<div class="post-metadata">

**Author:** ![angel.velez](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@angel.velez](https://forums.buildingsmart.org/u/angel.velez)\
**Post date:** [April 3, 2023, 11:38pm UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688/10 "2023-04-03T23:38:13Z")

</div>

Purely as an editorial comment, it seems odd that was have an open standard that is based on a definition that is behind a paywall. Not sure what to do about that, but that does seem an implementation issue.

---

<div class="post-metadata">

**Author:** ![TLiebich](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/tliebich/32/71_2.png) [@TLiebich](https://forums.buildingsmart.org/u/TLiebich)\
**Post date:** [April 5, 2023, 3:21pm UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688/11 "2023-04-05T15:21:12Z")

</div>

a REAL in EXPRESS has to have a “.”, independed of being a “normal” or “exponential” notation. So to expand the example from Thomas K.

`-1E-04` invalid  
`-1.E-04` valid  
`-1` invalid  
`-1.` valid  
`-1.0` valid

@angel.velez - yes, it is an annoyance that ISO 10303-11 / 10303-21 is copyright by ISO and only available by purchase - but it is out of our control.

---

<div class="post-metadata">

**Author:** ![jwouellette](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/jwouellette/32/2140_2.png) [@jwouellette](https://forums.buildingsmart.org/u/jwouellette)\
**Post date:** [April 5, 2023, 4:50pm UTC](https://forums.buildingsmart.org/t/step-exponential-number-format/4688/12 "2023-04-05T16:50:47Z")

</div>

@TLiebich in light of the copyright issues, would it still be ok for bSI to include the REAL descriptions/examples in the IFC documentation? IS there someone on the ISO side you could ask for clarification? It’s kinda tricky because IFC is a direct derivative of STEP.

It may not just be this case, either. Are there other instances where the documentation can directly reflect needed descriptions/examples of such basic/core concepts from the STEP docs in the IFC docs to better enable understanding and execution?

I’m not suggesting copy/paste of everything, just some of the aspects needing clarification like how real numbers can/should be encoded.
