CellML Discussion List

Text archives Help


[cellml-discussion] Proposal: Standardised CellML real number format


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • Subject: [cellml-discussion] Proposal: Standardised CellML real number format
  • Date: Wed, 19 Sep 2007 14:30:17 +1200

Hi all,

The CellML Specification does not define the format in which real
numbers will be represented at all (it just says, for initial_value:
"The value of the |initial_value| attribute may be a real number or a
variable"). The MathML specification defines
"A real number is presented in decimal notation. Decimal notation
consists of an optional sign ("+" or "-") followed by a string of digits
possibly separated into an integer and a fractional part by a "decimal
point". Some examples are 0.3, 1, and -31.56. If a different |base| is
specified, then the digits are interpreted as being digits computed to
that base."

This means that there are no constraints at all on how initial values
can be represented. It is common practice in current CellML processing
to use representations in standard notation, using formats like 1E8.
Therefore, I think that we need to restrict it down to something like
(in regular expression syntax):

(\-|)[0-9]+(\.[0-9]+|)(E(-|)[0-9]+|e(-|)[0-9]+|)

In other words:
An optional - , followed by 1 or more digits from 0 to 9, followed by
an optional decimal point (not a comma or momayyez) followed by an
optional E or e character with a possible sign and one or more digits
after it.

Are there any opinions about this? I will re-raise this at the next
CellML meeting next Wednesday so we can summarise any discussion which
has occurred on the mailing lists, so please send your comments before then.

Best regards,
Andrew





Archive powered by MHonArc 2.6.18.

Top of page