(j3.2006) BEQ, BNE?

Bill Long longb
Wed Jan 30 08:33:17 EST 2013



On 1/29/13 8:22 PM, Van Snyder wrote:
> We did BLT, BLE, etc., but why not BEQ and BNE?
>
> One might be tempted to use == and /=, but these are required to fail
> for +/- zero on ones-complement and sign-magnitude machines because
> Fortran doesn't distinguish +0 from -0 for integers.

I assume this is a theoretical question since I don't know of any 
relevant hardware implementation that distinguishes between +0 and -0 
for integers.  If such hardware ever appears on the horizon, we  could 
add in BEQ and BNE.  If I recall, the goal was to add the actually 
useful cases while trying to limit the ever-expanding list of intrinsics.

Cheers,
Bill


>
> Should we add BEQ and BNE, or suggest that users write something like
>
>    if ( BLE(I,J) .and. BLE(J,I) ) then ! I and J are equal bit strings
>      ....
>    end if
>
> or is there another way to do it that I've overlooked?
>
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
>

-- 
Bill Long                                           longb at cray.com
Fortran Technical Support    &                 voice: 651-605-9024
Bioinformatics Software Development            fax:   651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101





More information about the J3 mailing list