[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] Testpackage improvements
From: |
Dmitry K. |
Subject: |
Re: [avr-libc-dev] Testpackage improvements |
Date: |
Tue, 22 Nov 2005 08:30:46 +1000 |
User-agent: |
KMail/1.5 |
On Monday 21 November 2005 08:28, Dmitry K. wrote:
> On Sunday 20 November 2005 21:48, Peeter Vois wrote:
> > Hi,
> >
> > The testpackage
> >
> > http://my.tele2.ee/vois/avrtest-0.0.6.tar.gz
>
> Is it true place? I can not download.
Yes, it is downloaded, thanks.
Very small note.
Looking the file 'whrandom.py':
def random(self):
"""Get the next random number in the range [0.0, 1.0)."""
...
return (x/30269.0 + y/30307.0 + z/30323.0) % 1.0
Looking the file 'roundings.py':
def round_to_U8( value, idx = 0 ):
...
return int(value) % 256
Is it possible to obtain the value 255 in 'test_mulsf3x.py'
random testing loop?
var_a = round_to_U8( 255 * whrandom.random() )
var_b = round_to_U8( 255 * whrandom.random() )
Dmitry.