Re: [math] Add methods opposite() and inverse() to o.a.c.m.FieldElement

2011-10-07 Thread Sébastien Brisard
+1 to add both of these, though I would suggest one of the following pairs of names: 0) negate, invert 1) opposite, reciprocal 2) additiveInverse, multiplicativeInverse Probably 2) is clearest, but a bit long.  I am fine with any of them. Phil Hi, I've created MATH-686 which relates to

Re: [math] Add methods opposite() and inverse() to o.a.c.m.FieldElement

2011-10-07 Thread Phil Steitz
On Oct 7, 2011, at 6:07 AM, Sébastien Brisard sebastien.bris...@m4x.org wrote: +1 to add both of these, though I would suggest one of the following pairs of names: 0) negate, invert 1) opposite, reciprocal 2) additiveInverse, multiplicativeInverse Probably 2) is clearest, but a bit

Re: [math] Add methods opposite() and inverse() to o.a.c.m.FieldElement

2011-10-07 Thread Sébastien Brisard
Not worth a long argument, but the reciprocal of a fraction is not exactly the same concept as multiplicative inverse in a field.  I would be happier about living with that inconsistency than adding another noun/verb inconsistency in the same class. Phil Just for my own interest: if I

Re: [math] Add methods opposite() and inverse() to o.a.c.m.FieldElement

2011-10-07 Thread Phil Steitz
On Oct 7, 2011, at 7:43 AM, Sébastien Brisard sebastien.bris...@m4x.org wrote: Not worth a long argument, but the reciprocal of a fraction is not exactly the same concept as multiplicative inverse in a field. I would be happier about living with that inconsistency than adding another

Re: [math] Add methods opposite() and inverse() to o.a.c.m.FieldElement

2011-10-04 Thread Luc Maisonobe
Le 04/10/2011 05:22, Sébastien Brisard a écrit : Good morning everyone, I would like to add the above mentioned methods to FieldElement. This would avoid awkward commands such as x.getField().getZero().substract(x) (for x.opposite()) and x.getField().getOne().divide(x) (for x.invert()). It's not

Re: [math] Add methods opposite() and inverse() to o.a.c.m.FieldElement

2011-10-04 Thread Mikkel Meyer Andersen
2011/10/4 Luc Maisonobe luc.maison...@free.fr: Le 04/10/2011 05:22, Sébastien Brisard a écrit : Good morning everyone, I would like to add the above mentioned methods to FieldElement. This would avoid awkward commands such as x.getField().getZero().substract(x) (for x.opposite()) and

Re: [math] Add methods opposite() and inverse() to o.a.c.m.FieldElement

2011-10-04 Thread Phil Steitz
On 10/3/11 8:22 PM, Sébastien Brisard wrote: Good morning everyone, I would like to add the above mentioned methods to FieldElement. This would avoid awkward commands such as x.getField().getZero().substract(x) (for x.opposite()) and x.getField().getOne().divide(x) (for x.invert()). It's

Re: [math] Add methods opposite() and inverse() to o.a.c.m.FieldElement

2011-10-04 Thread Sébastien Brisard
+1 to add both of these, though I would suggest one of the following pairs of names: 0) negate, invert 1) opposite, reciprocal 2) additiveInverse, multiplicativeInverse Probably 2) is clearest, but a bit long.  I am fine with any of them. Phil I do think these two features might prove

[math] Add methods opposite() and inverse() to o.a.c.m.FieldElement

2011-10-03 Thread Sébastien Brisard
Good morning everyone, I would like to add the above mentioned methods to FieldElement. This would avoid awkward commands such as x.getField().getZero().substract(x) (for x.opposite()) and x.getField().getOne().divide(x) (for x.invert()). It's not essential, but I think it would be useful.