Jonathan Scott Duff writes: > Maybe I'm just wired wrong, but Inf is the same size as Inf (since > they are the same "value") To me "Inf" is a textual representation of > a value that's larger than all other values. So ... > > Inf == Inf # true
false , but all( (0..Inf) ^[==] (0..Inf) ) # true , maybe > Inf != Inf # false false > Inf > Inf # false false > Inf < Inf # false false > Inf - Inf == 0 # true Inf - Inf = NaN because it may be +Inf or -Inf > Inf + Inf == Inf # true true , but maybe for consistency with previous it have to be false . so may be , actually, everything above have to be undef . In any case , I think that if expression contains more then *single* Inf , in *general* case it have to be carefully analyzed , and mathematically it can give practically anything , depending on the "degree" of infinity of that particular Inf , and since we are not (???) going to built in symbolic analysis of limits , it have to be out altogether. so , possibly , all previous examples have to give Undef , because *we dont know* how exactly the limit was taken . examples in all examples here n->Inf Inf Inf ? (n) < (n*n) ? (n*n) > (n*n/10) ? (n) == (n/3) ? (n) - (n) ? (n/10) - (n/5) ? (n/2) - (n/3) and once one consider more complex operations like * , ** , or their combinations that gets *very* complicated . Every math course contains *the whole chapter* exlussively on the subject of taking limits it seems that Inf have well defined meaning in something like 1..Inf because that defines what elements are present in the list. so we can compare , e.g. two such lists. It comes to my mind now : I think the rule have to be : Inf is a literal value that *we write in perl source* but it cannot be a result of intermediate expressions ( or any expressions ) when perl is calculating. In particular perl cannot know what to do if it encounter more then single "Inf" in *any* expression . just for consistency. But may be I am wrong . arcadi. > > But, I'm willing to be educated on the subject. I don't ever use > infinities in code now and I don't think I'm likely to (except perhaps > in lazy list generation). > > The only infinities of varying sizes that I know of are the alephs, > and they don't apply here. > > > It's actually > > > > { 0 , $P < 1 > > $P ** Inf { 1 , $P == 1 > > { Inf, $P > 1 > > > > But perhaps we could forgo documenting any of the power cases and > > leave it to common sense. > > We can't leave *anything* to common sense because one person's common > sense may be different from another's. (i.e., there's no such thing > as "common sense" :) > > -Scott > -- > Jonathan Scott Duff > [EMAIL PROTECTED] > >