Csound Csound-dev Csound-tekno Search About

[Csnd] On using LOGICAL OR

Date2010-01-13 17:40
FromLouis Cohen
Subject[Csnd] On using LOGICAL OR
Hi, everyone,

I had a need for performing a bit-wise OR operation today and checked  
the manual for the proper notation. The Manual says:

"Opcodes that perform arithmetic and logic operations are -, +, &&,  
||, *, /, ^, and %."

The double vertical bar is apparently the symbol for logical OR, but  
when I use it I get an error. After much trial-and-error, I found the  
a single vertical bar gets accepted by Csound version 5.09 (float  
samples) Sep 22 2008, and appears to give me the expected result (1 |  
2 gives 3)

So how come the manual shows this as a double bar?

ALSO, what's going on under the hood? I thought numerical values were  
floating point (in the floating point version.) If so, can I still  
safely use bit-wise computations for numbers up to, say 256? or 65565?

thanks, and Happy New Year!

-Lou


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-01-13 17:57
FromMichael Gogins
Subject[Csnd] Re: On using LOGICAL OR
In languages with C syntax, | is bitwise OR where

binary 01 OR 10 -> binary 11

and || is local OR where

binary 01 OR 10 -> logical TRUE, any non-zero value, usually1 or -1.

Hope this helps,
Mike

On 1/13/10, Louis Cohen  wrote:
> Hi, everyone,
>
> I had a need for performing a bit-wise OR operation today and checked
> the manual for the proper notation. The Manual says:
>
> "Opcodes that perform arithmetic and logic operations are -, +, &&,
> ||, *, /, ^, and %."
>
> The double vertical bar is apparently the symbol for logical OR, but
> when I use it I get an error. After much trial-and-error, I found the
> a single vertical bar gets accepted by Csound version 5.09 (float
> samples) Sep 22 2008, and appears to give me the expected result (1 |
> 2 gives 3)
>
> So how come the manual shows this as a double bar?
>
> ALSO, what's going on under the hood? I thought numerical values were
> floating point (in the floating point version.) If so, can I still
> safely use bit-wise computations for numbers up to, say 256? or 65565?
>
> thanks, and Happy New Year!
>
> -Lou
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>

Date2010-01-13 18:45
FromLouis Cohen
Subject[Csnd] Re: Re: On using LOGICAL OR
Thanks, Mike,

Your answer, together with the statement in the manual:

>> "Opcodes that perform arithmetic and logic operations are -, +, &&,
>> ||, *, /, ^, and %."
>>

...suggests that I can compute boolean expressions in csound, since,  
as you said, || is a logical OR, while | is a binary OR. But I was  
under the impression that csound used only one computational type:  
floating point.

Further, the manual doesn't mention the single-bar version as far as I  
can tell, only the double-bar version (as in the above quotation.)

Is the statement I quoted above just an error? (Same comments for &&  
and &, I suppose...)

-Lou


On Jan 13, 2010, at 12:57 PM, Michael Gogins wrote:

> In languages with C syntax, | is bitwise OR where
>
> binary 01 OR 10 -> binary 11
>
> and || is local OR where
>
> binary 01 OR 10 -> logical TRUE, any non-zero value, usually1 or -1.
>
> Hope this helps,
> Mike
>
> On 1/13/10, Louis Cohen  wrote:
>> Hi, everyone,
>>
>> I had a need for performing a bit-wise OR operation today and checked
>> the manual for the proper notation. The Manual says:
>>
>> "Opcodes that perform arithmetic and logic operations are -, +, &&,
>> ||, *, /, ^, and %."
>>
>> The double vertical bar is apparently the symbol for logical OR, but
>> when I use it I get an error. After much trial-and-error, I found the
>> a single vertical bar gets accepted by Csound version 5.09 (float
>> samples) Sep 22 2008, and appears to give me the expected result (1 |
>> 2 gives 3)
>>
>> So how come the manual shows this as a double bar?
>>
>> ALSO, what's going on under the hood? I thought numerical values were
>> floating point (in the floating point version.) If so, can I still
>> safely use bit-wise computations for numbers up to, say 256? or  
>> 65565?
>>
>> thanks, and Happy New Year!
>>
>> -Lou
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe
>> csound"
>>
>
>
> -- 
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-01-13 19:42
FromMichael Gogins
Subject[Csnd] Re: Re: Re: On using LOGICAL OR
I don't know, sorry.

Bitwise would still work with floating point numbers, since they are
after all made of bits. But I suspect that Csound uses | for logical
OR.

Regards,
Mike

On 1/13/10, Louis Cohen  wrote:
> Thanks, Mike,
>
> Your answer, together with the statement in the manual:
>
>>> "Opcodes that perform arithmetic and logic operations are -, +, &&,
>>> ||, *, /, ^, and %."
>>>
>
> ...suggests that I can compute boolean expressions in csound, since,
> as you said, || is a logical OR, while | is a binary OR. But I was
> under the impression that csound used only one computational type:
> floating point.
>
> Further, the manual doesn't mention the single-bar version as far as I
> can tell, only the double-bar version (as in the above quotation.)
>
> Is the statement I quoted above just an error? (Same comments for &&
> and &, I suppose...)
>
> -Lou
>
>
> On Jan 13, 2010, at 12:57 PM, Michael Gogins wrote:
>
>> In languages with C syntax, | is bitwise OR where
>>
>> binary 01 OR 10 -> binary 11
>>
>> and || is local OR where
>>
>> binary 01 OR 10 -> logical TRUE, any non-zero value, usually1 or -1.
>>
>> Hope this helps,
>> Mike
>>
>> On 1/13/10, Louis Cohen  wrote:
>>> Hi, everyone,
>>>
>>> I had a need for performing a bit-wise OR operation today and checked
>>> the manual for the proper notation. The Manual says:
>>>
>>> "Opcodes that perform arithmetic and logic operations are -, +, &&,
>>> ||, *, /, ^, and %."
>>>
>>> The double vertical bar is apparently the symbol for logical OR, but
>>> when I use it I get an error. After much trial-and-error, I found the
>>> a single vertical bar gets accepted by Csound version 5.09 (float
>>> samples) Sep 22 2008, and appears to give me the expected result (1 |
>>> 2 gives 3)
>>>
>>> So how come the manual shows this as a double bar?
>>>
>>> ALSO, what's going on under the hood? I thought numerical values were
>>> floating point (in the floating point version.) If so, can I still
>>> safely use bit-wise computations for numbers up to, say 256? or
>>> 65565?
>>>
>>> thanks, and Happy New Year!
>>>
>>> -Lou
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe
>>> csound"
>>>
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>

Date2010-01-13 19:52
FromAndres Cabrera
Subject[Csnd] Re: Re: Re: Re: On using LOGICAL OR
Hi,

Just checking it now, Csound does bitwise operations on integers. See:






instr 1
iresultOr = p4 | p5
iresultAnd = p4 & p5
prints "%i | %i  = %i\\n", p4, p5, iresultOr
prints "%i & %i  = %i\\n", p4, p5, iresultAnd
endin



i 1 0 0.1  1  2
i 1 +  .   1  3
i 1 +  .   2  4
i 1 +  .   3  10
e



Cheers,
Andrés

On Wed, Jan 13, 2010 at 7:42 PM, Michael Gogins
 wrote:
> I don't know, sorry.
>
> Bitwise would still work with floating point numbers, since they are
> after all made of bits. But I suspect that Csound uses | for logical
> OR.
>
> Regards,
> Mike
>
> On 1/13/10, Louis Cohen  wrote:
>> Thanks, Mike,
>>
>> Your answer, together with the statement in the manual:
>>
>>>> "Opcodes that perform arithmetic and logic operations are -, +, &&,
>>>> ||, *, /, ^, and %."
>>>>
>>
>> ...suggests that I can compute boolean expressions in csound, since,
>> as you said, || is a logical OR, while | is a binary OR. But I was
>> under the impression that csound used only one computational type:
>> floating point.
>>
>> Further, the manual doesn't mention the single-bar version as far as I
>> can tell, only the double-bar version (as in the above quotation.)
>>
>> Is the statement I quoted above just an error? (Same comments for &&
>> and &, I suppose...)
>>
>> -Lou
>>
>>
>> On Jan 13, 2010, at 12:57 PM, Michael Gogins wrote:
>>
>>> In languages with C syntax, | is bitwise OR where
>>>
>>> binary 01 OR 10 -> binary 11
>>>
>>> and || is local OR where
>>>
>>> binary 01 OR 10 -> logical TRUE, any non-zero value, usually1 or -1.
>>>
>>> Hope this helps,
>>> Mike
>>>
>>> On 1/13/10, Louis Cohen  wrote:
>>>> Hi, everyone,
>>>>
>>>> I had a need for performing a bit-wise OR operation today and checked
>>>> the manual for the proper notation. The Manual says:
>>>>
>>>> "Opcodes that perform arithmetic and logic operations are -, +, &&,
>>>> ||, *, /, ^, and %."
>>>>
>>>> The double vertical bar is apparently the symbol for logical OR, but
>>>> when I use it I get an error. After much trial-and-error, I found the
>>>> a single vertical bar gets accepted by Csound version 5.09 (float
>>>> samples) Sep 22 2008, and appears to give me the expected result (1 |
>>>> 2 gives 3)
>>>>
>>>> So how come the manual shows this as a double bar?
>>>>
>>>> ALSO, what's going on under the hood? I thought numerical values were
>>>> floating point (in the floating point version.) If so, can I still
>>>> safely use bit-wise computations for numbers up to, say 256? or
>>>> 65565?
>>>>
>>>> thanks, and Happy New Year!
>>>>
>>>> -Lou
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe
>>>> csound"
>>>>
>>>
>>>
>>> --
>>> Michael Gogins
>>> Irreducible Productions
>>> http://www.michael-gogins.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>



-- 


Andrés


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-01-13 20:06
FromMichael Gogins
Subject[Csnd] Re: Re: Re: Re: Re: On using LOGICAL OR
A bitwise OR can be used as a logical OR, but not vice versa. In other words,

binary 00100 | 00010 -> 00110 which is != 0 which is logically TRUE.

Regards,
Mike

On 1/13/10, Andres Cabrera  wrote:
> Hi,
>
> Just checking it now, Csound does bitwise operations on integers. See:
>
> 
> 
> 
> 
>
> instr 1
> iresultOr = p4 | p5
> iresultAnd = p4 & p5
> prints "%i | %i  = %i\\n", p4, p5, iresultOr
> prints "%i & %i  = %i\\n", p4, p5, iresultAnd
> endin
>
> 
> 
> i 1 0 0.1  1  2
> i 1 +  .   1  3
> i 1 +  .   2  4
> i 1 +  .   3  10
> e
> 
> 
>
> Cheers,
> Andrés
>
> On Wed, Jan 13, 2010 at 7:42 PM, Michael Gogins
>  wrote:
>> I don't know, sorry.
>>
>> Bitwise would still work with floating point numbers, since they are
>> after all made of bits. But I suspect that Csound uses | for logical
>> OR.
>>
>> Regards,
>> Mike
>>
>> On 1/13/10, Louis Cohen  wrote:
>>> Thanks, Mike,
>>>
>>> Your answer, together with the statement in the manual:
>>>
>>>>> "Opcodes that perform arithmetic and logic operations are -, +, &&,
>>>>> ||, *, /, ^, and %."
>>>>>
>>>
>>> ...suggests that I can compute boolean expressions in csound, since,
>>> as you said, || is a logical OR, while | is a binary OR. But I was
>>> under the impression that csound used only one computational type:
>>> floating point.
>>>
>>> Further, the manual doesn't mention the single-bar version as far as I
>>> can tell, only the double-bar version (as in the above quotation.)
>>>
>>> Is the statement I quoted above just an error? (Same comments for &&
>>> and &, I suppose...)
>>>
>>> -Lou
>>>
>>>
>>> On Jan 13, 2010, at 12:57 PM, Michael Gogins wrote:
>>>
>>>> In languages with C syntax, | is bitwise OR where
>>>>
>>>> binary 01 OR 10 -> binary 11
>>>>
>>>> and || is local OR where
>>>>
>>>> binary 01 OR 10 -> logical TRUE, any non-zero value, usually1 or -1.
>>>>
>>>> Hope this helps,
>>>> Mike
>>>>
>>>> On 1/13/10, Louis Cohen  wrote:
>>>>> Hi, everyone,
>>>>>
>>>>> I had a need for performing a bit-wise OR operation today and checked
>>>>> the manual for the proper notation. The Manual says:
>>>>>
>>>>> "Opcodes that perform arithmetic and logic operations are -, +, &&,
>>>>> ||, *, /, ^, and %."
>>>>>
>>>>> The double vertical bar is apparently the symbol for logical OR, but
>>>>> when I use it I get an error. After much trial-and-error, I found the
>>>>> a single vertical bar gets accepted by Csound version 5.09 (float
>>>>> samples) Sep 22 2008, and appears to give me the expected result (1 |
>>>>> 2 gives 3)
>>>>>
>>>>> So how come the manual shows this as a double bar?
>>>>>
>>>>> ALSO, what's going on under the hood? I thought numerical values were
>>>>> floating point (in the floating point version.) If so, can I still
>>>>> safely use bit-wise computations for numbers up to, say 256? or
>>>>> 65565?
>>>>>
>>>>> thanks, and Happy New Year!
>>>>>
>>>>> -Lou
>>>>>
>>>>>
>>>>> Send bugs reports to this list.
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>
>>>>
>>>> --
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://www.michael-gogins.com
>>>> Michael dot Gogins at gmail dot com
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe csound"
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
>
> --
>
>
> Andrés
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"


-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-01-13 20:13
FromLouis Cohen
Subject[Csnd] Re: Re: Re: Re: Re: On using LOGICAL OR
Yes, Andres,

I made the same test. And I have no problem doing bitwise computations  
on floating point numbers to achieve my intentions. On small numbers  
I'm reasonably sure that I won't have to worry about the exponent  
portion of two floating point numbers being different.

However, the manual for some reason lists || for logical OR, not |.  
And yet csound treats || as an error but handles | as you indicated.  
Since I don't speak C (but I do speak Java) I was wondering if I  
missed something. From what everyone is saying, it seems it's just an  
error in the manual that for some reason hasn't bothered anyone.

-Lou

On Jan 13, 2010, at 2:52 PM, Andres Cabrera wrote:

> Hi,
>
> Just checking it now, Csound does bitwise operations on integers. See:
>
> 
> 
> 
> 
>
> instr 1
> iresultOr = p4 | p5
> iresultAnd = p4 & p5
> prints "%i | %i  = %i\\n", p4, p5, iresultOr
> prints "%i & %i  = %i\\n", p4, p5, iresultAnd
> endin
>
> 
> 
> i 1 0 0.1  1  2
> i 1 +  .   1  3
> i 1 +  .   2  4
> i 1 +  .   3  10
> e
> 
> 
>
> Cheers,
> Andrés
>
> On Wed, Jan 13, 2010 at 7:42 PM, Michael Gogins
>  wrote:
>> I don't know, sorry.
>>
>> Bitwise would still work with floating point numbers, since they are
>> after all made of bits. But I suspect that Csound uses | for logical
>> OR.
>>
>> Regards,
>> Mike
>>
>> On 1/13/10, Louis Cohen  wrote:
>>> Thanks, Mike,
>>>
>>> Your answer, together with the statement in the manual:
>>>
>>>>> "Opcodes that perform arithmetic and logic operations are -, +,  
>>>>> &&,
>>>>> ||, *, /, ^, and %."
>>>>>
>>>
>>> ...suggests that I can compute boolean expressions in csound, since,
>>> as you said, || is a logical OR, while | is a binary OR. But I was
>>> under the impression that csound used only one computational type:
>>> floating point.
>>>
>>> Further, the manual doesn't mention the single-bar version as far  
>>> as I
>>> can tell, only the double-bar version (as in the above quotation.)
>>>
>>> Is the statement I quoted above just an error? (Same comments for &&
>>> and &, I suppose...)
>>>
>>> -Lou
>>>
>>>
>>> On Jan 13, 2010, at 12:57 PM, Michael Gogins wrote:
>>>
>>>> In languages with C syntax, | is bitwise OR where
>>>>
>>>> binary 01 OR 10 -> binary 11
>>>>
>>>> and || is local OR where
>>>>
>>>> binary 01 OR 10 -> logical TRUE, any non-zero value, usually1 or  
>>>> -1.
>>>>
>>>> Hope this helps,
>>>> Mike
>>>>
>>>> On 1/13/10, Louis Cohen  wrote:
>>>>> Hi, everyone,
>>>>>
>>>>> I had a need for performing a bit-wise OR operation today and  
>>>>> checked
>>>>> the manual for the proper notation. The Manual says:
>>>>>
>>>>> "Opcodes that perform arithmetic and logic operations are -, +,  
>>>>> &&,
>>>>> ||, *, /, ^, and %."
>>>>>
>>>>> The double vertical bar is apparently the symbol for logical OR,  
>>>>> but
>>>>> when I use it I get an error. After much trial-and-error, I  
>>>>> found the
>>>>> a single vertical bar gets accepted by Csound version 5.09 (float
>>>>> samples) Sep 22 2008, and appears to give me the expected result  
>>>>> (1 |
>>>>> 2 gives 3)
>>>>>
>>>>> So how come the manual shows this as a double bar?
>>>>>
>>>>> ALSO, what's going on under the hood? I thought numerical values  
>>>>> were
>>>>> floating point (in the floating point version.) If so, can I still
>>>>> safely use bit-wise computations for numbers up to, say 256? or
>>>>> 65565?
>>>>>
>>>>> thanks, and Happy New Year!
>>>>>
>>>>> -Lou
>>>>>
>>>>>
>>>>> Send bugs reports to this list.
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>
>>>>
>>>> --
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://www.michael-gogins.com
>>>> Michael dot Gogins at gmail dot com
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe csound"
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"
>>>
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>>
>
>
>
> -- 
>
>
> Andrés
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-01-13 20:18
FromAndres Cabrera
Subject[Csnd] Re: Re: Re: Re: Re: Re: On using LOGICAL OR
Hi Lou,

Can you post the line that gives the error, I'm curious.

Cheers,
Andrés

On Wed, Jan 13, 2010 at 8:13 PM, Louis Cohen  wrote:
> Yes, Andres,
>
> I made the same test. And I have no problem doing bitwise computations on
> floating point numbers to achieve my intentions. On small numbers I'm
> reasonably sure that I won't have to worry about the exponent portion of two
> floating point numbers being different.
>
> However, the manual for some reason lists || for logical OR, not |. And yet
> csound treats || as an error but handles | as you indicated. Since I don't
> speak C (but I do speak Java) I was wondering if I missed something. From
> what everyone is saying, it seems it's just an error in the manual that for
> some reason hasn't bothered anyone.
>
> -Lou
>
> On Jan 13, 2010, at 2:52 PM, Andres Cabrera wrote:
>
>> Hi,
>>
>> Just checking it now, Csound does bitwise operations on integers. See:
>>
>> 
>> 
>> 
>> 
>>
>> instr 1
>> iresultOr = p4 | p5
>> iresultAnd = p4 & p5
>> prints "%i | %i  = %i\\n", p4, p5, iresultOr
>> prints "%i & %i  = %i\\n", p4, p5, iresultAnd
>> endin
>>
>> 
>> 
>> i 1 0 0.1  1  2
>> i 1 +  .   1  3
>> i 1 +  .   2  4
>> i 1 +  .   3  10
>> e
>> 
>> 
>>
>> Cheers,
>> Andrés
>>
>> On Wed, Jan 13, 2010 at 7:42 PM, Michael Gogins
>>  wrote:
>>>
>>> I don't know, sorry.
>>>
>>> Bitwise would still work with floating point numbers, since they are
>>> after all made of bits. But I suspect that Csound uses | for logical
>>> OR.
>>>
>>> Regards,
>>> Mike
>>>
>>> On 1/13/10, Louis Cohen  wrote:
>>>>
>>>> Thanks, Mike,
>>>>
>>>> Your answer, together with the statement in the manual:
>>>>
>>>>>> "Opcodes that perform arithmetic and logic operations are -, +, &&,
>>>>>> ||, *, /, ^, and %."
>>>>>>
>>>>
>>>> ...suggests that I can compute boolean expressions in csound, since,
>>>> as you said, || is a logical OR, while | is a binary OR. But I was
>>>> under the impression that csound used only one computational type:
>>>> floating point.
>>>>
>>>> Further, the manual doesn't mention the single-bar version as far as I
>>>> can tell, only the double-bar version (as in the above quotation.)
>>>>
>>>> Is the statement I quoted above just an error? (Same comments for &&
>>>> and &, I suppose...)
>>>>
>>>> -Lou
>>>>
>>>>
>>>> On Jan 13, 2010, at 12:57 PM, Michael Gogins wrote:
>>>>
>>>>> In languages with C syntax, | is bitwise OR where
>>>>>
>>>>> binary 01 OR 10 -> binary 11
>>>>>
>>>>> and || is local OR where
>>>>>
>>>>> binary 01 OR 10 -> logical TRUE, any non-zero value, usually1 or -1.
>>>>>
>>>>> Hope this helps,
>>>>> Mike
>>>>>
>>>>> On 1/13/10, Louis Cohen  wrote:
>>>>>>
>>>>>> Hi, everyone,
>>>>>>
>>>>>> I had a need for performing a bit-wise OR operation today and checked
>>>>>> the manual for the proper notation. The Manual says:
>>>>>>
>>>>>> "Opcodes that perform arithmetic and logic operations are -, +, &&,
>>>>>> ||, *, /, ^, and %."
>>>>>>
>>>>>> The double vertical bar is apparently the symbol for logical OR, but
>>>>>> when I use it I get an error. After much trial-and-error, I found the
>>>>>> a single vertical bar gets accepted by Csound version 5.09 (float
>>>>>> samples) Sep 22 2008, and appears to give me the expected result (1 |
>>>>>> 2 gives 3)
>>>>>>
>>>>>> So how come the manual shows this as a double bar?
>>>>>>
>>>>>> ALSO, what's going on under the hood? I thought numerical values were
>>>>>> floating point (in the floating point version.) If so, can I still
>>>>>> safely use bit-wise computations for numbers up to, say 256? or
>>>>>> 65565?
>>>>>>
>>>>>> thanks, and Happy New Year!
>>>>>>
>>>>>> -Lou
>>>>>>
>>>>>>
>>>>>> Send bugs reports to this list.
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://www.michael-gogins.com
>>>>> Michael dot Gogins at gmail dot com
>>>>>
>>>>>
>>>>> Send bugs reports to this list.
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe csound"
>>>>
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>
>>>
>>> --
>>> Michael Gogins
>>> Irreducible Productions
>>> http://www.michael-gogins.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>
>>
>>
>> --
>>
>>
>> Andrés
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"



-- 


Andrés


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-01-13 22:01
FromLouis Cohen
Subject[Csnd] Re: On using LOGICAL OR
;OR test
instr 1
	k1 = 1
	k2 = 2
	k3 = k1 || k2
	printk2 k3
	k4 = k1 & k2
	printk2 k4,3
endin


gives this output:

-->CSoundLib found.
PortMIDI real time MIDI plugin for Csound
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
-->WARNING: CsoundLib may not compatible with this version
-->Starting CsoundLib.
0dBFS level = 32768.0
Csound version 5.09 (float samples) Sep 22 2008
libsndfile-1.0.16
UnifiedCSD:  /Volumes/A_G5Int1TB/Documents1/Lou's compositions/ 
granularImprovisor/logicalORtest.csd
STARTING FILE
Creating orchestra
Creating score
orchname:  /tmp/tmp.10.XDUSm1.orc
scorename: /tmp/tmp.11.BlEB0C.sco
Loading command-line libraries:
/Applications/MacCsound/MacCsound.app/Contents/Resources/ 
libMacCsoundOpcodes.dylib
Macro definition for omacro:MacCsound
Macro definition for omacro:MacCsound
orch compiler:
9 lines read
	instr	1	
error:  illegal character |, line 7:
	k3 = k1 || k2
	        ^
1 syntax errors in orchestra.  compilation invalid
-->CsoundLib Terminated...

On Jan 13, 2010, at 3:18 PM, Andres Cabrera wrote:

> Hi Lou,
>
> Can you post the line that gives the error, I'm curious.
>
> Cheers,
> Andrés
>
> On Wed, Jan 13, 2010 at 8:13 PM, Louis Cohen   
> wrote:
>> Yes, Andres,
>>
>> I made the same test. And I have no problem doing bitwise  
>> computations on
>> floating point numbers to achieve my intentions. On small numbers I'm
>> reasonably sure that I won't have to worry about the exponent  
>> portion of two
>> floating point numbers being different.
>>
>> However, the manual for some reason lists || for logical OR, not |.  
>> And yet
>> csound treats || as an error but handles | as you indicated. Since  
>> I don't
>> speak C (but I do speak Java) I was wondering if I missed  
>> something. From
>> what everyone is saying, it seems it's just an error in the manual  
>> that for
>> some reason hasn't bothered anyone.
>>
>> -Lou
>>
>> On Jan 13, 2010, at 2:52 PM, Andres Cabrera wrote:
>>
>>> Hi,
>>>
>>> Just checking it now, Csound does bitwise operations on integers.  
>>> See:
>>>
>>> 
>>> 
>>> 
>>> 
>>>
>>> instr 1
>>> iresultOr = p4 | p5
>>> iresultAnd = p4 & p5
>>> prints "%i | %i  = %i\\n", p4, p5, iresultOr
>>> prints "%i & %i  = %i\\n", p4, p5, iresultAnd
>>> endin
>>>
>>> 
>>> 
>>> i 1 0 0.1  1  2
>>> i 1 +  .   1  3
>>> i 1 +  .   2  4
>>> i 1 +  .   3  10
>>> e
>>> 
>>> 
>>>
>>> Cheers,
>>> Andrés
>>>
>>> On Wed, Jan 13, 2010 at 7:42 PM, Michael Gogins
>>>  wrote:
>>>>
>>>> I don't know, sorry.
>>>>
>>>> Bitwise would still work with floating point numbers, since they  
>>>> are
>>>> after all made of bits. But I suspect that Csound uses | for  
>>>> logical
>>>> OR.
>>>>
>>>> Regards,
>>>> Mike
>>>>
>>>> On 1/13/10, Louis Cohen  wrote:
>>>>>
>>>>> Thanks, Mike,
>>>>>
>>>>> Your answer, together with the statement in the manual:
>>>>>
>>>>>>> "Opcodes that perform arithmetic and logic operations are -,  
>>>>>>> +, &&,
>>>>>>> ||, *, /, ^, and %."
>>>>>>>
>>>>>
>>>>> ...suggests that I can compute boolean expressions in csound,  
>>>>> since,
>>>>> as you said, || is a logical OR, while | is a binary OR. But I was
>>>>> under the impression that csound used only one computational type:
>>>>> floating point.
>>>>>
>>>>> Further, the manual doesn't mention the single-bar version as  
>>>>> far as I
>>>>> can tell, only the double-bar version (as in the above quotation.)
>>>>>
>>>>> Is the statement I quoted above just an error? (Same comments  
>>>>> for &&
>>>>> and &, I suppose...)
>>>>>
>>>>> -Lou
>>>>>
>>>>>
>>>>> On Jan 13, 2010, at 12:57 PM, Michael Gogins wrote:
>>>>>
>>>>>> In languages with C syntax, | is bitwise OR where
>>>>>>
>>>>>> binary 01 OR 10 -> binary 11
>>>>>>
>>>>>> and || is local OR where
>>>>>>
>>>>>> binary 01 OR 10 -> logical TRUE, any non-zero value, usually1  
>>>>>> or -1.
>>>>>>
>>>>>> Hope this helps,
>>>>>> Mike
>>>>>>
>>>>>> On 1/13/10, Louis Cohen  wrote:
>>>>>>>
>>>>>>> Hi, everyone,
>>>>>>>
>>>>>>> I had a need for performing a bit-wise OR operation today and  
>>>>>>> checked
>>>>>>> the manual for the proper notation. The Manual says:
>>>>>>>
>>>>>>> "Opcodes that perform arithmetic and logic operations are -,  
>>>>>>> +, &&,
>>>>>>> ||, *, /, ^, and %."
>>>>>>>
>>>>>>> The double vertical bar is apparently the symbol for logical  
>>>>>>> OR, but
>>>>>>> when I use it I get an error. After much trial-and-error, I  
>>>>>>> found the
>>>>>>> a single vertical bar gets accepted by Csound version 5.09  
>>>>>>> (float
>>>>>>> samples) Sep 22 2008, and appears to give me the expected  
>>>>>>> result (1 |
>>>>>>> 2 gives 3)
>>>>>>>
>>>>>>> So how come the manual shows this as a double bar?
>>>>>>>
>>>>>>> ALSO, what's going on under the hood? I thought numerical  
>>>>>>> values were
>>>>>>> floating point (in the floating point version.) If so, can I  
>>>>>>> still
>>>>>>> safely use bit-wise computations for numbers up to, say 256? or
>>>>>>> 65565?
>>>>>>>
>>>>>>> thanks, and Happy New Year!
>>>>>>>
>>>>>>> -Lou
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to this list.
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Michael Gogins
>>>>>> Irreducible Productions
>>>>>> http://www.michael-gogins.com
>>>>>> Michael dot Gogins at gmail dot com
>>>>>>
>>>>>>
>>>>>> Send bugs reports to this list.
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe csound"
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to this list.
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>
>>>>
>>>> --
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://www.michael-gogins.com
>>>> Michael dot Gogins at gmail dot com
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>> "unsubscribe
>>>> csound"
>>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> Andrés
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe
>> csound"
>
>
>
> -- 
>
>
> Andrés
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-01-14 21:55
Fromjoachim heintz
Subject[Csnd] Re: Re: Re: Re: Re: Re: On using LOGICAL OR
Hi Lou -

as far as I see the manual is correct in listing || for logical OR,  
because something like
   if 1 > 0 || 2 < 0 then
   print i1+i2
   endif
is ok. In your example
	k1 = 1
	k2 = 2
	k3 = k1 || k2
	printk2 k3
	k4 = k1 & k2
	printk2 k4,3
you don't use a boolean expression in combination with ||, so it's not  
working.
So, at the end, the manual saying
>>>>>> "Opcodes that perform arithmetic and logic operations are -, +,  
>>>>>> &&,
>>>>>> ||, *, /, ^, and %."
>>
seems to be correct for me, as && and || are logic operations (and the  
others arithmetic).

Or am I missing something? At least I learned something about bitwise  
and / or from the discussion. Best -

	joachim


Am 13.01.2010 um 21:13 schrieb Louis Cohen:

> Yes, Andres,
>
> I made the same test. And I have no problem doing bitwise  
> computations on floating point numbers to achieve my intentions. On  
> small numbers I'm reasonably sure that I won't have to worry about  
> the exponent portion of two floating point numbers being different.
>
> However, the manual for some reason lists || for logical OR, not |.  
> And yet csound treats || as an error but handles | as you indicated.  
> Since I don't speak C (but I do speak Java) I was wondering if I  
> missed something. From what everyone is saying, it seems it's just  
> an error in the manual that for some reason hasn't bothered anyone.
>
> -Lou
>
> On Jan 13, 2010, at 2:52 PM, Andres Cabrera wrote:
>
>> Hi,
>>
>> Just checking it now, Csound does bitwise operations on integers.  
>> See:
>>
>> 
>> 
>> 
>> 
>>
>> instr 1
>> iresultOr = p4 | p5
>> iresultAnd = p4 & p5
>> prints "%i | %i  = %i\\n", p4, p5, iresultOr
>> prints "%i & %i  = %i\\n", p4, p5, iresultAnd
>> endin
>>
>> 
>> 
>> i 1 0 0.1  1  2
>> i 1 +  .   1  3
>> i 1 +  .   2  4
>> i 1 +  .   3  10
>> e
>> 
>> 
>>
>> Cheers,
>> Andrés
>>
>> On Wed, Jan 13, 2010 at 7:42 PM, Michael Gogins
>>  wrote:
>>> I don't know, sorry.
>>>
>>> Bitwise would still work with floating point numbers, since they are
>>> after all made of bits. But I suspect that Csound uses | for logical
>>> OR.
>>>
>>> Regards,
>>> Mike
>>>
>>> On 1/13/10, Louis Cohen  wrote:
>>>> Thanks, Mike,
>>>>
>>>> Your answer, together with the statement in the manual:
>>>>
>>>>>> "Opcodes that perform arithmetic and logic operations are -, +,  
>>>>>> &&,
>>>>>> ||, *, /, ^, and %."
>>>>>>
>>>>
>>>> ...suggests that I can compute boolean expressions in csound,  
>>>> since,
>>>> as you said, || is a logical OR, while | is a binary OR. But I was
>>>> under the impression that csound used only one computational type:
>>>> floating point.
>>>>
>>>> Further, the manual doesn't mention the single-bar version as far  
>>>> as I
>>>> can tell, only the double-bar version (as in the above quotation.)
>>>>
>>>> Is the statement I quoted above just an error? (Same comments for  
>>>> &&
>>>> and &, I suppose...)
>>>>
>>>> -Lou
>>>>
>>>>
>>>> On Jan 13, 2010, at 12:57 PM, Michael Gogins wrote:
>>>>
>>>>> In languages with C syntax, | is bitwise OR where
>>>>>
>>>>> binary 01 OR 10 -> binary 11
>>>>>
>>>>> and || is local OR where
>>>>>
>>>>> binary 01 OR 10 -> logical TRUE, any non-zero value, usually1 or  
>>>>> -1.
>>>>>
>>>>> Hope this helps,
>>>>> Mike
>>>>>
>>>>> On 1/13/10, Louis Cohen  wrote:
>>>>>> Hi, everyone,
>>>>>>
>>>>>> I had a need for performing a bit-wise OR operation today and  
>>>>>> checked
>>>>>> the manual for the proper notation. The Manual says:
>>>>>>
>>>>>> "Opcodes that perform arithmetic and logic operations are -, +,  
>>>>>> &&,
>>>>>> ||, *, /, ^, and %."
>>>>>>
>>>>>> The double vertical bar is apparently the symbol for logical  
>>>>>> OR, but
>>>>>> when I use it I get an error. After much trial-and-error, I  
>>>>>> found the
>>>>>> a single vertical bar gets accepted by Csound version 5.09 (float
>>>>>> samples) Sep 22 2008, and appears to give me the expected  
>>>>>> result (1 |
>>>>>> 2 gives 3)
>>>>>>
>>>>>> So how come the manual shows this as a double bar?
>>>>>>
>>>>>> ALSO, what's going on under the hood? I thought numerical  
>>>>>> values were
>>>>>> floating point (in the floating point version.) If so, can I  
>>>>>> still
>>>>>> safely use bit-wise computations for numbers up to, say 256? or
>>>>>> 65565?
>>>>>>
>>>>>> thanks, and Happy New Year!
>>>>>>
>>>>>> -Lou
>>>>>>
>>>>>>
>>>>>> Send bugs reports to this list.
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://www.michael-gogins.com
>>>>> Michael dot Gogins at gmail dot com
>>>>>
>>>>>
>>>>> Send bugs reports to this list.
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe csound"
>>>>
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>> "unsubscribe
>>>> csound"
>>>>
>>>
>>>
>>> --
>>> Michael Gogins
>>> Irreducible Productions
>>> http://www.michael-gogins.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe csound"
>>>
>>
>>
>>
>> -- 
>>
>>
>> Andrés
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-01-16 13:34
FromLouis Cohen
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: On using LOGICAL OR
Joachim,

Thanks for this clarification. I see better the distinctions between  
logical, arithmetic and other operators now.

I suppose that what I was expecting, but csound doesn't provide, is a  
boolean data type. This would allow logical computations outside of IF  
statements and would allow for storing the result in a variable and  
then re-using the computation elsewhere.

But almost the same can be accomplished with bitwise operations.

best,
Lou


On Jan 14, 2010, at 4:55 PM, joachim heintz wrote:

> Hi Lou -
>
> as far as I see the manual is correct in listing || for logical OR,  
> because something like
>  if 1 > 0 || 2 < 0 then
>  print i1+i2
>  endif
> is ok. In your example
> 	k1 = 1
> 	k2 = 2
> 	k3 = k1 || k2
> 	printk2 k3
> 	k4 = k1 & k2
> 	printk2 k4,3
> you don't use a boolean expression in combination with ||, so it's  
> not working.
> So, at the end, the manual saying
>>>>>>> "Opcodes that perform arithmetic and logic operations are -,  
>>>>>>> +, &&,
>>>>>>> ||, *, /, ^, and %."
>>>
> seems to be correct for me, as && and || are logic operations (and  
> the others arithmetic).
>
> Or am I missing something? At least I learned something about  
> bitwise and / or from the discussion. Best -
>
> 	joachim
>
>
> Am 13.01.2010 um 21:13 schrieb Louis Cohen:
>
>> Yes, Andres,
>>
>> I made the same test. And I have no problem doing bitwise  
>> computations on floating point numbers to achieve my intentions. On  
>> small numbers I'm reasonably sure that I won't have to worry about  
>> the exponent portion of two floating point numbers being different.
>>
>> However, the manual for some reason lists || for logical OR, not |.  
>> And yet csound treats || as an error but handles | as you  
>> indicated. Since I don't speak C (but I do speak Java) I was  
>> wondering if I missed something. From what everyone is saying, it  
>> seems it's just an error in the manual that for some reason hasn't  
>> bothered anyone.
>>
>> -Lou
>>
>> On Jan 13, 2010, at 2:52 PM, Andres Cabrera wrote:
>>
>>> Hi,
>>>
>>> Just checking it now, Csound does bitwise operations on integers.  
>>> See:
>>>
>>> 
>>> 
>>> 
>>> 
>>>
>>> instr 1
>>> iresultOr = p4 | p5
>>> iresultAnd = p4 & p5
>>> prints "%i | %i  = %i\\n", p4, p5, iresultOr
>>> prints "%i & %i  = %i\\n", p4, p5, iresultAnd
>>> endin
>>>
>>> 
>>> 
>>> i 1 0 0.1  1  2
>>> i 1 +  .   1  3
>>> i 1 +  .   2  4
>>> i 1 +  .   3  10
>>> e
>>> 
>>> 
>>>
>>> Cheers,
>>> Andrés
>>>
>>> On Wed, Jan 13, 2010 at 7:42 PM, Michael Gogins
>>>  wrote:
>>>> I don't know, sorry.
>>>>
>>>> Bitwise would still work with floating point numbers, since they  
>>>> are
>>>> after all made of bits. But I suspect that Csound uses | for  
>>>> logical
>>>> OR.
>>>>
>>>> Regards,
>>>> Mike
>>>>
>>>> On 1/13/10, Louis Cohen  wrote:
>>>>> Thanks, Mike,
>>>>>
>>>>> Your answer, together with the statement in the manual:
>>>>>
>>>>>>> "Opcodes that perform arithmetic and logic operations are -,  
>>>>>>> +, &&,
>>>>>>> ||, *, /, ^, and %."
>>>>>>>
>>>>>
>>>>> ...suggests that I can compute boolean expressions in csound,  
>>>>> since,
>>>>> as you said, || is a logical OR, while | is a binary OR. But I was
>>>>> under the impression that csound used only one computational type:
>>>>> floating point.
>>>>>
>>>>> Further, the manual doesn't mention the single-bar version as  
>>>>> far as I
>>>>> can tell, only the double-bar version (as in the above quotation.)
>>>>>
>>>>> Is the statement I quoted above just an error? (Same comments  
>>>>> for &&
>>>>> and &, I suppose...)
>>>>>
>>>>> -Lou
>>>>>
>>>>>
>>>>> On Jan 13, 2010, at 12:57 PM, Michael Gogins wrote:
>>>>>
>>>>>> In languages with C syntax, | is bitwise OR where
>>>>>>
>>>>>> binary 01 OR 10 -> binary 11
>>>>>>
>>>>>> and || is local OR where
>>>>>>
>>>>>> binary 01 OR 10 -> logical TRUE, any non-zero value, usually1  
>>>>>> or -1.
>>>>>>
>>>>>> Hope this helps,
>>>>>> Mike
>>>>>>
>>>>>> On 1/13/10, Louis Cohen  wrote:
>>>>>>> Hi, everyone,
>>>>>>>
>>>>>>> I had a need for performing a bit-wise OR operation today and  
>>>>>>> checked
>>>>>>> the manual for the proper notation. The Manual says:
>>>>>>>
>>>>>>> "Opcodes that perform arithmetic and logic operations are -,  
>>>>>>> +, &&,
>>>>>>> ||, *, /, ^, and %."
>>>>>>>
>>>>>>> The double vertical bar is apparently the symbol for logical  
>>>>>>> OR, but
>>>>>>> when I use it I get an error. After much trial-and-error, I  
>>>>>>> found the
>>>>>>> a single vertical bar gets accepted by Csound version 5.09  
>>>>>>> (float
>>>>>>> samples) Sep 22 2008, and appears to give me the expected  
>>>>>>> result (1 |
>>>>>>> 2 gives 3)
>>>>>>>
>>>>>>> So how come the manual shows this as a double bar?
>>>>>>>
>>>>>>> ALSO, what's going on under the hood? I thought numerical  
>>>>>>> values were
>>>>>>> floating point (in the floating point version.) If so, can I  
>>>>>>> still
>>>>>>> safely use bit-wise computations for numbers up to, say 256? or
>>>>>>> 65565?
>>>>>>>
>>>>>>> thanks, and Happy New Year!
>>>>>>>
>>>>>>> -Lou
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to this list.
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Michael Gogins
>>>>>> Irreducible Productions
>>>>>> http://www.michael-gogins.com
>>>>>> Michael dot Gogins at gmail dot com
>>>>>>
>>>>>>
>>>>>> Send bugs reports to this list.
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe csound"
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to this list.
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>
>>>>
>>>> --
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://www.michael-gogins.com
>>>> Michael dot Gogins at gmail dot com
>>>>
>>>>
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>> "unsubscribe csound"
>>>>
>>>
>>>
>>>
>>> -- 
>>>
>>>
>>> Andrés
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"