August 01, 2004
In article <cegg4j$14ng$1@digitaldaemon.com>, Carlos Santander B. says...

>But as Jill already pointed: ... -x = -abs(x).

I refute that accusation most ephatically. I am not that stupid. I said: "I'd want x = -y; to assign x with minus y, not with -abs(y).". Misquotation is one thing; misquotation in a way which impunes my intelligence is quite another.

By the way, regarding your recent discussions on the name opPos(), are you guys /seriously/ arguing over the name of a function whose only reasonable implementation is to do absolutely nothing whatsoever?

Jill




August 01, 2004
Arcane Jill wrote:
> In article <cegg4j$14ng$1@digitaldaemon.com>, Carlos Santander B. says...
> 
> 
>>But as Jill already pointed: ... -x = -abs(x).
> 
> 
> I refute that accusation most ephatically. I am not that stupid. I said: "I'd
> want x = -y; to assign x with minus y, not with -abs(y).". Misquotation is one
> thing; misquotation in a way which impunes my intelligence is quite another.
> 
> By the way, regarding your recent discussions on the name opPos(), are you guys
> /seriously/ arguing over the name of a function whose only reasonable
> implementation is to do absolutely nothing whatsoever?

On the plus side, (pun honestly not intended) it's probably more important that we can define it at all, just so that the compiler will allow something that otherwise looks like a number to behave like one in this respect as well.

 -- andy
August 01, 2004
"Arcane Jill" <Arcane_member@pathlink.com> escribió en el mensaje
news:ceiv8s$24lj$1@digitaldaemon.com
| I refute that accusation most ephatically. I am not that stupid. I said: "I'd
| want x = -y; to assign x with minus y, not with -abs(y).". Misquotation is one
| thing; misquotation in a way which impunes my intelligence is quite another.
|

I already admitted mistake. Sorry for any involving you in my lack of focus.

| By the way, regarding your recent discussions on the name opPos(), are you
guys
| /seriously/ arguing over the name of a function whose only reasonable
| implementation is to do absolutely nothing whatsoever?
|
| Jill

Yes, I gave up on that too.

-----------------------
Carlos Santander Bernal


August 01, 2004
Arcane Jill wrote:

> Well, now we have opPos() to complement opNeg(). We can overload the unary plus
> operator.
> 
> The obvious implementation is:
> 
> #    T opPos() { return this; }
> 
> (or .dup, or similar). But such trivial functions do seem a little pointless.
> What /else/ could we do with opPlus()? 
> 
> This is a non-serious thread, so humorous replies are welcome!
> Jill
> 

So what do you do with opMod() for a type that has not integer part?

What is 0.95 % 0.25?
August 01, 2004
parabolis wrote:
> 
> So what do you do with opMod() for a type that has not integer part?
> 
> What is 0.95 % 0.25?

Zero.  Or perhaps the margin of error for floating point on type double.


Sean
August 01, 2004
Sean Kelly wrote:

> parabolis wrote:
> 
>>
>> So what do you do with opMod() for a type that has not integer part?
>>
>> What is 0.95 % 0.25?
> 
> 
> Zero.  Or perhaps the margin of error for floating point on type double.
> 
> 
> Sean

Double is zero, but then double can also represent integers: 13.0 % 5.0 == 3.0...
August 01, 2004
In article <cejim8$2c3n$1@digitaldaemon.com>, parabolis says...


>So what do you do with opMod() for a type that has not integer part?

I'd implement fmod().


>What is 0.95 % 0.25?

0.2 (since 0.95 = 3 * 0.25 + 0.2)

Arcane Jill


August 01, 2004
In article <cejim8$2c3n$1@digitaldaemon.com>, parabolis says...
>
>
>So what do you do with opMod() for a type that has not integer part?
>
>What is 0.95 % 0.25?

It's 0.2, according to dmd ;-) It's defined as
a % b = a - floor(a/b) * b

It makes sense when you think about it.

Nick


August 01, 2004
Nick wrote:

> In article <cejim8$2c3n$1@digitaldaemon.com>, parabolis says...
> 
>>
>>So what do you do with opMod() for a type that has not integer part?
>>
>>What is 0.95 % 0.25?
> 
> It's 0.2, according to dmd ;-) It's defined as
> a % b = a - floor(a/b) * b
> 
> It makes sense when you think about it.

Oops, yeah it does.  Very nice.

Sean
August 01, 2004
Arcane Jill wrote:

>>What is 0.95 % 0.25?
> 
> 
> 0.2 (since 0.95 = 3 * 0.25 + 0.2)
> 

Yes I suppose you have a point.