commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <sebastien.bris...@m4x.org>
Subject [math] Are all FieldElement Numbers?
Date Thu, 09 Feb 2012 09:15:09 GMT
Hi,
I'm doing some calculations with FieldElement, and need at the end to
convert the result to double. I notice that in the current CM, all
classes that implement FieldElement also implement Number, which would
be exactly what I need. My question therefore is
* Should we have the interface FieldElement extend Number? I know we
could think of fields which are *not* numbers, but we are, after all,
a project dedicated to numerical computations...
* Alternatively, may I introduce a NumberFieldElement which extends
both Number and FieldElement? In this case, I would recommend that
BigFraction, BigReal, Complex, Dfp, DfpDec, Fraction all implement
this interface (which does not change anything, actually).
Thanks for your feedback!
S├ębastien


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message