Opened 22 months ago

Last modified 20 months ago

## #172 new defect

# Grammar allows zero

Reported by: | dmcclean | Owned by: | |
---|---|---|---|

Priority: | minor | Milestone: | |

Component: | Keywords: | semantics, grammar | |

Cc: |

### Description

The UCUM 1.9 grammar (I'm not sure where to find any work-in-progress newer version, so I apologize if this has already been addressed) allows 0 to appear as a <digits>, and therefore as a <factor>.

It shouldn't be permitted as a <factor> because it doesn't have a multiplicative inverse. It's inclusion ruins the algebraic property noted in section 18 that "For each unit u ∈ U there is an inverse unit u-1 such that u · u-1 = 1. Thus, (U, ·) is an Abelian group."

### Change History (4)

### comment:1 Changed 20 months ago by gschadow

### comment:2 Changed 20 months ago by gschadow

oops, wrong ticket. this was for #162

### comment:3 Changed 20 months ago by gschadow

oops, wrong ticket. this was for #162

### comment:4 Changed 20 months ago by gschadow

**Note:**See TracTickets for help on using tickets.

Yes, floating point number has an assumed definition as decimal with optional scientific notation. There are additional consideration that relate to the implicit specification of the number of significant digits. These issues have been discussed in another work (the HL7 v3 Data Types standard). We have tried to keep this outside the UCUM specification, because we might have to include standardization of real numbers in computer notation into UCUM.

You may use the Java floating point notation for an example. Most other languages, e.g., SQL are quite similar and differences occur only in edge cases.

In the writing of numbers internally we use some rules:

But this is of interest only in the internal notation we might use in any formal data tables. The UCUM standard as published in text does not make that distinction.

Perhaps we should speak about this, but for us floating point number is a primitive.