OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: An example


Greetings!

Following up on the exchange on portability notes, I wanted to use the following as an example of what I am doing.

I replaced:

Portable documents shall use complex numbers only in functions that are explicitly noted as accepting or producing complex numbers (as appropriate). In particular, note that infix operators (including "+", "-", "*", "/", "^", "=") may not support complex numbers, and applications may not y include such support. The results of using an operator on a complex number, such as COMPLEX(2;3) + COMPLEX(4;5), are implementation-defined and may produce an Error instead of Complex. Portable documents shall use the complex number functions instead of operators to work portably with complex numbers, and should use COMPLEX to produce arbitrary complex numbers from a (real,imaginary) pair. For example, the portable expression IMSUM(COMPLEX(2;3); COMPLEX(4;5)) adds the numbers 2+3i to 4+5i (resulting in 6+8i). Thus, portable documents that use complex numbers shall use the functions instead when a value may be a complex number:

IMSUM (not infix "+")

IMSUB (not infix "-")

IMPRODUCT (not infix "*")

IMDIV (not infix "/")

IMPOWER (not "^", but see its definition for limitations)

For prefix "-", IMSUB with the first value 0 may be used.

Note: Evaluators differ in support offered for complex numbers. The likelihood of successful interchange of documents containing expressions using complex numbers will be increased by limiting them to using functions defined in OpenFormula for use with complex numbers.

Query functions supported on complex numbers include IMREAL (returns real part), IMAGINARY (returns imaginary part), IMABS (returns magnitude), IMARGUMENT (returns the angle expressed by the complex number).


With:

Note: Expression authors should be aware that use of functions that are not defined by OpenFormula as accepting complex numbers as input may impair interoperability.


Short, sweet, to the point and covers all the cases we may forget to mention.

Does that work for everyone?

Hope everyone is having a great day!

Patrick

-- 
Patrick Durusau
patrick@durusau.net
Chair, V1 - US TAG to JTC 1/SC 34
Convener, JTC 1/SC 34/WG 3 (Topic Maps)
Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300
Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]