Re: [Tutor] Associate decimal values with an integer range

2013-04-30 Thread sparkle Plenty
On Tue, Apr 30, 2013 at 2:13 PM, sparkle Plenty < sparkle.plenty12481...@gmail.com> wrote: > > > On Mon, Apr 29, 2013 at 11:27 AM, Oscar Benjamin < > oscar.j.benja...@gmail.com> wrote: > >> On 29 April 2013 15:28, sparkle Plenty >> wrote: >> > Hi, I need some hints on where to start solving this

Re: [Tutor] Associate decimal values with an integer range

2013-04-30 Thread sparkle Plenty
On Mon, Apr 29, 2013 at 11:27 AM, Oscar Benjamin wrote: > On 29 April 2013 15:28, sparkle Plenty > wrote: > > Hi, I need some hints on where to start solving this problem. > > I have to interpret a one-byte floating point number as a range between 0 > > and 240. This is for a gui that controls

Re: [Tutor] Associate decimal values with an integer range

2013-04-29 Thread Steven D'Aprano
On 30/04/13 08:00, Dave Angel wrote: One byte floating point? Nonsense. While it can be defined (see eryksun's response, which tracks the IEEE standard quite well), it wouldn't store enough precision to be used for anything but a toy. Minifloats have their uses. Probably the best use is te

Re: [Tutor] Associate decimal values with an integer range

2013-04-29 Thread Oscar Benjamin
On 29 April 2013 22:03, eryksun wrote: > On Mon, Apr 29, 2013 at 12:16 PM, Alan Gauld > wrote: >>> I have to interpret a one-byte floating point number >> >> I'm curious, what does a one byte floating point number look like? >> I've never come across such a beast, the smallest FP representation

Re: [Tutor] Associate decimal values with an integer range

2013-04-29 Thread Dave Angel
On 04/29/2013 10:28 AM, sparkle Plenty wrote: Hi, I need some hints on where to start solving this problem. I have to interpret a one-byte floating point number as a range between 0 and 240. This is for a gui that controls an amplifier. I am getting a value such as 0.8367 from a fader control,

Re: [Tutor] Associate decimal values with an integer range

2013-04-29 Thread eryksun
On Mon, Apr 29, 2013 at 12:16 PM, Alan Gauld wrote: >> I have to interpret a one-byte floating point number > > I'm curious, what does a one byte floating point number look like? > I've never come across such a beast, the smallest FP representation I've > come across is 16 bits or two bytes. But t

Re: [Tutor] Associate decimal values with an integer range

2013-04-29 Thread Alan Gauld
On 29/04/13 15:28, sparkle Plenty wrote: Hi, I need some hints on where to start solving this problem. I have to interpret a one-byte floating point number I'm curious, what does a one byte floating point number look like? I've never come across such a beast, the smallest FP representation I've

Re: [Tutor] Associate decimal values with an integer range

2013-04-29 Thread Steven D'Aprano
On 30/04/13 00:28, sparkle Plenty wrote: Hi, I need some hints on where to start solving this problem. I have to interpret a one-byte floating point number as a range between 0 and 240. This is for a gui that controls an amplifier. I am getting a value such as 0.8367 from a fader control, and m

Re: [Tutor] Associate decimal values with an integer range

2013-04-29 Thread Oscar Benjamin
On 29 April 2013 15:28, sparkle Plenty wrote: > Hi, I need some hints on where to start solving this problem. > I have to interpret a one-byte floating point number as a range between 0 > and 240. This is for a gui that controls an amplifier. I am getting a > value such as 0.8367 from a fader co

[Tutor] Associate decimal values with an integer range

2013-04-29 Thread sparkle Plenty
Hi, I need some hints on where to start solving this problem. I have to interpret a one-byte floating point number as a range between 0 and 240. This is for a gui that controls an amplifier. I am getting a value such as 0.8367 from a fader control, and my Python is interpreting it as either a 0 o