No exact or substring matches. trying for part
PICList
Thread
'Questions about grounding?'
1995\12\06@021259
by
Ben KwokYiu Li

This might seem like a stupid question, but I have a schematic that have
some parts, including the PIC, grounded or whatever with a inverted
triangle. There is also a traditional ground symbol so my question is
what is the inverted triagle?
_____________________________________________________________________________
 spam_OUTbenliTakeThisOuTuclink2.berkeley.edu  .....benliKILLspam@spam@ocf.berkeley.edu  benliKILLspambdt.com ******

WEB Page under construction...coming soon to a WWW Server near you...******

"If we don't stop him now, Bill Gates will take over the entire galaxy, he 
already has Earth, and Mars."  Anonymous 
___________________________________________________________________________
1995\12\06@085448
by
David Knell
At 23:09 05/12/95 0800, you wrote:
>This might seem like a stupid question, but I have a schematic that have
>some parts, including the PIC, grounded or whatever with a inverted
>triangle. There is also a traditional ground symbol so my question is
>what is the inverted triagle?
It's sometimes used to indicate 0V, or sometimes the ve supply rail
(if you've got +ve and ve rails). I'm sure there must be a standard
for its use.
If there's no labelling on the triangle, then that's really slack of the
person who drew the circuit, and I guess you'll just have to work it
out from the context!
Good luck,
Dave

David Knell M.A.
Tel: 01843 846558
Fax: 01843 846608
Email: .....daveKILLspam.....daveltd.co.uk
1995\12\08@102205
by
Eric J. Strauts
>This might seem like a stupid question, but I have a schematic that have
>some parts, including the PIC, grounded or whatever with a inverted
>triangle. There is also a traditional ground symbol so my question is
>what is the inverted triagle?
The triangle symbol is a "circuit common" symbol. The ground symbol with
horizontal lines is an "earth ground". If both are used it usually means
they are not connected together but are common points for separate
circuits.
You usually see this where an optical isolator is used. The LED has one
grouns symbol and the phototransistor has the other indicating that the two
"grounds" may be hundreds of volts apart.
Eric Strauts  TEEM Electronics
Email: EraseME102570.2265spam_OUTTakeThisOuTcompuserve.com
'Grounding problems'
1998\03\23@144503
by
tsk196
Hello Engineers;
I have a project that controls the position of the
motor. And I have managed to use PIC17C44 to control it
successfully.
However, I had to erase the PIC whenever I wanted
to change the parameter of the PID. So I decided to make it
user friendly by having the computer to communicate with
the PIC.
And I did manage to get the computer to communicate
with the USART of the PIC.
But when the RS232 had the same ground as the
motor, the motor starts to go unstable. When I remove the
RS232 from the circuit, the motor is stable again.
Does anyone of you knows what is happening?
Thanks in advance to all engineers.
With regards,
Siong.

Mr Teik Siong
tsk196spam_OUTsoton.ac.uk
1998\03\23@154035
by
Michael Hagberg
noiSe, maybe you should look at either optoisolate the comm lines or use a
RS485 that uses differential voltages to read the signal.
michael
{Original Message removed}
1998\03\24@043433
by
tsk196
Hello Mr Michael and Baglatzis,
I am not too sure how to optoisolate the RS232 to
the PC? Can you tell me more abt this.
By the way, I had some budget to meet for this
project and I have no more excess amount to buy RS485. So I
have to make do with RS232.
Thanks for your help again.
> noiSe, maybe you should look at either optoisolate the
comm lines or use a
> RS485 that uses differential voltages to read the signal.
>optoisolate the RS232 to PC.
With regards,
Siong

Mr Teik Siong
@spam@tsk196KILLspamsoton.ac.uk
'how to filter surounding light'
1998\10\11@181403
by
marbel
Hello everybody
I want to measure reflected light from an object with an photo diode
but i don't want surrounding light to effect measurement .
I thought of lighting the object with infrared light pulsed at a certain
frequentie and detect the signal back and read the detected level.
My fear is this way is sensitive for noise and i wand a high level
resolution.
Are there good filters that pass light at an certain wave length?
an other way i thought of is to first measure surrounding light then light the
object with an additional light source measure again and subtract the
surrounding light from measurement with additional light
this method has also risks like is the surrounding light changes
Any body with suggestions or idea to this matter?
Marcel
Electonic Wokshop Scoop
Amsterdam
KILLspammarbelKILLspamxs4all.nl
1998\10\11@223913
by
Mark Willis

If you use a lens to focus just the light from the area you want to
examine, and use matte black paint inside the focusing assembly (and
keep the lens clean), that should pretty much do it (look into how
astronomers get telescopes to reject surrounding light, basically this
is the same problem on a *very much* smaller scale <G>)
Mark, RemoveMEmwillisTakeThisOuTnwlink.com
M van der Bilt wrote:
{Quote hidden}>
> Hello everybody
> I want to measure reflected light from an object with an photo diode
> but i don't want surrounding light to effect measurement .
> I thought of lighting the object with infrared light pulsed at a certain
> frequentie and detect the signal back and read the detected level.
> My fear is this way is sensitive for noise and i wand a high level
> resolution.
> Are there good filters that pass light at an certain wave length?
> an other way i thought of is to first measure surrounding light then light the
> object with an additional light source measure again and subtract the
> surrounding light from measurement with additional light
> this method has also risks like is the surrounding light changes
> Any body with suggestions or idea to this matter?
>
> Marcel
> Electonic Wokshop Scoop
> Amsterdam
>
>
spamBeGonemarbelspamBeGonexs4all.nl
1998\10\12@021047
by
paulb

M van der Bilt wrote:
> I want to measure reflected light from an object with an photo diode
> but I don't want surrounding light to effect measurement.
> I thought of lighting the object with infrared light pulsed at a
> certain frequentie and detect the signal back and read the detected
> level. My fear is this way is sensitive for noise and I want a high
> resolution.
Why would it be particularly noise sensitive? Hint: Integrate over
time. It is in fact the standard approach to the problem, the way most
of us would suggest.
> Another way I thought of is to first measure surrounding light then
> light the object with an additional light source measure again and
> subtract the surrounding light from measurement with additional light
That is simply restating the first method. The slower you do it, the
more likely the ambient light it to change in the meantime, so this is
*less* accurate.
> this method has also risks like is the surrounding light changes
The only particular problem (presuming again the first method) is
linearity of your detector. You *might* want to measure background
light level and compensate, which is implied in your second. And you
may want to add a path switch to a known target for selfcalibration.
This is all about time filtering, Mark has mentioned spatial filtering
so take note and start prototyping!

Cheers,
Paul B.
1998\10\12@021053
by
tjaart

M van der Bilt wrote:
> Hello everybody
> I want to measure reflected light from an object with an photo diode
> but i don't want surrounding light to effect measurement .
> I thought of lighting the object with infrared light pulsed at a certain
> frequentie and detect the signal back and read the detected level.
> My fear is this way is sensitive for noise and i wand a high level
> resolution.
> Are there good filters that pass light at an certain wave length?
> an other way i thought of is to first measure surrounding light then light the
> object with an additional light source measure again and subtract the
> surrounding light from measurement with additional light
> this method has also risks like is the surrounding light changes
> Any body with suggestions or idea to this matter?
A very effective way around this is to pulse your TX with a say, 25% duty
cycle, and to average the RX side. Use this averaged version to set the
gain and/or the threshold for the RX detect. This method is used in spread
spectrum receivers.

Friendly Regards
Tjaart van der Walt
TakeThisOuTtjaartEraseMEspam_OUTwasp.co.za

 WASP International 
R&D Engineer : GSM peripheral services development

SMS RemoveMEtjaartTakeThisOuTsms.wasp.co.za (160 chars max)
 http://www.wasp.co.za/~tjaart/index.html 
Voice: +27(0)116228686 Fax: +27(0)116228973
 WGS84 : 26¡10.52'S 28¡06.19'E 

1998\10\12@121921
by
Gabriel Gonzalez
I've used something similar, a short piece of rubber hose (the automotive
kind), they are pretty matte and black. The only problem would be if you use
a long section, it will bend easy, but on short lenghts, it is straight
enough.
The other advantage is that you can find it in a lot of diameters, and they
are real cheap and easy to find.
Just my 0.02
Calvin
{Original Message removed}
1998\10\12@141353
by
Eric Naus
What you want to do is modulate the light at a certain freq. and then
look for a response at that freq. That way ambient light will have little
effect.
There are many projects on the net that show how this is done.
Good luck and have fun :)
Eric
'grounding oscillator on pic12c508'
1999\09\23@212613
by
Mister Happy
<xflowed>I just build my first programmer. I figured out how I would hook up the
12c508 in place of the pic16f84, except for one thing. does the oscillator
terminal grouded on the pic16f84 need to be grounded on the pic12c508? or
does it not matter at all, or should they always be grounded on any pic?
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
</xflowed>
'[PIC]: AN575, FP24.A16, INT24 ROUNDING PROBLEM'
2000\11\07@074807
by
James Hillman

Dear All,
I am using the the latest version of Microchip's AN575. I found a rounding error in file FP24.A16, subroutine INT24 when FPFLAGS,RND is set.
Decimal 24bit Float INT24 result Decimal result
9.4999 8217FF 0009 9
9.50 821800 000A 10
9.9999 821FFF 000A 10 10.4999 8227FF 000A 10
10.50 822800 000A 10 (should be 10 because it is equidistant from 10 and 11 so rounds to the number with bit 0 0)
10.999 822FFF 000A 10 (should be 11 !)
11.000 823000 000B 11
11.4999 8237FF 000B 11
11.50 823800 000C 12 (should be 12 because it is equidistant from 11 and 12 so rounds to the number with bit 0 0)
11.999 823FFF 000C 12 12.0 824000 000C 12
12.4999 8247FF 000C 12
12.50 824800 000C 12
12.9999 824FFF 000C 12 (should be 13 !)
13.0 825000 000D 13 etc
Has anyone else who has noticed this error fixed it or know where I can get a working version ? I contacted Microchip and they could not help me. I am using this version :
FP24.A16 07/10/96 07:50
(RCS Header $Id: fp24.a16 2.7 1996/10/07 13:50:29 F.J.Testa Exp $)
James Hillman

http://www.piclist.com hint: To leave the PICList
piclistunsubscriberequestEraseME.....mitvma.mit.edu
2000\11\09@014946
by
Nikolai Golovchenko

part 1 3306 bytes contenttype:text/plain; charset=Windows1251 (decoded quotedprintable)
Hi James,
I've found also a few more problems with the INT24 routine:
1) when AEXP==0, which means zero floating number, but
AARGB0:1 is not zero, return will be incorrect. So AARGB0:1
have to be cleared in that case.
2) problem with overflow checking (for example 32769
(0x8e8001) will result in 0xC78e, instead of 0x8000)
There is really something wrong with rounding. They teach in
school that if a number is in the middle between two
integers, the highest by absolute value is taken. For
example, MATLAB has four rounding functions:
ROUND  round to closest integer (like in school)
FIX  round towards zero (ignore fractional part)
CEIL  round towards plus infinity
FLOOR  round towards minus infinity
let x = [1:0.25:1]
» x = [1:0.25:1]
x =
1 0.75 0.5 0.25 0 0.25 0.5 0.75 1
» round(x)
ans =
1 1 1 0 0 0 1 1 1
» fix(x)
ans =
1 0 0 0 0 0 0 0 1
» ceil(x)
ans =
1 0 0 0 0 1 1 1 1
» floor(x)
ans =
1 1 1 1 0 0 0 0 1
»
I assume that the INT24 routine should implement ROUND
function. But why there is a check for AARGB1.0 (LSb of
integer result)?...
Check attachment for a fixed version (I hope) of INT24
routine (fpint.asm).
Hope it helps,
Nikolai
 Original Message 
From: James Hillman <EraseMEjamesINDINTERFACE.CO.UK>
Sent: Tuesday, November 07, 2000 14:49:34
To: RemoveMEPICLISTEraseMEEraseMEMITVMA.MIT.EDU
Subj: [PIC]: AN575, FP24.A16, INT24 ROUNDING PROBLEM
{Quote hidden}> Dear All,
> I am using the the latest version of Microchip's AN575. I found a rounding error in file FP24.A16, subroutine INT24 when FPFLAGS,RND is set.
> Decimal 24bit Float INT24 result Decimal result
> 9.4999 8217FF 0009 9
> 9.50 821800 000A 10
> 9.9999 821FFF 000A 10 > 10.4999 8227FF 000A 10
> 10.50 822800 000A 10 (should be 10 because it is equidistant from 10 and 11 so rounds to the number with bit 0 0)
> 10.999 822FFF 000A 10 (should be 11 !)
> 11.000 823000 000B 11
> 11.4999 8237FF 000B 11
> 11.50 823800 000C 12 (should be 12 because it is equidistant from 11 and 12 so rounds to the number with bit 0 0)
> 11.999 823FFF 000C 12 > 12.0 824000 000C 12
> 12.4999 8247FF 000C 12
> 12.50 824800 000C 12
> 12.9999 824FFF 000C 12 (should be 13 !)
> 13.0 825000 000D 13 etc
> Has anyone else who has noticed this error fixed it or know where I can get a working version ? > I contacted Microchip and they could not help me. I am using this version :
> FP24.A16 07/10/96 07:50
> (RCS Header $Id: fp24.a16 2.7 1996/10/07 13:50:29 F.J.Testa Exp $)
> James Hillman
> 
>
http://www.piclist.com hint: To leave the PICList
>
RemoveMEpiclistunsubscriberequestspam_OUTKILLspammitvma.mit.edu
>
part 2 6916 bytes contenttype:application/octetstream; name="fpint.asm" (decode)
part 3 146 bytes

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2000\11\09@065531
by
James Hillman
Just for the record. To convert 24bit float to 16bit integer without a
rounding error :
As a quick fix I added 0.5 to the 24bit float using FPA24, cleared
FPFLAGS,RND to turn rounding off and converted the number to a 16bit integer
using INT24. I found that this always rounded correctly, but incurred the
delay introduced by the call to FPA24.
James Hillman

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
'[PIC]: grounding unused inputs'
2001\01\14@074732
by
Jose S. Samonte Jr.
Do unused inputs really need to be connected to ground?
What is the effect if they are not grounded?
Does it affect operation of the PIC?
Thank you very much.
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\14@090241
by
mike
On Sun, 14 Jan 2001 05:46:58 MST, you wrote:
>Do unused inputs really need to be connected to ground?
>What is the effect if they are not grounded?
>Does it affect operation of the PIC?
>Thank you very much.
>
>____________________________________________________________________
>Get free email and a permanent address at http://www.netaddress.com/?N=1
Unused pins should be connected to either 0V or Vdd, or set as
outputs. For PORT B you could also enable pullups as an alternative
if this doen't cause problems with other pin usage. If left unconnected, they may float to intermediate voltages and
cause increased (and erratic) power consumption and noise.
For a breadboard lashup it usually doesn't really matter, but any
production circuit should avoid floating inputs.

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\14@111508
by
Olin Lathrop
>>
Do unused inputs really need to be connected to ground?
What is the effect if they are not grounded?
Does it affect operation of the PIC?
<<
This has been beaten to death several times. Check the archive.
I leave unused pins open and set them as outputs. I usually tie unused
inputonly pins to ground.
*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 7723129, RemoveMEolinTakeThisOuTspamembedinc.com, http://www.embedinc.com

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\14@124041
by
David VanHorn
At 05:46 AM 1/14/01 0700, Jose S. Samonte Jr. wrote:
>Do unused inputs really need to be connected to ground?
>What is the effect if they are not grounded?
>Does it affect operation of the PIC?
>Thank you very much.
They don't have to be inputs on the pic, make them outputs, and let them float.
If you leave them as inputs, then yes, they should be connected to a logic
level, either high or low will do. Ground is probably slightly better for EMI.

Where's dave? http://www.findu.com/cgibin/find.cgi?kc6ete9

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\14@125936
by
Dan Michaels

Olin Lathrop wrote:
>>>
>Do unused inputs really need to be connected to ground?
>What is the effect if they are not grounded?
>Does it affect operation of the PIC?
><<
>
>This has been beaten to death several times. Check the archive.
>
>I leave unused pins open and set them as outputs. I usually tie unused
>inputonly pins to ground.
>
To be "safe", it is best to tie unused input pins to ground [or Vcc,
doesn't much matter which] *ONLY* through a resistor, rather than
directly with a short. This is not superstition, as during code
development it is all too easy to accidentally configure a pin
intended as input to output. You then run the risk of
shortcircuiting an output.
Furthermore, having a resistor on the pin, rather than a short,
makes it much easier to utilize that pin later on for some useful
function, as the need may arise.

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\14@152445
by
Olin Lathrop
> To be "safe", it is best to tie unused input pins to ground [or Vcc,
> doesn't much matter which] *ONLY* through a resistor, rather than
> directly with a short. This is not superstition, as during code
> development it is all too easy to accidentally configure a pin
> intended as input to output. You then run the risk of
> shortcircuiting an output.
Perhaps in a low volume product. I wouldn't want to burden a high volume
product with unnecessary parts for a minor debugging convenience.
*****************************************************************
Olin Lathrop, embedded systems consultant in Devens Massachusetts
(978) 7723129, EraseMEolinspamspamBeGoneembedinc.com, http://www.embedinc.com

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\14@175023
by
Dan Michaels

Olin Lathrop wrote:
>> To be "safe", it is best to tie unused input pins to ground [or Vcc,
>> doesn't much matter which] *ONLY* through a resistor, rather than
>> directly with a short. This is not superstition, as during code
>> development it is all too easy to accidentally configure a pin
>> intended as input to output. You then run the risk of
>> shortcircuiting an output.
>
>Perhaps in a low volume product. I wouldn't want to burden a high volume
>product with unnecessary parts for a minor debugging convenience.
>
Even in a high volume product, personally I would never simply
(a) configure a pin as output and then leave it unterminated, or
(b) set a pin to input and then short straight it to gnd. There are
a number of possible "disastrous" scenarios this way:
1  with (a), an ESD spike might modify the TRIS register, set an
output pin to input, and then it would float and pick up noise,
and possibly affect proper operation.
2  with (b), an ESD spike might modify the TRIS resgister, set an
input pin to output, and fry your product.
3  with (b), on the next go round with code development, you might
do the TRIS thing yourself by mistake.
4  with (b), it takes more work if you want to use the pin
differently in the future.
5  other circumstances may accidentally mod the TRIS register in
the field, eg brownouts, lightning crashes, screwy things related
to general susceptibility of the /MCLR pin, who knows what.
Better to spend a few pennies and tie the unused pins to gnd via
a bussed SIP resistor net, and improve the reliability of your
product. Also, as mentioned several times, it helps saves the butt
of those of us in the subset of nonperfect coders when they screw
up during development. Good practice for code dev, good practice
for field reliability.
In a nice "guaranteed" noisefree field environment, you might be
ok doing it the "quickanddirty" way. But, all in all, better
safe than sorry. Experience, yes. Superstition, no.
 danM

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\01\15@151904
by
Dwayne Reid

At 05:50 PM 1/14/01 0500, Dan Michaels wrote:
>Even in a high volume product, personally I would never simply
>(a) configure a pin as output and then leave it unterminated, or
>(b) set a pin to input and then short straight it to gnd. There are
>a number of possible "disastrous" scenarios this way:
>
>1  with (a), an ESD spike might modify the TRIS register, set an
> output pin to input, and then it would float and pick up noise,
> and possibly affect proper operation.
Hi there, Dan.
I would agree with your reasoning above *if* I set the TRIS registers only
at the start of code and never touched them again. But I consider that to
be bad practice. I refresh all important registers regularly, usually in
the routine that looks after the watchdog timer. In fact, I will often
*read* the registers to make sure that it is what I expect them to be,
rather than just refreshing them. If I get a nasty transient that is
enough to disturb the TRIS or INTCON registers, I figure that I had better
reinit everything anyways. So: I configure unused pins as output and set
them LO.
Regarding being able to use some of those unused pins for later changes,
you are correct in that having pads with holes makes those changes easier
to make. But you don't need to stuff components in those holes.
dwayne
Dwayne Reid <RemoveMEdwaynerKILLspamplanet.eon.net>
Trinity Electronics Systems Ltd Edmonton, AB, CANADA
(780) 4893199 voice (780) 4876397 fax
Celebrating 17 years of Engineering Innovation (1984  2001)
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservSTOPspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body
2001\01\15@155730
by
David VanHorn

>
>I would agree with your reasoning above *if* I set the TRIS registers only
>at the start of code and never touched them again. But I consider that to
>be bad practice. I refresh all important registers regularly, usually in
>the routine that looks after the watchdog timer. In fact, I will often
>*read* the registers to make sure that it is what I expect them to be,
>rather than just refreshing them. If I get a nasty transient that is
>enough to disturb the TRIS or INTCON registers, I figure that I had better
>reinit everything anyways. So: I configure unused pins as output and set
>them LO.
Interesting.
I see what you mean here.
On the AVR or Z8, this isn't a problem because the trisequivalent
registers can't be modified by inputs like this. I can easily output a 1
into a short to ground (pointless but harmless) and the chip won't decide
to change it on me.
I think the PIC architecture puts a larger burden on you to protect the
processor from output forcing in your designs.
It's an interesting design wrinkle though, that your output bits could be
changed on you at any time. That, plus the weaknesses in the BSF/BCF
instructions wrt pin loading, argue twoard the shadow register approach for
the port registers.

Where's dave? http://www.findu.com/cgibin/find.cgi?kc6ete9

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservSTOPspamEraseMEmitvma.mit.edu with SET PICList DIGEST in the body
2001\01\15@192135
by
Dan Michaels
Dwayne Reid wrote:
>I would agree with your reasoning above *if* I set the TRIS registers only
>at the start of code and never touched them again. But I consider that to
>be bad practice. I refresh all important registers regularly, usually in
>the routine that looks after the watchdog timer.
Also a good idea  back when I worked with 6805, Motorola actually
recommended in their databooks to periodically refresh the TRIS
registers [whatever they called them], just in case they are
changed by ESD/noise/etc. This should be easy to do in the outermost
code loop, since the TRIS are usually set on bootup and rarely changed,
in most cases.
 danM

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body
2001\01\15@194035
by
Dwayne Reid

At 03:55 PM 1/15/01 0500, David VanHorn wrote:
>Interesting.
>I see what you mean here.
>On the AVR or Z8, this isn't a problem because the trisequivalent
>registers can't be modified by inputs like this.
Hi there, Dave.
Something you wrote puzzles me  maybe there is yet another PIC wrinkle
that I am not aware of. Is there any condition where the TRIS register can
be changed by something happening on the port pins? If so, this is a new
problem to me!
The only port related problem I can think of right now is the
readmodifywrite issue  its not a problem since I am aware of it. But I
am not aware of a TRIS register susceptibility. Is there a problem
there? What causes it and what does it do?
I always check or refresh TRIS and other important registers simply because
I can't predict what a nasty ESD or EMI event might do to me  all I can do
is deal with the problem if it happens. But it sure doesn't happen during
normal operation.
dwayne
Dwayne Reid <EraseMEdwaynerEraseMEplanet.eon.net>
Trinity Electronics Systems Ltd Edmonton, AB, CANADA
(780) 4893199 voice (780) 4876397 fax
Celebrating 17 years of Engineering Innovation (1984  2001)
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listserv@spam@spam_OUTmitvma.mit.edu with SET PICList DIGEST in the body
2001\01\15@214016
by
David VanHorn
At 05:10 PM 1/15/01 0700, Dwayne Reid wrote:
>At 03:55 PM 1/15/01 0500, David VanHorn wrote:
>
>>Interesting.
>>I see what you mean here.
>>On the AVR or Z8, this isn't a problem because the trisequivalent
>>registers can't be modified by inputs like this.
>
>Hi there, Dave.
>
>Something you wrote puzzles me  maybe there is yet another PIC wrinkle
>that I am not aware of. Is there any condition where the TRIS register can
>be changed by something happening on the port pins? If so, this is a new
>problem to me!
Sorry, I meant port not tris :)

Where's dave? http://www.findu.com/cgibin/find.cgi?kc6ete9

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservKILLspammitvma.mit.edu with SET PICList DIGEST in the body
2001\01\16@014433
by
yansong gu
Has anyone used a dragonball for palm alike development? I just received
some literature from big M. Wonder where is a good start from a picer's
point.
Yansong
{Original Message removed}
2001\01\21@222546
by
Richard Sloan
2001\01\22@041944
by
Russell McMahon

>Does not seem to matter if an unused output is fried.
There is a fate WORSE than a cleanly fried output waiting for an in service
device that accidentally flips a grounded unused input to a high and unused
output (or whatever).
This is MUCH higher current drain. I have had a PIC in a micropower
application suddenly draw 100 mA from a 3 volt supply ! :)
That was from gross inattention (ie stupidity) (5 x inputs connected to VCC
driven as grounded outputs) but it could happen in real life.
Russell McMahon
_____________________________
What can one man* do?
Donate food daily free !!!  http://www.thehungersite.com/
Donate Vitamin A! http://www.thechildsurvivalsite.com/
http://www.rawa.com  one perspective on Afghanistan
http://www.changingourworld.com http://www.easttimor.com http://www.sudan.com
(*  or woman, child or internet enabled intelligent entity :))
>> To be "safe", it is best to tie unused input pins to ground [or Vcc,
>> doesn't much matter which] *ONLY* through a resistor, rather than
>> directly with a short. This is not superstition, as during code
>> development it is all too easy to accidentally configure a pin
>> intended as input to output. You then run the risk of
>> shortcircuiting an output.
>
>Perhaps in a low volume product. I wouldn't want to burden a high volume
>product with unnecessary parts for a minor debugging convenience.

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
'[OT]: Grounding grids'
2001\02\14@105558
by
enzo.gomez
2001\02\15@084038
by
enzo.gomez
Tom,
Grounding grids, as in grounding systems for buildings,
substation, and that kind of monsters. It's not a electronics
specific topic, but a electrical one :)
Can you help me with this? Or point me out a link or something useful?
I need some models for desing or analysis (isn't the same?).
Sorry for the nonspecific question, I didn't figure it out
it could be confused with so many topics!
ThanX again!
Enzo
> Grounding grids as in Tubes?
> Or as in static protection?,
> Or as in antenna counterpoises?
> Or lightning current sinks?
>
> What?

http://www.piclist.com hint: To leave the PICList
spamBeGonepiclistunsubscriberequest@spam@spam_OUTmitvma.mit.edu
'[PIC]: Any clever implementations of rounding out '
2001\04\03@084532
by
Bob Ammerman

[warning: untested code]
I don't know if this is clever, but it is simple.
Assuming positive values:
int round(int value, int granularity)
{
value += granularity >> 1;
value /= granularity;
return value * granularity;
}
If time isn't an issue and you want to avoid multiply/divide:
int round(int value, int granularity)
{
int result = 0;
value += granularity >> 1;
while (value > granularity)
{
result += granularity;
value = granularity;
}
return result;
}
Or, similarly:
int round(int value, int granularity)
{
int result = 0;
value += granularity >> 1;
for (;;)
{
value = granularity;
if (value <= 0)
break;
result += granularity;
}
}
Or even:
int round(int value, int granularity)
{
value += granularity >> 1;
result = 0;
while (result <= value)
result += granularity;
return result;
}
Conversion to assembly is an exercise for the user (or compiler) :)
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\04\04@052147
by
Roman Black
Kübek Tony wrote:
> Bob Ammerman wrote:
> >I don't know if this is clever, but it is simple.
> >
> >Assuming positive values:
> <snip>
> Well pretty clever :) didn't think of that myself,
> was trying an ( proved to be a tad hard ) 'extraction'
> of the ones and tens digits from the 24 bit value,
> took about 150'ish cycles, then I had to add the actual
> add/subtract bit. Anyway these would probably take
> less cycles. I'll try them.
> Do not want to use div/mul way to many cycles.
> ( for 24 bit inputs,outputs )
Tony, the best way is if you can keep rounding
to a binary mulitple.
Just add half of the rounding total,
then clear the low bits.
Example, to round to the nearest 256;
add 128 to the number,
clear the bottom 8 bits.
Roman

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\04\04@073702
by
Bob Ammerman

 Original Message 
From: Kübek Tony <TakeThisOuTtony.kubekspamFLINTAB.COM>
To: <PICLISTEraseMEMITVMA.MIT.EDU>
Sent: Wednesday, April 04, 2001 4:32 AM
Subject: Re: [PIC]: Any clever implementations of rounding out there ?
Hi,
Bob Ammerman wrote:
>I don't know if this is clever, but it is simple.
>
>Assuming positive values:
<snip>
Well pretty clever :) didn't think of that myself,
was trying an ( proved to be a tad hard ) 'extraction'
of the ones and tens digits from the 24 bit value,
took about 150'ish cycles, then I had to add the actual
add/subtract bit. Anyway these would probably take
less cycles. I'll try them.
Do not want to use div/mul way to many cycles.
( for 24 bit inputs,outputs )
Thanks,
/Tony
Tony,
Watch out!!!
The div/mul free techniques can be VERY slow because it is basically
simulating the division via repeated subtraction. As my original comment
said: if cycles are important, then these techniques wont work.
Ouch!
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)
Tony Kübek, Flintab AB
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
Email: RemoveMEtony.kubekEraseMEspam_OUTflintab.com
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[PIC]: clever rounding out there ?'
2001\04\05@050808
by
Roman Black

Kübek Tony wrote:
> 3: My current 'idea', try to 'extract' the ones and tens from the
> input ( 24 bit ) and somehow use it to round with. Sofar
> i've managed to extract it but don't know really if this is the way
> to go. I'm using about 200300 cycles for the extraction
> and have the tens in one byte and the ones in another byte.
Tony, i've been thinking about this rounding off
thing and I hope i'm not annoying you with suggestions
but the topic is intriguing to me. :o)
I think the 10s and 1s solution would work, how about:
(example, round 24bit binary number to nearest decimal 50)
1. add 25 to the 24bit number.
2. extract the 10s and 1s digits.
3. if 10s is greater than 5 subtract 5 from it.
4. multiply 10s by 10 (simple lookup table, 5 bytes)
5. add 1s to 10s (this is now the 50 modulus)
6. subtract the modulus from the 24bit number
All of those are very quick to perform, apart
from step 2; the extracting of the 10s and 1s.
You said you have done this but 300 cycles on
an 18 series PIC seems a lot.
Have you looked for an algorithm that extracts
BCD digits from a binary number? If you could find
a good refined system for this and just use the
section that extracts the last two digits??
:o)
Roman

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservRemoveMEEraseMEmitvma.mit.edu with SET PICList DIGEST in the body
2001\04\05@085334
by
Bob Ammerman
Tony,
How much code space can you spare for this function?
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)
{Original Message removed}
2001\04\05@101721
by
Bob Ammerman

Tony,
I like your idea of figuring out the contribution of each bit to the ones
and 10's digits. Here is a quick way to compute them:
Assume: FSR0 points to the LSByte of your value:
movlw 0
btfsc INDF0,0
addlw 1
btfsc INDF0,1
addlw 2
btfsc INDF0,2
addlw 4
btfsc INDF0,3
addlw 8
btfsc INDF0,4
addlw 6
btfsc INDF0,5
addlw 2
btfsc INDF0,6
addlw 4
btfsc POSTINC0,7
addlw 8
etc.
This will take 48 cycles/instructions to compute the 1's part.
The same pattern can be repeated to compute the 10's. Note that the four
LSBits of the first byte have no affect on the 10's so you can do this in
40cycles/instructions. Of course you'd start with the MSBits and work to the
lsbits since the code above leaves FSR0 pointing to the MSBits.
That's only 88 cycles/instructions to extract the ones and tens.
Wait a minute!!!
Another thought in computing the 1's part....
Except for the 1's bit, each bit in a nibble already has the right value,
so:
movf INDF0,W ; Get low nibble
andlw 0x0F
movwf ones
swapf INDF0,W ; Get 2nd nibble
andlw 0x0F
btfsc POSTINC0,0 ; Low bit set?
addlw 5 ; Yes: it is worth 6, not 1
addwf ones,F
movf INDF0,W ; Get 3rd nibble
andlw 0x0F
btfsc INDF0,0 ; Low bit set?
addlw 5 ; Yes, it is worth 6, not 1
addwf ones,F
swapf INDF0,W ; Get 4th nibble
andlw 0x0F
btfsc POSTINC0,0 ; Low bit set?
addlw 5 ; Yes, it is worth 6, not 1
addwf ones,F
movf INDF0,W ; Get 5rd nibble
andlw 0x0F
btfsc INDF0,0 ; Low bit set?
addlw 5 ; Yes, it is worth 6, not 1
addwf ones,F
swapf INDF0,W ; Get 6th nibble
andlw 0x0F
btfsc INDF0,0 ; Low bit set?
addlw 5 ; Yes, it is worth 6, not 1
addwf ones,F
That's 28 (for the ones)+40 (for the tens) == 68 instructions/cycles instead
of 88!
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistserv@spam@mitvma.mit.edu with SET PICList DIGEST in the body
2001\04\05@111851
by
Roman Black

Bob Ammerman wrote:
{Quote hidden}> Another thought in computing the 1's part....
> Except for the 1's bit, each bit in a nibble already has the right value,
> so:
>
> movf INDF0,W ; Get low nibble
> andlw 0x0F
> movwf ones
> swapf INDF0,W ; Get 2nd nibble
> andlw 0x0F
> btfsc POSTINC0,0 ; Low bit set?
> addlw 5 ; Yes: it is worth 6, not 1
> addwf ones,F
>
> movf INDF0,W ; Get 3rd nibble
> andlw 0x0F
> btfsc INDF0,0 ; Low bit set?
> addlw 5 ; Yes, it is worth 6, not 1
> addwf ones,F
> swapf INDF0,W ; Get 4th nibble
> andlw 0x0F
> btfsc POSTINC0,0 ; Low bit set?
> addlw 5 ; Yes, it is worth 6, not 1
> addwf ones,F
>
> movf INDF0,W ; Get 5rd nibble
> andlw 0x0F
> btfsc INDF0,0 ; Low bit set?
> addlw 5 ; Yes, it is worth 6, not 1
> addwf ones,F
> swapf INDF0,W ; Get 6th nibble
> andlw 0x0F
> btfsc INDF0,0 ; Low bit set?
> addlw 5 ; Yes, it is worth 6, not 1
> addwf ones,F
>
> That's 28 (for the ones)+40 (for the tens) == 68 instructions/cycles instead
> of 88!
Excellent work Bob! So, it would take about:
1. add 25 to the 24bit number. (6)
2. extract the 10s and 1s digits. (68)
3. if 10s is greater than 5 subtract 5 from it. (7)
4. multiply 10s by 10 (simple lookup table, 5 bytes) (5)
5. add 1s to 10s (this is now the 50 modulus) (2)
6. subtract the modulus from the 24bit number (6)
That's only about 94 instructions, give or take
a few. :o)
So that would be on a 18C series PIC, how much
larger would it become if using only a 16 series
PIC I wonder??
Roman

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservspam_OUT.....mitvma.mit.edu with SET PICList DIGEST in the body
'[PIC]: Rounding to closest 10's multiple, code enc'
2001\04\06@102145
by
o88591?Q?K=FCbek_Tony?=

Hi,
as I promised I've hammered out some rounding code and
will attach the rounding to closest 10s multiple below.
The rounding to closest 1's multiple will follow
in 5'min as an separate posting.
Some minor comments:
It's coded for 24 bit input/output trough fsr0,
uses some 18Cxx specific instructions ( wouldn't be
to hard to convert to other pic's ).
It's not fully omptimized, I'll leave that as an exerzice
to the user ( there are some places that can be improved )
The rounding takes about 190'ish instructions worst case.
As far as I can tell there really are no faster options
to round an 24 bit value. But please prove me wrong :)
And without the input from Bob,Roman and Scott it sure would
have been a rougher ride. Thanks.
Use at will.
; ***********************************************************************
; ROUND_TENS_FSR0_24bit  Rounds 24 bit unsigned value value pointed to by
fsr0
; according to (tens)granularity in w
; FSR0 must point to MSB of input, output will overwrite input at exit
; Granularity can be 0x05, 0x02, 0x01
; 0x05 round to nearest decimal '50', 0x02 round to nearest decimal '20'
etc.
; In other words low nibble of w decides the granularity for the tens digit
( as 'bcd' )
; Other granularities are untested and may/may not nork.
;
; Executes in about 190 cycles worst case
; About 180 instructions are used. I.e mostly unrolled code
;
; Algorithm:
; * Adds half granularity to input. ( i.e. for granularity 0x05 ( 50 ) 25 is
added )
; * 'Exctract' each bit's addition to the ones and tens digit
; separately. After the actual 'extraction' they are normalized ( to 09
range ).
; * If tens digit is larger then granularity, granulairty is subtracted from
it
; until next subtraction generates negative result.
; * Multiply tens digit by 10 ( i.e. to 'real' value )
; * Add the ones
; * Subtract the result from the input and overwrite with output.
;
;
; Ram usage ( all in access bank ):
; ARG2_24 1 byte 'tens'
; ARG2_24+1 1 byte 'ones'
; Temp 1 byte 'granularity'/10 ( i.e. input in w )
; Temp+1 1 byte for calculation of 'real' granularity/2
;
ROUND_TENS_FSR0_24bit
GLOBAL ROUND_TENS_FSR0_24bit
; save granularity
MOVWF Temp,A
; set pointer to lsb of input
MOVF POSTINC0,W,A
MOVF PREINC0,W,A ; pointer now to lsb and lsb in w
; add half of granularity(real) to input
;, make a copy of granularity
MOVFF Temp,Temp+1
; calculate 'real' granularity/2 ( i.e. input granularity*5 )
; multiply by 4
BCF STATUS,C ; clear carry
RLCF Temp+1,F,A ; multiply with 2
RLCF Temp+1,F,A ; multiply with 4
; add 'pseudo' granularity ( input )
MOVF Temp,W,A
ADDWF Temp+1,W,A ; and add them, w = input granularity*5 ( or
rather 'real' granularity/2 )
; add to input
ADDWF POSTDEC0,F,A ; add to lsb and set pointer to middle byte
MOVF INDF0,W,A ; get middle byte
BTFSC STATUS,C
ADDLW D'1' ; propagate the carry
MOVWF POSTDEC0,A ; save it and set pointer to msb
BTFSC STATUS,C
INCF INDF0,F,A ; propagate the carry and leave pointer to
msb
; clear ones and tens bytes
CLRF ARG2_24+1,A ; temp storage for the ones
CLRF ARG2_24,A ; temp storage for the tens
; * calcualte top byte byte low nibble
MOVF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest nibble
; if zero skip to next nibble
BTFSC STATUS,Z
GOTO ROUND_TENS_FSR0_NIB2
BTFSC INDF0,0,A ; lowest bit set in low nibble ?
ADDLW D'5' ; yes add 5, it's worth '6' not 1
MOVWF ARG2_24+1,A ; start value for the ones
; calculate tens byte, bit 'tensvalues' from bit 0 : 3,7,4,8
MOVLW 0x00
BTFSC INDF0,0,A ; test bit
ADDLW D'3' ; add it's 'tens' value to w
BTFSC INDF0,1,A ; test bit
ADDLW D'7' ; add it's 'tens' value to w
BTFSC INDF0,2,A ; test bit
ADDLW D'4' ; add it's 'tens' value to w
BTFSC INDF0,3,A ; test bit
ADDLW D'8' ; add it's 'tens' value to w
; and move the result to the tens byte
MOVWF ARG2_24,A ; tens byte
ROUND_TENS_FSR0_NIB2
; calcualte top byte high nibble
SWAPF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest nibble
BTFSC INDF0,4,A ; lowest bit set in high nibble ?
ADDLW D'5' ; yes add 5, it's worth '6' not 1
ADDWF ARG2_24+1,F,A ; add it to ones
; calculate tens byte, bit 'tensvalues' from bit 0 : 7,5,0,0 ( i.e.
skip test of top two bits )
MOVLW 0x00
BTFSC INDF0,4,A ; test bit
ADDLW D'7' ; add it's 'tens' value to w
BTFSC POSTINC0,5,A ; test bit ***AND** increment pointer to
middle byte of input
ADDLW D'5' ; add it's 'tens' value to w
; and add result to the tens byte
ADDWF ARG2_24,F,A ; add to tens byte
; * calcualte middle byte low nibble
MOVF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest nibble
; if zero skip to next nibble
BTFSC STATUS,Z
GOTO ROUND_TENS_FSR0_NIB3
BTFSC INDF0,0,A ; lowest bit set in low nibble ?
ADDLW D'5' ; yes add 5, it's worth '6' not 1
ADDWF ARG2_24+1,F,A ; add it to ones
; calculate tens byte, bit 'tensvalues' from bit 0 : 5,1,2,4
MOVLW 0x00
BTFSC INDF0,0,A ; test bit
ADDLW D'5' ; add it's 'tens' value to w
BTFSC INDF0,1,A ; test bit
ADDLW D'1' ; add it's 'tens' value to w
BTFSC INDF0,2,A ; test bit
ADDLW D'2' ; add it's 'tens' value to w
BTFSC INDF0,3,A ; test bit
ADDLW D'4' ; add it's 'tens' value to w
; and add result to the tens byte
ADDWF ARG2_24,F,A ; add to tens byte
ROUND_TENS_FSR0_NIB3
; calcualte middle byte high nibble
SWAPF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest nibble
BTFSC INDF0,4,A ; lowest bit set in high nibble ?
ADDLW D'5' ; yes add 5, it's worth '6' not 1
ADDWF ARG2_24+1,F,A ; add it to ones
; calculate tens byte, bit 'tensvalues' from bit 0 : 9,9,8,6
MOVLW 0x00
BTFSC INDF0,4,A ; test bit
ADDLW D'5' ; add it's 'tens' value to w
BTFSC INDF0,5,A ; test bit
ADDLW D'1' ; add it's 'tens' value to w
BTFSC INDF0,6,A ; test bit
ADDLW D'2' ; add it's 'tens' value to w
BTFSC POSTINC0,7,A ; test bit *AND* increment pointer to lowest
byte of input
ADDLW D'4' ; add it's 'tens' value to w
; and add result to the tens byte
ADDWF ARG2_24,F,A ; add to tens byte
; * calculate lowest nibble of lowet byte
; note has no effect on the tens byte
MOVF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest nibble
ADDWF ARG2_24+1,F,A ; add it to ones
; calculate top nibble 'ones' byte
SWAPF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest (prev. highest) nibble
; if zero skip and continue with normalization
BTFSC STATUS,Z
GOTO ROUND_TENS_FSR0_NORM
BTFSC INDF0,4,A ; lowest bit set in top nibble ?
ADDLW D'5' ; yes add 5, it's worth '6' not 1
ADDWF ARG2_24+1,F,A ; add it to ones
; calculate tens byte, bit 'tensvalues' from bit 4 : 1,3,6,2
MOVLW 0x00
BTFSC INDF0,4,A ; test bit
ADDLW D'1' ; add it's 'tens' value to w
BTFSC INDF0,5,A ; test bit
ADDLW D'3' ; add it's 'tens' value to w
BTFSC INDF0,6,A ; test bit
ADDLW D'6' ; add it's 'tens' value to w
BTFSC INDF0,7,A ; test bit, leave pointer to lsb of input
ADDLW D'2' ; add it's 'tens' value to w
; and add it to the tens byte
ADDWF ARG2_24,F,A ; save tens byte
; pointer fsr0 points to lsb of input here
ROUND_TENS_FSR0_NORM
; *** ones and tens updated now we need to add the overflow from the
ones
; to the tens ( i.e. ones and tens are NOT limited to 09 yet )
; Maximum value for the ones: 109
; Maximum value for the tens: 90 ( i.e. 90*10 = 900 )
; ** Normalize tens and ones digits **
; we start by subtracting 30 from the ones until negative, then add
ten until positive again
; after which we now it's in 09 range
; subtract 30 from ones
MOVLW D'30'
ROUND_TENS_FSR0_SUB30
; add '3' to tens
INCF ARG2_24,F,A ; +10
INCF ARG2_24,F,A ; +20
INCF ARG2_24,F,A ; +30
; subtract 30 from ones
SUBWF ARG2_24+1,F,A
SKPNC ; overflow, i.e. negative then add 10 until positive again
GOTO ROUND_TENS_FSR0_SUB30
; add 10 until positive again
MOVLW D'10'
ROUND_TENS_FSR0_ADD10
; remove ten from tens
DECF ARG2_24,F,A ; 10
; add 10 to ones
ADDWF ARG2_24+1,F,A
SKPC ; positive ?
GOTO ROUND_TENS_FSR0_ADD10 ; nope still negative
; now ones are positive and below 10, i.e. we have successfully
subtracted
; the ones digit for the 24 bit input
; now we 'adjust' the tens digit to be inthe same range 09
MOVLW D'30' ;i.e. 300
ROUND_TENS_FSR0_SUB300
; subtract 30 (300) from tens
SUBWF ARG2_24,F,A
SKPNC ; overflow, i.e. negative then add 10 until positive again
GOTO ROUND_TENS_FSR0_SUB300
; add 10(100) until positive again
MOVLW D'10'
ROUND_TENS_FSR0_ADD100
; add 10(100) to tens until postive
ADDWF ARG2_24,F,A
SKPC ; positive ?
GOTO ROUND_TENS_FSR0_ADD100 ; nope still negative
; now tens are also positive and below 10, i.e. we have successfully
subtracted
; the tens digit for the 24 bit input
; ** calculate granularity diff in the tens digit
; subtract granularity from the tens byte
MOVF ARG2_24,W,A ; start value
ROUND_TENS_FSR0_GRAN_CHK
MOVWF ARG2_24,A ; save start value ( or concecutive values )
MOVF Temp,W,A ; get granularity
; subtract it from the tens
SUBWF ARG2_24,W,A
; check if negative or positive
; if positive/zero save result and try again
BTFSS STATUS,N
GOTO ROUND_TENS_FSR0_GRAN_CHK
; now we need to add the tens and ones, first 'multiply' the tens
; by 10
BCF STATUS,C
RLCF ARG2_24,F,A ;tens = tens *2
MOVFF ARG2_24,Temp ; overwrite the granularity ( we don't need
it anymore ) = tens *2
RLCF ARG2_24,F,A ; tens*2 = tens*2*2
RLCF ARG2_24,W,A ; tens*2*2 = tens*2*2*2 = tens*8
; add temp(tens*2) and tens*8 to w
ADDWF Temp,W,A ; w = tens*10
; then we it with the ones
ADDWF ARG2_24+1,W,A
; w = tens*10 + ones
; now we subtract this from the input
SUBWF POSTDEC0,F,A ; subtract and set pointer to middle byte
SKPC
DECF INDF0,F,A ; propagate the borrow
MOVF POSTDEC0,W ; set pointer to msb
SKPC
DECF INDF0,F,A ; propagate the borrow and leave pointer to
msb of input
RETURN
Tony Kübek, Flintab AB
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
Email: spamBeGonetony.kubekEraseMEflintab.com
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²

http://www.piclist.com hint: To leave the PICList
piclistunsubscriberequestspamBeGonemitvma.mit.edu
'[PIC]: Rounding to closest 1's multiple, code encl'
2001\04\06@103828
by
o88591?Q?K=FCbek_Tony?=

Hi,
as I promised I've hammered out some rounding code and
will attach the rounding to closest 1s multiple below.
The rounding to closest 10's multiple is posted separately.
Some minor comments:
It's coded for 24 bit input/output trough fsr0,
uses some 18Cxx specific instructions ( wouldn't be
to hard to convert to other pic's ).
It's not fully omptimized, I'll leave that as an exerzice
to the user ( there are some places that can be improved )
The rounding takes about 88 instructions worst case.
As far as I can tell there really are no faster options
to round an 24 bit value. But please prove me wrong :)
And without the input from Bob,Roman and Scott it sure would
have been a rougher ride. Thanks.
Use at will.
; ***********************************************************************
; ROUND_ONES_FSR0_24bit  Rounds 24 bit unsigned value value pointed to by
fsr0
; according to (ones)granularity in w
; FSR0 must point to MSB of input, output will overwrite input at exit
; Granularity can be 0x05, 0x02 ( others not tested )
; 0x05 round to nearest decimal '5', 0x02 round to nearest decimal '2' etc.
; In other words low nibble of w decides the granularity for the ones digit
; Other granularities are untested and may/may not nork.
;
; Executes in about 88 cycles worst case
; About 65 instructions are used. I.e mostly unrolled code
;
; Algorithm:
; * Adds half granularity to input. ( i.e. for granularity 0x05 ( 5 ) 2 is
added )
; * 'Exctract' each bit's addition to the ones digit
; After the actual 'extraction' it is normalized ( to 09 range ).
; * If ones digit is larger then granularity, granulairty is subtracted from
it
; until next subtraction generates negative result.
; * Subtract the result from the input and overwrite with output.
;
;
; Ram usage ( all in access bank ):
; ARG2_24+1 1 byte 'ones'
; Temp 1 byte 'granularity' ( i.e. input in w )
;
ROUND_ONES_FSR0_24bit
GLOBAL ROUND_ONES_FSR0_24bit
; save granularity
MOVWF Temp,A
; set pointer to lsb of input
MOVF POSTINC0,W,A
MOVF PREINC0,W,A ; pointer now to lsb and lsb in w
; add half of granularity(real) to input
BCF STATUS,C
RRCF Temp,W,A
ADDWF POSTDEC0,F,A ; add to lsb and set pointer to middle byte
MOVF INDF0,W,A ; get middle byte
BTFSC STATUS,C
ADDLW D'1' ; propagate the carry
MOVWF POSTDEC0,A ; save it and set pointer to msb
BTFSC STATUS,C
INCF INDF0,F,A ; propagate the carry and leave pointer to
msb
; * calcualte top byte byte low nibble
MOVF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest nibble
BTFSC INDF0,0,A ; lowest bit set in low nibble ?
ADDLW D'5' ; yes add 5, it's worth '6' not 1
MOVWF ARG2_24+1,A ; start value for the ones
; calcualte top byte high nibble
SWAPF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest nibble
BTFSC POSTINC0,4,A ; lowest bit set in high nibble ? *set
pointer to middle byte *
ADDLW D'5' ; yes add 5, it's worth '6' not 1
ADDWF ARG2_24+1,F,A ; add it to ones
; * calcualte middle byte low nibble
MOVF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest nibble
BTFSC INDF0,0,A ; lowest bit set in low nibble ?
ADDLW D'5' ; yes add 5, it's worth '6' not 1
ADDWF ARG2_24+1,F,A ; add it to ones
; calcualte middle byte high nibble
SWAPF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest nibble
BTFSC POSTINC0,4,A ; lowest bit set in high nibble ?*set
pointer to lowest byte *
ADDLW D'5' ; yes add 5, it's worth '6' not 1
ADDWF ARG2_24+1,F,A ; add it to ones
; * calculate lowest nibble of lowest byte
MOVF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest nibble
ADDWF ARG2_24+1,F,A ; add it to ones
; calculate top nibble 'ones' byte
SWAPF INDF0,W,A ;
ANDLW b'00001111' ; mask out lowest (prev. highest) nibble
BTFSC INDF0,4,A ; lowest bit set in top nibble ?
ADDLW D'5' ; yes add 5, it's worth '6' not 1
ADDWF ARG2_24+1,F,A ; add it to ones
; pointer fsr0 points to lsb of input here
ROUND_ONES_FSR0_NORM
; *** ones updated now we need to normalize it ( i.e. remove
everything above 10 )
; Maximum value for the ones: 109
; we start by subtracting 30 from the ones until negative, then add
ten until positive again
; after which we know it's in 09 range
; subtract 30 from ones
MOVLW D'30'
ROUND_ONES_FSR0_SUB30
; subtract 30 from ones
SUBWF ARG2_24+1,F,A
SKPNC ; overflow, i.e. negative then add 10 until positive again
GOTO ROUND_ONES_FSR0_SUB30
; add 10 until positive again
MOVLW D'10'
ROUND_ONES_FSR0_ADD10
; add 10 to ones
ADDWF ARG2_24+1,F,A
SKPC ; positive ?
GOTO ROUND_ONES_FSR0_ADD10 ; nope still negative
; now ones are positive and below 10, i.e. we have successfully
subtracted
; the ones digit for the 24 bit input
; ** calculate granularity diff in the ones digit
; subtract granularity from the ones byte
MOVF ARG2_24+1,W,A ; start value
ROUND_ONES_FSR0_GRAN_CHK
MOVWF ARG2_24+1,A ; save start value ( or concecutive values )
MOVF Temp,W,A ; get granularity
; subtract it from the tens
SUBWF ARG2_24+1,W,A
; check if negative or positive
; if positive/zero save result and try again
BTFSS STATUS,N
GOTO ROUND_ONES_FSR0_GRAN_CHK
; get the diff into w
MOVF ARG2_24+1,W,A ; granularity diff
; now we subtract this from the input
SUBWF POSTDEC0,F,A ; subtract and set pointer to middle byte
SKPC
DECF INDF0,F,A ; propagate the borrow
MOVF POSTDEC0,W ; set pointer to msb
SKPC
DECF INDF0,F,A ; propagate the borrow and leave pointer to
msb of input
RETURN
Tony Kübek, Flintab AB
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
Email: RemoveMEtony.kubek@spam@spamBeGoneflintab.com
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²

http://www.piclist.com hint: To leave the PICList
.....piclistunsubscriberequest@spam@EraseMEmitvma.mit.edu
2001\04\06@104754
by
Bob Ammerman
Rounding to nearest 2 is really trivial:
If LSBit is set then add 1.
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)
{Original Message removed}
2001\04\06@105826
by
Bob Ammerman
Tony,
I hate to do this to you, but here is simpler(?) way to round to nearest 5:
Given 25 bit number HI:MID:LO
Its value is
LO + 256*MID + 65536*HI
Which is equal to
LO+255*MID+MID+65535*HI+HI
But 255*MID and 65535*HI are both multiples of 5, so:
LO+MID+HI == HI:MID:LO (mod 5)
This can be at most a 10 bit number, let us call it H2:L2
now we can:
movf L2,W,A
andlw 0x0F
movwf ONES,A
swapf L2,W,A
andlw 0x0F
btfsc L2,4
addlw 5 ; worth 6, not 1
btfsc H2,0
addlw 6
btfsc H2,1
addlw 2
and Bob's your uncle!
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)

http://www.piclist.com hint: To leave the PICList
.....piclistunsubscriberequestRemoveMEmitvma.mit.edu
2001\04\06@111905
by
o88591?Q?K=FCbek_Tony?=

Hi,
Scott Dattalo wrote:
>Tony,
>I hate to do this to you, but here is simpler(?) way to round to nearest 5:
Thankfully accepted :)
{Quote hidden}>Given 25 bit number HI:MID:LO
>Its value is
>LO + 256*MID + 65536*HI
>Which is equal to
>LO+255*MID+MID+65535*HI+HI
>But 255*MID and 65535*HI are both multiples of 5, so:
>LO+MID+HI == HI:MID:LO (mod 5)
>This can be at most a 10 bit number, let us call it H2:L2
>now we can:
> movf L2,W,A
> andlw 0x0F
> movwf ONES,A
>
> swapf L2,W,A
> andlw 0x0F
> btfsc L2,4
> addlw 5 ; worth 6, not 1
> btfsc H2,0
> addlw 6
> btfsc H2,1
> addlw 2
I'll be darned, I certanily hope there are no such shortcuts for
the 10's multiple, that would make my latest 3 hours a total waste :).
Brilliant !
Actually I never really thought about the 1's routine it was just
an cutNpaste job from the 10's. followed by some minor tests
to spot any obvious misstakes.
>and Bob's your uncle!
I guess :)
/Tony
Tony Kübek, Flintab AB
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
Email: .....tony.kubekSTOPspam@spam@flintab.com
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²

http://www.piclist.com hint: To leave the PICList
piclistunsubscriberequestEraseME@spam@mitvma.mit.edu
2001\04\06@111915
by
o88591?Q?K=FCbek_Tony?=
2001\04\06@111926
by
o88591?Q?K=FCbek_Tony?=
Hi,
Scott Dattalo wrote:
>Rounding to nearest 2 is really trivial:
>
>If LSBit is set then add 1.
Yes I know, the same goes for 1 it's *very* trivial :).
It's main use is for 5, however input granularity 1 and 2
doesn't 'brake' the routine. Still outputs what's expected.
But ofcource who want's to waste cycles ?.
/Tony
Tony Kübek, Flintab AB
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
Email: tony.kubekspam_OUT@spam@flintab.com
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²

http://www.piclist.com hint: To leave the PICList
spamBeGonepiclistunsubscriberequest@spam@mitvma.mit.edu
2001\04\06@123957
by
Scott Dattalo

On Fri, 6 Apr 2001, [Iso88591] Kübek Tony wrote:
> Hi,
>
> Scott Dattalo wrote:
Actually Bob. And it's a damned clever idea.
{Quote hidden}> >Tony,
> >I hate to do this to you, but here is simpler(?) way to round to nearest 5:
>
> Thankfully accepted :)
>
> >Given 25 bit number HI:MID:LO
> >Its value is
> >LO + 256*MID + 65536*HI
> >Which is equal to
> >LO+255*MID+MID+65535*HI+HI
> >But 255*MID and 65535*HI are both multiples of 5, so:
> >LO+MID+HI == HI:MID:LO (mod 5)
> >This can be at most a 10 bit number, let us call it H2:L2
> >now we can:
> > movf L2,W,A
> > andlw 0x0F
> > movwf ONES,A
> >
> > swapf L2,W,A
> > andlw 0x0F
> > btfsc L2,4
> > addlw 5 ; worth 6, not 1
> > btfsc H2,0
> > addlw 6
> > btfsc H2,1
> > addlw 2
>
> I'll be darned, I certanily hope there are no such shortcuts for
> the 10's multiple, that would make my latest 3 hours a total waste :).
actually the 10's aren't much harder:
lo + 256*mid + 65536*hi = lo +250*mid + 65530*hi + 6*(mid + hi)
clrf h2
movf mid, w
addwf hi,w
rlfc h2,f
movwf l2 ;mid+hi
addwf l2,f ;2*mid+2*hi
skpnc
incf h2,f
addwf l2,f ;3*mid+3*hi
skpnc
incf h2,f
clrc rlf temp,w ;6*mid+6*hi
skpnc
incf h2,f
addwf lo,w
skpnc
incf h2,f
at this point, h2:l2 is congruent to the original 24bit number modulo 10 and is
no more than 14bits. But this is off the top of my head and not necessarily
optimized...
>
> Brilliant !
Yeah! Let's by Bob a beer.
Scott

http://www.piclist.com hint: To leave the PICList
RemoveMEpiclistunsubscriberequestEraseMEKILLspammitvma.mit.edu
2001\04\06@232039
by
Djula Djarmati

Here is another version for 24bit mod 10 for 14bit core:
Mod10 movfw LO +ADsCalculates HI:MED:LO mod 10
andlw 0x0f +ADsOutput (09) is in W
movwf Tmp +ADsBits 3:0 normal weight 8421
swapf LO,w +ADs
call CalcNbl +ADsBits 7:4 +AD4 weight 8426
movfw MED +ADs
call CalcNbl +ADsBits 11:8 +AD4 weight 8426
swapf MED,w +ADs
call CalcNbl +ADsBits 15:12 +AD4 weight 8426
movfw HI +ADs
call CalcNbl +ADsBits 18:15 +AD4 weight 8426
swapf HI,w +ADs
call CalcNbl +ADsBits 23:19 +AD4 weight 8426
swapf Tmp,w +ADs24 bits shrinked to 7 in Tmp
call CalcNbl +ADsShrink more to 5 bits
movfw Tmp +ADs
skpndc +ADsBit4+AD01? (digit carry)
addlw 6 +ADsyes, 8421 to 8426 for bit4
addlw 10 +ADsBits 3:0 are ok now
skpdc +ADsAPA10?
addlw 10 +ADsyes, restore old value
andlw 0x0f +ADsclear upper bits
return
CalcNbl andlw 0x0f +ADsTake care of 8426 weight scheme
addwf Tmp,f +ADsfor a nibble, first add 8421
andlw 1 +ADsMask bit 0
movlw 5 +ADsPrepare addition
skpz +ADsNibble bit0+AD01?
addwf Tmp,f +ADsyes, add 5 to get 8426
return
Djula

http://www.piclist.com hint: To leave the PICList
spamBeGonepiclistunsubscriberequestspam_OUTRemoveMEmitvma.mit.edu
2001\04\07@135904
by
Scott Dattalo

I'd like to expand on Bob's idea a little.
To recap, we have a 24bit number and we'd like to find a smaller number that is
congruent to it modulo 5. In other words, if we divide the 24 bit number by 5
and the smaller number by 5 we get the same remainder. Perhaps a little table
can illustrate the pattern:
N N % 5 (modulo operator)

0 0
1 1
2 2
3 3
4 4
5 0
6 1
7 2
8 3
9 4
10 0
11 1
.
.
.
The right column is the remainder after the left column has been divided by
5. In modulo parlance, we'd say 11 is congruent to 1 modulo 5.
Bob's observation is that a 24 bit number may represented (in base 256) like:
N = H*256^2 + M*256^1 + L*256^0
= H*65536 + M*256 + L
= H*65535 + M*255 + L + H + M
And as he pointed out, if we want to determine a smaller number congruent to
this modulo 5, then we only need to sum L,M, and H.
Why?
Well take the middle byte:
(M*255 )%5 = (M%5) * (255%5)
= (M%5) * 0
= 0
255 is congruent to 0 mod 5. The same is true for 65535 and the high byte
product.
So the first simplification (again as Bob notes):
N%5 == (H+L+M)%5
But we can continue! The H+L+M sum is less than or equal to 255*3, which is only
a 10 bit number. Split this into a 2byte number like so:
N%5 == (H+L+M)%5
== (H2:M2)%5
== (256*H2 + M2) %5
== (H2 + M2) %5
This might produce a 9bit number, but there's an assembly trick to get it back
to 8. So, assume for now that H2+M2 < 256. Now, let's look at nibbles:
N2 = H2+M2
= a*16 + b
= a*15 + a + b
N2%5 == (a+b)%5
This is at most a 5bit number. But again, there's an assembly trick to make it a
nibble. Here's the whole thing in assembly.
; Compute N % 5, where N is a 24bit number H:M:L
clrf temp ; Add the three bytes together
movf L,w
addwf M,w
rlf temp,f
addwf H,w
skpnc
incf temp,f
;; temp = H2, W = L2
addwf temp,f ;temp = L2+H2, carry has 9'th bit
skpnc
incf temp,f ;temp is less than 5, so we could return...
; Now for the nibbles
swapf temp,w
addwf temp,f
skpndc
incf temp,f
At this point, the lower nibble contains a number that is congruent modulo 5 to
the 24 bit number. If we want to convert this to a number between 0 and 5:
movf temp,w ;(or we could cause the previous instructions
; to leave the result in W)
addlw 10 ;If the nibble >=10, then subtract 10
skpdc
addlw 10
; now the nibble is between 0 and 9
addlw 5 ;if we're between 5 and 9, subtract 5
skpdc
addlw 5
That's 21 instructions to get the modulo 5 of a 24 bit number (in the lower 3
bits of W).
Now it's not too hard to get the 10's digit if we have the 5's. Repeating the
modulo table with the 10's column:
N N % 5 N % 10

0 0 0
1 1 1
2 2 2
3 3 3
4 4 4
5 0 5
6 1 6
7 2 7
8 3 8
9 4 9
10 0 0
11 1 1
.
.
.
The trick to note now is that is that if the least significant bits of N and N%5
are different then we can add 5 to N%5 and get N%10 !
So continuing from above:
andlw b00000111 ;Get rid of the junk
movwf temp ;Compare N%5
xorwf L,w ; to the low byte
andlw 1 ;  we're only interested in the LSB
skpz ;If it's set
movlw 5 ; we add 5 otherwise we add 0
addwf temp,w ; or f
28 instructions total to get N%10. I reckon there's a trick or two lurking in
there.
Scott

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\04\07@153816
by
Bob Ammerman
Bravo, bravo!
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)
{Original Message removed}
2001\04\08@051310
by
Nikolai Golovchenko

Thanks Bob an Scott! Great ideas.
Scott, your version can be improved a little, by 2 words:
{Quote hidden}> clrf temp ; Add the three bytes together
> movf L,w
> addwf M,w
> rlf temp,f
> addwf H,w
> skpnc
> incf temp,f
> ;; temp = H2, W = L2
> addwf temp,f ;temp = L2+H2, carry has 9'th bit
> skpnc
> incf temp,f ;temp is less than 5, so we could return...
The above does the same as:
movf L, w
addwf M, w
skpnc
addlw 1
addwf H, w
skpnc
addlw 1
movwf temp, w
Here is a further extension. It is possible to get directly the modulo
10 value, without going through the modulo 5 phase. Unfortunately, not
much difference in code size  27 words.
For what it's worth:
;Nibble weights and modulo 10 values:
;1 % 10 = 1  L (low byte)
;16 % 10 = 6 
;256 % 10 = 6  M (middle byte)
;4096 % 10 = 6 
;65536 % 10 = 6  H (high byte)
;1048756 % 10 = 6 
movf H, w ;add middle and high bytes (256%10=6, and 65536%10=6)
addwf M, w
skpnc ;if carry ((256*6)%10=6),
addlw 1 ;increment w  this is equivalent to adding 6,
;because w is to be multiplied by 6
movwf temp ;add nibbles ((1*6)%10=6, (16*6)%10=6)
swapf temp, w
addwf temp, f
skpndc ;if digit carry, increment
incf temp, f
swapf L, w ;add higher nibble from low byte (16%10=6)
addwf temp, w
skpndc
addlw 1
movwf temp ;store in temp.
;Now temp should be multiplied by 6. The lower 4 bits
;will have the following weights after multiplication:
;1*6 = 6
;2*6 = 12
;4*6 = 24
;8*6 = 48
;That can be simplified if we apply the modulo 10 operation:
;6%10 = 6 = 1 + 5
;12%10 = 2
;24%10 = 4
;48%10 = 8
;If we add 5 when lower bit is set, we get a corrected value,
;which can be used then directly, without multiplication!
btfsc temp, 0 ;correct sum
addlw 5
skpndc ;if we get here skipping addition, the DC flag is cleared previously
addlw 6 ;if nibble overflows, add 6 (16%10 = 6)
addwf L, w ;add lower nibble of low byte (weight = 1)
skpndc ;fix overflows
addlw 6
skpndc ;one more time (e.g. if sum was 31, it overflows again
addlw 6 ;after 15+6=21=16+5, and should be corrected again 5+6=11)
addlw 10 ;find modulo 10 of a 4 bit number
skpdc
addlw 10
andlw 0x0F ;clear higher bits (if necessary)
Best regards,
Nikolai

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\04\08@072613
by
o88591?Q?K=FCbek_Tony?=
Hi,
Bob Ammeroman wrote: ( correct this time :) )
>Bravo, bravo!
as an reply to Scott Dattalo's posting:
> I'd like to expand on Bob's idea a little.
>
> To recap, we have a 24bit number and we'd like to find a smaller number
that is
> congruent to it modulo 5. In other words, if we divide the 24 bit number
by 5
> and the smaller number by 5 we get the same remainder. Perhaps a little
table
> can illustrate the pattern:
<big snip>
I'm in awe,
I was looking for a 'clever' way to round variables
particulary 24 bit ones and You outshined everything I
could envision.
Thanks,
/Tony
Tony Kübek, Flintab AB
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
Email: .....tony.kubekRemoveMEflintab.com
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\04\08@083017
by
Drew Vassallo
Needless to say, but I hope you guys post all this stuff to the PICLIST
software archives... it's absolutely amazing.
While I don't have a project that needs this rounding code at the moment,
I'm sure I will in the future. Please try to post it to the archives.
Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\04\08@112811
by
James Newton
Darn it! YOU post it to the archives. There is a form on the bottom of every
page that allows one to post code, make a new page, etc... and the archive
allows one to very easily add a link to any post or thread by simply pasting
in the URL of the page at the site where the link should be added.
I worked hard to make it possible for others to post to the site directly so
that I would not have to work hard keeping it up to date. It is supposed to
be a group effort. You own the site as much as I do... Its your own
contributions that make it great.
I'm trying to concentrate on other projects like a parametric search engine
to help find the best PIC for the job and shopping cart services and
auctions (free) for people to use to buy and sell chips, programmers, etc...
Having said all that, I've already linked this topic from the basic math
page at
http://www.piclist.com/techref/microchip/math/basic.htm
James Newton, PICList Admin #3
jamesnewton@spam@piclist.com
16196520593 phone
http://www.piclist.com
{Original Message removed}
2001\04\08@151544
by
Drew Vassallo
>Darn it! YOU post it to the archives. There is a form on the bottom of
>every
Hehe James. I didn't mean that you should do it, specifically. I realize
you've done quite a ton of work to make it easy for people to add stuff to
pages. However, what I meant, simply, was that there seemed to be a good
deal of theory involved with Bob's and Scott's simplification of the problem
and that they should set up a nice paragraph or two on the list to describe
how this stuff works, along with the code.
Far be it from me to impose upon someone else's code and list it on the
PICLIST site.
Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\04\08@163935
by
Bob Ammerman
>
> Far be it from me to impose upon someone else's code and list it on the
> PICLIST site.
>
> Andrew
>
I hereby and for all time give permission to anyone subscribed to the
PICLIST to post any code which I provide in a posting on PICLIST to
piclist.com or any other location on the www. I only ask that the code be
attributed to me.
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\04\08@165017
by
James Newton
Sorry, I was reading that just as my 3 year old was making me crazy...
<GRIN>
But I really do need help managing the site...
...it has grown to a point where it is too much for one person.
The WYSIWYG edit and page update forms make it very easy. Please do be
involved.
James Newton, PICList Admin #3
EraseMEjamesnewtonRemoveMESTOPspampiclist.com
16196520593 phone
http://www.piclist.com
{Original Message removed}
2001\04\09@170513
by
uter van ooijen & floortje hanneman
> I hereby and for all time give permission to anyone subscribed to the
> PICLIST to post any code which I provide in a posting on PICLIST to
> piclist.com or any other location on the www. I only ask that the code be
> attributed to me.
He, me too!
Can we make that the small print you have to agree to before joining the
list?
Wouter

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: fine print Was: Rounding to closest 1's mult'
2001\04\09@174113
by
jamesnewton
Actually, the welcome message has a very tiny message embedded in one of the
periods that reads something like "I hereby and for all time agree to help
James with the editing and upkeep of the piclist.com site via the posting
forms on each page and the "take ownership" and edit links he has so
diligently provided"
Betcha didn't real the entire thing did you?

James Newton (PICList Admin #3)
RemoveMEjamesnewtonKILLspamTakeThisOuTpiclist.com 16196520593
PIC/PICList FAQ: http://www.piclist.com or .org
{Original Message removed}
'[PIC]: Rounding to closest 1's multiple, code encl'
2001\04\10@025142
by
Vasile Surducan
On Mon, 9 Apr 2001, wouter van ooijen & floortje hanneman wrote:
> > I hereby and for all time give permission to anyone subscribed to the
> > PICLIST to post any code which I provide in a posting on PICLIST to
> > piclist.com or any other location on the www. I only ask that the code be
> > attributed to me.
>
> He, me too!
> Can we make that the small print you have to agree to before joining the
> list?
>
> Wouter
>
Would be applicable for jal 6k too ?
Vasile

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistserv@spam@mitvma.mit.edu with SET PICList DIGEST in the body
2001\04\10@114307
by
uter van ooijen & floortje hanneman
> > > I hereby and for all time give permission to anyone subscribed to the
> > > PICLIST to post any code which I provide in a posting on PICLIST to
> > > piclist.com or any other location on the www. I only ask that the code
be
> > > attributed to me.
> >
> > He, me too!
> > Can we make that the small print you have to agree to before joining the
> > list?
> >
> Would be applicable for jal 6k too ?
>
Sorry Vasile, only for what I already make public somwehere else. And of
course it is difficult to make public what does not exists yet (BTW it will
be 8k, when you keep yourself in check and stay below 6k it will be WLoader
compatible).
Wouter

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body
'[OT]: Brain Burp Rounding??'
2001\05\30@115223
by
Roman Black
I was tabulating some data tonight, ie, doing
a division on my pocket calculator and then rounding
the number to three decimal places, then writing
the figure down on paper.
How do people round numbers to the nearest decimal
place on their pocket calculators?
My whole life I have checked if the last digit is
5, then if so check the next digit is 5, etc,
then once you get to a non5 round it up or down.
Hope that makes sense.
So:
3.12471 = 3.125
3.12441 = 3.124
3.1245551 = 3.124
3.1245556 = 3.125
This just can't be right!
How were you taught? I started using pocket
calculators when they had led digits, probably
before I was 10 years old. I'm sure in school we
were taught to round digits like that. ??
Roman

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspammitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@115901
by
Alan B. Pearce
>How do people round numbers to the nearest decimal
>place on their pocket calculators?
Easy, just set my TI83 to 3 dec places. It keeps higher precision
internally if I need to change it. Yeah, I know, not quite what you wanted
to hear :)

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservspam_OUTspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@120447
by
Nick Taylor

Roman Black wrote:
>
> I was tabulating some data tonight, ie, doing
> a division on my pocket calculator and then rounding
> the number to three decimal places, then writing
> the figure down on paper.
>
> How do people round numbers to the nearest decimal
> place on their pocket calculators?
On my calulator I round to three places by setting the display to only
show three places .... less brain strain.
{Quote hidden}>
> My whole life I have checked if the last digit is
> 5, then if so check the next digit is 5, etc,
> then once you get to a non5 round it up or down.
> Hope that makes sense.
>
> So:
> 3.12471 = 3.125
> 3.12441 = 3.124
> 3.1245551 = 3.124
> 3.1245556 = 3.125
You're right, it's not right. Just drop the digits past the third
decimal, then only consider the third decimal in your rounding.
>
> This just can't be right!
> How were you taught? I started using pocket
> calculators when they had led digits, probably
> before I was 10 years old. I'm sure in school we
> were taught to round digits like that. ??
> Roman

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@121940
by
David W. Gulley

Roman Black wrote:
{Quote hidden}>
> I was tabulating some data tonight, ie, doing
> a division on my pocket calculator and then rounding
> the number to three decimal places, then writing
> the figure down on paper.
>
> How do people round numbers to the nearest decimal
> place on their pocket calculators?
>
> My whole life I have checked if the last digit is
> 5, then if so check the next digit is 5, etc,
> then once you get to a non5 round it up or down.
> Hope that makes sense.
>
> So:
> 3.12471 = 3.125
> 3.12441 = 3.124
> 3.1245551 = 3.124
> 3.1245556 = 3.125
>
> This just can't be right!
> How were you taught? I started using pocket
> calculators when they had led digits, probably
> before I was 10 years old. I'm sure in school we
> were taught to round digits like that. ??
> Roman
I have used the following:
3.12350 = 3.124 (if exactly .xxx50000, round up if previous digit odd)
3.12450 = 3.124 (if exactly .xxx50000, round down if previous digit
even)
The idea here is that if you are tallying a series of values, the
"random" nature of rounding some up, some down will "tend" to average
out the errors. (This is a very debatable subject!)
3.12451 = 3.125 (greater than .xxx50 so round up)
3.12449 = 3.124 (less than .xxx50 so round down)
following the previous two examples:
3.1245000000001 = 3.125 (greater than .xxx50 so round up)
3.1244999999999 = 3.124 (less than .xxx50 so round down)
for the examples you used:
3.1245551 = 3.125 (greater than .xxx50 so round up)
3.1245556 = 3.125 (greater than .xxx50 so round up)
David W. Gulley
Destiny Designs

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservKILLspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@122943
by
eter William Green

roman,
i was taught to round up if it's >= 1/2. little different than you system  little easier
> 3.12471 = 3.125
> 3.12441 = 3.124
> 3.1245551 = 3.124
> 3.1245556 = 3.125
3.1247 = 3.125 7 >= 5 round up
3.1244 = 3.124 4 < 5 truncate
3.1245 = 3.125 5 >= 5 round up
3.1245 = 3.125 5 >= 5 round up
ie: i only check the 4th digit. if it's >= 5 round up. if not truncate.
pete
On Thu, 31 May 2001, Roman Black wrote:
{Quote hidden}> I was tabulating some data tonight, ie, doing
> a division on my pocket calculator and then rounding
> the number to three decimal places, then writing
> the figure down on paper.
>
> How do people round numbers to the nearest decimal
> place on their pocket calculators?
>
> My whole life I have checked if the last digit is
> 5, then if so check the next digit is 5, etc,
> then once you get to a non5 round it up or down.
> Hope that makes sense.
>
> So:
> 3.12471 = 3.125
> 3.12441 = 3.124
> 3.1245551 = 3.124
> 3.1245556 = 3.125
>
> This just can't be right!
> How were you taught? I started using pocket
> calculators when they had led digits, probably
> before I was 10 years old. I'm sure in school we
> were taught to round digits like that. ??
> Roman
>

Peter Green
111 IATL peterwgreenspamBeGone.....uiowa.edu
The Department of Mechanical Engineering office: 319.335.3694
The University of Iowa lab: 319.335.3585
Iowa City, Iowa 52242 fax: 319.335.5669

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistserv.....mitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@124335
by
Cris Wilson

At 01:48 AM 5/31/01 +1000, you wrote:
{Quote hidden}>I was tabulating some data tonight, ie, doing
>a division on my pocket calculator and then rounding
>the number to three decimal places, then writing
>the figure down on paper.
>
>How do people round numbers to the nearest decimal
>place on their pocket calculators?
>
>My whole life I have checked if the last digit is
>5, then if so check the next digit is 5, etc,
>then once you get to a non5 round it up or down.
>Hope that makes sense.
>
>So:
>3.12471 = 3.125
>3.12441 = 3.124
>3.1245551 = 3.124
>3.1245556 = 3.125
>
>This just can't be right!
>How were you taught?
I first look and see how many digits my answer needs to have. I then carry
one extra digit
than needed and just drop the other digits. Unless I have a function
involved (like sin, cos,
e, LN, pi, etc), I carry all digits for the number associated with the
function. When all of
the calculations are done I use that last extra digit to decide whether or
not to round up
the final answer. If the last digit is 5 or greater I round up the next digit.
Of course there are tons of books on precision, accuracy, and error
calculations if you
really want something set down in writing as a reference. ASTM I know has a
section
on proper significant figure use. Measurement theory textbooks usually
contain a chapter
on proper rounding as well.
_____________________________________________________________
Cris Wilson
Information Resource Consultant
College of Architecture, Arts, and Humanities
Clemson University
8646567651 spam_OUTcrisKILLspamclemson.edu
To report problems email: RemoveMEaah_computersRemoveMEEraseMEclemson.edu

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@125600
by
Kevin Blain
Roman said.....
> How do people round numbers to the nearest decimal
> place on their pocket calculators?
and....
>
> So:
> 3.12471 = 3.125
> 3.12441 = 3.124
> 3.1245551 = 3.124
> 3.1245556 = 3.125
>
> This just can't be right!
It's not.
3.1245551 goes to 3.124 because it's greater than halfway (3.1425)
It's the old, add 5, 0.5, 0.05, etc, in your case, add 0.0005, and then
truncate it to n d.p.(in your case 3)
rule: add 5 x 10 exp (decimal_places) then truncate to (decimal_places)
places.
That's almost how I was taught, but it's how I do it.
Regards, Kevin

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspammitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@130538
by
Barry Gershenfeld

We were taught: "Round off to make even". It sounded outrageous
then and I'll admit to not doing it that way much. But I think
the reasoning is sound. Other posters have already said so.
Paraphrasing the example:
3.12471 = ?
3.12441 = ?
3.1245551 = ?
3.1245556 = ?
Nick Taylor said:
>You're right, it's not right. Just drop the digits past the third
>decimal, then only consider the third decimal in your rounding.
Thus, in each example you consider just 3.124 =:o
The premise is that since you are rounding to 3 digits, that the
4th digit is not reliable anyway (even though it looks like it
should be!) Then, as David Gulley said:
>The idea here is that if you are tallying a series of values,
> the "random" nature of rounding some up, some down will
> "tend" to average out the errors.
And so they divide all possible digits into two groups:
0,2,4,6,8 and 1,3,5,7,9 . So if digits occur randomly
then 50% of the time you round up and 50% of the time
you don't.
And in the example the answer is 3.124 no matter what
follows.
3.124x = 3.124
3.124xxxx = 3.124 (even if the x's are 9's =:o)
3.125x > 3.126
3.126x > 3.126
3.127x > 3.128
3.128x > 3.128 et c.
Well, I went to school in New Jersey :) You wanted to know
what we were taught. Take it or leave it. :)
Barry

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamBeGoneRemoveMEmitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@131341
by
Bob Ammerman
I use "banker's rounding". This is also called "round to even" rounding.
When the digit being eliminated is a 5 you go up or down as needed to get to
an even number. Unlike conventional rounding (where you round up on 5 or
higher) banker's rounding does not have a slight positive bias in it.
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)
{Original Message removed}
2001\05\30@131542
by
Nick Taylor

ooops! I just read my post, and I didn't type what I meant to type. I
should have said: Just drop the digits past the fourth decimal, then
only consider the fourth decimal in your rounding.
N.
Nick Taylor wrote:
{Quote hidden}>
> Roman Black wrote:
> >
> > I was tabulating some data tonight, ie, doing
> > a division on my pocket calculator and then rounding
> > the number to three decimal places, then writing
> > the figure down on paper.
> >
> > How do people round numbers to the nearest decimal
> > place on their pocket calculators?
> On my calulator I round to three places by setting the display to only
> show three places .... less brain strain.
> >
> > My whole life I have checked if the last digit is
> > 5, then if so check the next digit is 5, etc,
> > then once you get to a non5 round it up or down.
> > Hope that makes sense.
> >
> > So:
> > 3.12471 = 3.125
> > 3.12441 = 3.124
> > 3.1245551 = 3.124
> > 3.1245556 = 3.125
> You're right, it's not right. Just drop the digits past the third
> decimal, then only consider the third decimal in your rounding.
> >
> > This just can't be right!
> > How were you taught? I started using pocket
> > calculators when they had led digits, probably
> > before I was 10 years old. I'm sure in school we
> > were taught to round digits like that. ??
> > Roman
>
> 
>
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
> email
KILLspamlistservspamBeGonemitvma.mit.edu with SET PICList DIGEST in the body

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservSTOPspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@133808
by
Barry Gershenfeld
>ooops! I just read my post, and I didn't type what I meant to type. I
>should have said: Just drop the digits past the fourth decimal, then
>only consider the fourth decimal in your rounding.
> N.
Yeah and it was just enough to convince me that my flawed
explanation was ok! I thought something looked strange. So
I guess we did use that one digit past where you round to,
and then, as Bob just said, do the "make even" thing if
that digit is a 5.
Enough of this, I don't even use it...
Barry

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamBeGonespamBeGonemitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@160440
by
Harold M Hallikainen

If the digit beyond what you are rounding is higher than 5, round up,
lower than 5, round down. If equal to 5, round to the even digit. For
example,
3.4 rounds to 3
3.5 rounds to 4
3.6 rounds to 4
4.4 rounds to 4
4.5 rounds to 4
4.6 rounds to 5
Using this "even digit" method (though an odd will also work), errors do
not accumulate as multiple random rounded numbers are added.
Harold
On Thu, 31 May 2001 01:48:00 +1000 Roman Black <spamBeGonefastvidEZY.NET.AU>
writes:
{Quote hidden}> I was tabulating some data tonight, ie, doing
> a division on my pocket calculator and then rounding
> the number to three decimal places, then writing
> the figure down on paper.
>
> How do people round numbers to the nearest decimal
> place on their pocket calculators?
>
> My whole life I have checked if the last digit is
> 5, then if so check the next digit is 5, etc,
> then once you get to a non5 round it up or down.
> Hope that makes sense.
>
> So:
> 3.12471 = 3.125
> 3.12441 = 3.124
> 3.1245551 = 3.124
> 3.1245556 = 3.125
>
> This just can't be right!
> How were you taught? I started using pocket
> calculators when they had led digits, probably
> before I was 10 years old. I'm sure in school we
> were taught to round digits like that. ??
> Roman
>
> 
>
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
> email
spam_OUTlistservSTOPspammitvma.mit.edu with SET PICList DIGEST in the body
>
>
FCC Rules Online at http://hallikainen.com/FccRules
Lighting control for theatre and television at http://www.dovesystems.com
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspammitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@203042
by
Alexandre Domingos F. Souza
>How do people round numbers to the nearest decimal
>place on their pocket calculators?
HP people have the Round(F) function.
>How were you taught? I started using pocket
>calculators when they had led digits, probably
>before I was 10 years old. I'm sure in school we
>were taught to round digits like that. ??
Mee too.

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservspamRemoveMEmitvma.mit.edu with SET PICList DIGEST in the body
2001\05\30@203244
by
michael brown
> roman,
>
> i was taught to round up if it's >= 1/2. little different than you
system  little easier
{Quote hidden}>
> > 3.12471 = 3.125
> > 3.12441 = 3.124
> > 3.1245551 = 3.124
> > 3.1245556 = 3.125
>
> 3.1247 = 3.125 7 >= 5 round up
> 3.1244 = 3.124 4 < 5 truncate
> 3.1245 = 3.125 5 >= 5 round up
> 3.1245 = 3.125 5 >= 5 round up
>
> ie: i only check the 4th digit. if it's >= 5 round up. if not truncate.
>
> pete
Finally some one got it right! ;D Way to go Pete. If you want to round
to N decimal places then look at position N+1. If position (N+1) >4 then
increment position(N). That's all there is to it. You don't have to look
at anything else. Hope this helps. TTYL

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body
2001\05\31@014757
by
Dale Botkin
On Wed, 30 May 2001, Peter William Green wrote:
> roman,
>
> i was taught to round up if it's >= 1/2. little different than you system  little easier
>
> > 3.12471 = 3.125
> > 3.12441 = 3.124
> > 3.1245551 = 3.124
> > 3.1245556 = 3.125
>
> 3.1247 = 3.125 7 >= 5 round up
> 3.1244 = 3.124 4 < 5 truncate
> 3.1245 = 3.125 5 >= 5 round up
> 3.1245 = 3.125 5 >= 5 round up
>
> ie: i only check the 4th digit. if it's >= 5 round up. if not truncate.
>
> pete
Yup, we were taught that as "artillery roundoff" in the Army. Carry it
out as many digits as you want...
3.124555551 = 3.125
3.124555556 = 3.125
Dale

A train stops at a train station. A bus stops at a bus station.
On my desk I have a workstation...

http://www.piclist.com hint: To leave the PICList
piclistunsubscriberequestRemoveMEmitvma.mit.edu
2001\05\31@053859
by
Roman Black

Hi Michael, yep, darn right, half the people in
the world (including me!) have been rounding wrongly
their entire lives. Very scary. There is and can only
be one correct way of rounding decimal numbers...
Here is an example, assuming rounding to 3 decimal
places, that is 1000 combinations, from 000 to 999.
000 to 499 (first half), 500 to 999 (second half).
There are the first 500 combinations in the first
half, and the second 500 combination in the second
half.
All my life I have been rounding at 555, under the
false impression that 5 is "half way" in decimal
terms... Wow.
I asked my 26 yr old sciencedegreed girlfriend how
to round and she looked at me like I was stupid.
"5 or more, round up". She was taught correctly.
Now I'm wondering if it is mainly us oldtimers
from the dawn of pocket calculators age that were
taught wrong?? Any thoughts, older people??
:o)
Roman
michael brown wrote:
{Quote hidden}>
> > roman,
> >
> > i was taught to round up if it's >= 1/2. little different than you
> system  little easier
> >
> > > 3.12471 = 3.125
> > > 3.12441 = 3.124
> > > 3.1245551 = 3.124
> > > 3.1245556 = 3.125
> >
> > 3.1247 = 3.125 7 >= 5 round up
> > 3.1244 = 3.124 4 < 5 truncate
> > 3.1245 = 3.125 5 >= 5 round up
> > 3.1245 = 3.125 5 >= 5 round up
> >
> > ie: i only check the 4th digit. if it's >= 5 round up. if not truncate.
> >
> > pete
>
> Finally some one got it right! ;D Way to go Pete. If you want to round
> to N decimal places then look at position N+1. If position (N+1) >4 then
> increment position(N). That's all there is to it. You don't have to look
> at anything else. Hope this helps. TTYL

http://www.piclist.com hint: To leave the PICList
EraseMEpiclistunsubscriberequestSTOPspamRemoveMEmitvma.mit.edu
2001\05\31@083724
by
michael brown

I'm pretty old myself (39), but I have seen calculators that have something
called 5/4 rounding. Being uneducated (no degree) I'm not sure what that is
about. Remember the good ole RPN calculators? If you could understand how
to use one of those, you were well on your way to being a FORTH programmer.
Michael Brown
Instant Net Solutions
http://www.KillerPCs.net
{Quote hidden}> Hi Michael, yep, darn right, half the people in
> the world (including me!) have been rounding wrongly
> their entire lives. Very scary. There is and can only
> be one correct way of rounding decimal numbers...
>
> Here is an example, assuming rounding to 3 decimal
> places, that is 1000 combinations, from 000 to 999.
>
> 000 to 499 (first half), 500 to 999 (second half).
> There are the first 500 combinations in the first
> half, and the second 500 combination in the second
> half.
>
> All my life I have been rounding at 555, under the
> false impression that 5 is "half way" in decimal
> terms... Wow.
>
> I asked my 26 yr old sciencedegreed girlfriend how
> to round and she looked at me like I was stupid.
> "5 or more, round up". She was taught correctly.
>
> Now I'm wondering if it is mainly us oldtimers
> from the dawn of pocket calculators age that were
> taught wrong?? Any thoughts, older people??
> :o)
> Roman
>
>
> michael brown wrote:
> >
> > > roman,
> > >
> > > i was taught to round up if it's >= 1/2. little different than you
> > system  little easier
> > >
> > > > 3.12471 = 3.125
> > > > 3.12441 = 3.124
> > > > 3.1245551 = 3.124
> > > > 3.1245556 = 3.125
> > >
> > > 3.1247 = 3.125 7 >= 5 round up
> > > 3.1244 = 3.124 4 < 5 truncate
> > > 3.1245 = 3.125 5 >= 5 round up
> > > 3.1245 = 3.125 5 >= 5 round up
> > >
> > > ie: i only check the 4th digit. if it's >= 5 round up. if not
truncate.
> > >
> > > pete
> >
> > Finally some one got it right! ;D Way to go Pete. If you want to
round
> > to N decimal places then look at position N+1. If position (N+1) >4
then
> > increment position(N). That's all there is to it. You don't have to
look
> > at anything else. Hope this helps. TTYL
>
> 
> http://www.piclist.com hint: To leave the PICList
> spam_OUTpiclistunsubscriberequestRemoveMEEraseMEmitvma.mit.edu
>
>

http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclistunsubscriberequestRemoveME@spam@mitvma.mit.edu
2001\05\31@102928
by
David W. Gulley

Roman Black wrote:
{Quote hidden}>
> Hi Michael, yep, darn right, half the people in
> the world (including me!) have been rounding wrongly
> their entire lives. Very scary. There is and can only
> be one correct way of rounding decimal numbers...
>
> Here is an example, assuming rounding to 3 decimal
> places, that is 1000 combinations, from 000 to 999.
>
> 000 to 499 (first half), 500 to 999 (second half).
> There are the first 500 combinations in the first
> half, and the second 500 combination in the second
> half.
>
> All my life I have been rounding at 555, under the
> false impression that 5 is "half way" in decimal
> terms... Wow.
>
> I asked my 26 yr old sciencedegreed girlfriend how
> to round and she looked at me like I was stupid.
> "5 or more, round up". She was taught correctly.
>
> Now I'm wondering if it is mainly us oldtimers
> from the dawn of pocket calculators age that were
> taught wrong?? Any thoughts, older people??
> :o)
> Roman
Cept for one minor detail,
There are 999 values BETWEEN 0 and 1000.
500 IS the halfway point.
500 values below it (0  499) and
500 values above it (501  1000).
Therefore, if accumulating a large series of "random" numbers and
rounding using the 5 or greater rule, the result will "tend" to be too
large since statistically you are using 500 possibilities below the
number and 499 above the number.
For most things this error would probably not be a problem, but the
"round to even if 5" rule will "tend" to average out the error
accumulation at the expense of complicating the rule slightly.
The validity of the least significant digits does play an important role
in the process, so when absolute accuracy is required use a tolerance
(+/) to exactly specify the values, and the error accumulation.
For example (round to nearest 1/100):
Value Tolerance Round >=5 Round to Even if 5
1.125 +/ 0.005 1.13 1.12
1.135 +/ 0.005 1.14 1.14
Repeat above 1000 times and Total
2260 2270 2260
when the tolerances say:
2260 +/ 10 or somewhere in the range of 2250 to 2270 so yes the
"Round >=5" is a 'correct' answer (since it is in the possible range
defined by the tolerances, even if it is at the upper limit), but the
2260 provided by the "Round to even if 5" is a 'better' answer (in some
cases).
Obviously this is a contrived scenerio, but if a particular sensor
reported to 0.5 units of precision with +/ 0.5 units of accuracy, and
you wanted to accumulate readings over a long interval, the "Round >=5"
will provide an answer that is "typically" too large.
If you were buying gasoline, and the pumps all rounded using the "Round
>=5" rule, would you mind that you were charged for 2270 gallons instead of 2260? :)
As I stated in an earlier message in this thread,
This is a very debatable subject!
David W. Gulley
Destiny Designs

http://www.piclist.com hint: To leave the PICList
EraseMEpiclistunsubscriberequestRemoveMEmitvma.mit.edu
2001\05\31@103822
by
Harold M Hallikainen

Good o' RPN calculators! I still have my HP35 from 1972 and use an
HP15C (I think that's the number) daily. I still agree with the old T
shirts that [ENTER] > = .
I teach electronics at night at the local community college. My students
all have very fancy calculators that use algebraic notation. And they
consistently get the wrong answer. They're always leaving out parenthesis
and having the calculator solve a problem other than the one they want.
RPN solves this by having you work the problem the way you would by hand:
from the inside out. Also, you see all intermediate results so you can
catch errors if you have a feel for the numbers.
On rounding, here's an example:
1.5+2.5 = 4.0 without rounding
With rounding using "round to even"
2 + 2 = 4
With "rounding up"
2 + 3 = 5
Round to even tends to minimize error.
Harold
On Thu, 31 May 2001 07:31:01 0500 michael brown <spamn5qmg.....spamAMSAT.ORG>
writes:
{Quote hidden}> I'm pretty old myself (39), but I have seen calculators that have
> something
> called 5/4 rounding. Being uneducated (no degree) I'm not sure what
> that is
> about. Remember the good ole RPN calculators? If you could
> understand how
> to use one of those, you were well on your way to being a FORTH
> programmer.
>
> Michael Brown
> Instant Net Solutions
>
http://www.KillerPCs.net
>
>
>
>
> > Hi Michael, yep, darn right, half the people in
> > the world (including me!) have been rounding wrongly
> > their entire lives. Very scary. There is and can only
> > be one correct way of rounding decimal numbers...
> >
> > Here is an example, assuming rounding to 3 decimal
> > places, that is 1000 combinations, from 000 to 999.
> >
> > 000 to 499 (first half), 500 to 999 (second half).
> > There are the first 500 combinations in the first
> > half, and the second 500 combination in the second
> > half.
> >
> > All my life I have been rounding at 555, under the
> > false impression that 5 is "half way" in decimal
> > terms... Wow.
> >
> > I asked my 26 yr old sciencedegreed girlfriend how
> > to round and she looked at me like I was stupid.
> > "5 or more, round up". She was taught correctly.
> >
> > Now I'm wondering if it is mainly us oldtimers
> > from the dawn of pocket calculators age that were
> > taught wrong?? Any thoughts, older people??
> > :o)
> > Roman
> >
> >
> > michael brown wrote:
> > >
> > > > roman,
> > > >
> > > > i was taught to round up if it's >= 1/2. little different
> than you
> > > system  little easier
> > > >
> > > > > 3.12471 = 3.125
> > > > > 3.12441 = 3.124
> > > > > 3.1245551 = 3.124
> > > > > 3.1245556 = 3.125
> > > >
> > > > 3.1247 = 3.125 7 >= 5 round up
> > > > 3.1244 = 3.124 4 < 5 truncate
> > > > 3.1245 = 3.125 5 >= 5 round up
> > > > 3.1245 = 3.125 5 >= 5 round up
> > > >
> > > > ie: i only check the 4th digit. if it's >= 5 round up. if not
> truncate.
> > > >
> > > > pete
> > >
> > > Finally some one got it right! ;D Way to go Pete. If you
> want to
> round
> > > to N decimal places then look at position N+1. If position
> (N+1) >4
> then
> > > increment position(N). That's all there is to it. You don't
> have to
> look
> > > at anything else. Hope this helps. TTYL
> >
> > 
> >
http://www.piclist.com hint: To leave the PICList
> >
piclistunsubscriberequestspam_OUT@spam@mitvma.mit.edu
>
> >
> >
>
> 
> http://www.piclist.com hint: To leave the PICList
>
.....piclistunsubscriberequestspam.....mitvma.mit.edu
>
>
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

http://www.piclist.com hint: To leave the PICList
piclistunsubscriberequestKILLspamEraseMEmitvma.mit.edu
2001\05\31@110645
by
Kevin Blain
NO! becasue 1000 is the same as 0. Er  that needs explaining! i.e. there
are 500 numbers 0499 inclusive and 500 numbers 500999 inclusive. So the
1000 is the 0 in the next set.
Regards, Kevin
{Original Message removed}
2001\05\31@111700
by
Patrik Husfloen
I only used an RPN calc for a few days but I got hooked imediatly,
those things are great, think I used an HP 32 II or something like that.
I normally use an TI83 though. I like the RPN calc much better.
{Original Message removed}
2001\05\31@113549
by
David W. Gulley

To say "NO!" is a bit emphatic, since I could just as well say that we
will only truncate numbers, which would provide an answer which may be
fine for some conditions.
I understand your logic; but this is still including 500 numbers below
the "rounded to" value and 499 above, therefore (and I repeat)
statistically, you are favoring the round up when given a random set of
values.
Again looking at the results of the scenario I presented below,
The actual answer is 2260 +/ 10
The "Round >=5" result is 2270 (+0/20)
The "Round Even if 5" result is 2260 (+/ 10)
And the "Truncate" result is 2250 (+20/0)
So which answer is right?
All of them (or none of them) depending on the requirements...
David W. Gulley
Destiny Designs
Kevin Brain wrote:
>
> NO! becasue 1000 is the same as 0. Er  that needs explaining! i.e. there
> are 500 numbers 0499 inclusive and 500 numbers 500999 inclusive. So the
> 1000 is the 0 in the next set.
>
> Regards, Kevin
>
> {Original Message removed}
2001\05\31@113952
by
Bill Westfield
Now I'm wondering if it is mainly us oldtimers
from the dawn of pocket calculators age that were
taught wrong?? Any thoughts, older people??
Hmm. I'm 41, learned to use a slide rule in high school, and learned "5 or
more; round up" (and also "add .5 and truncate", on ASR33.) Actually,
number lines were very popular in the "new math" cirricula, and it was/is
awfully clear that EXACTLY halfway is the only sticky point. I'd never
heard of the odd/even rounding mentioned here before, but that makes sense.
BillW

http://www.piclist.com hint: To leave the PICList
EraseMEpiclistunsubscriberequest@spam@@spam@mitvma.mit.edu
2001\05\31@114618
by
Bob Barr

Roman Black <@spam@fastvidspamKILLspamEZY.NET.AU> wrote:
<snip>
{Quote hidden}>
>All my life I have been rounding at 555, under the
>false impression that 5 is "half way" in decimal
>terms... Wow.
>
>I asked my 26 yr old sciencedegreed girlfriend how
>to round and she looked at me like I was stupid.
>"5 or more, round up". She was taught correctly.
>
>Now I'm wondering if it is mainly us oldtimers
>from the dawn of pocket calculators age that were
>taught wrong?? Any thoughts, older people??
>:o)
>Roman
>
>
Early Bronze Age recollections:
I was taught to go just one decimal beyond the digit to be rounded. Four or
less rounds down, 5 or more rounds up.
We were specifically taught that it doesn't matter what's beyond that first
digit. Whether the digit being rounded is odd or even was never mentioned as
being significant.
Bob
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

http://www.piclist.com hint: To leave the PICList
spamBeGonepiclistunsubscriberequestRemoveMEEraseMEmitvma.mit.edu
2001\05\31@122418
by
Kevin Blain
000499 round down
500599 round up
10001499 round down
15001999 round up
etc. etc.
where is the uneven bias? where is the 'favouring rounding up?'
if you consider 1000 to be part of the 500999 group (i.e. 04999 and
5001000) then you are including the same number twice.
the scale is 09 in decimal, not 010
here's a scale
0,1,2,3,4  5,6,7,8,9
the  has an equal number of numbers on each side. The  does not go through
the number 5, it IMMEDIATLY precedes it, so if the scale had decimals in
too....
0.0 through 4.9  5.0 through 9.9
again, exactly the same number of numbers. The bar is infinately thin, and
therefore once the data is quantised, there is no possibility of the data
landing on the bar.
Regards, Kevin
{Original Message removed}
2001\05\31@122429
by
Paul Hutchinson
2001\05\31@122840
by
Roman Black

David W. Gulley wrote:
{Quote hidden}>
> Roman Black wrote:
> >
> > Hi Michael, yep, darn right, half the people in
> > the world (including me!) have been rounding wrongly
> > their entire lives. Very scary. There is and can only
> > be one correct way of rounding decimal numbers...
> >
> > Here is an example, assuming rounding to 3 decimal
> > places, that is 1000 combinations, from 000 to 999.
> >
> > 000 to 499 (first half), 500 to 999 (second half).
> > There are the first 500 combinations in the first
> > half, and the second 500 combination in the second
> > half.
> >
> > All my life I have been rounding at 555, under the
> > false impression that 5 is "half way" in decimal
> > terms... Wow.
> >
> > I asked my 26 yr old sciencedegreed girlfriend how
> > to round and she looked at me like I was stupid.
> > "5 or more, round up". She was taught correctly.
> >
> > Now I'm wondering if it is mainly us oldtimers
> > from the dawn of pocket calculators age that were
> > taught wrong?? Any thoughts, older people??
> >:o)
> > Roman
>
> Cept for one minor detail,
>
> There are 999 values BETWEEN 0 and 1000.
> 500 IS the halfway point.
> 500 values below it (0  499) and
> 500 values above it (501  1000).
No, actually 4.99999999999 (repeating) is the
halfway point.
5.0 is definitely in the top half.
Decimal has ten digits, 04 are the bottom 5 and
59 are the top 5. Anything under 500 is the
bottom half, and anything from 5.0 up is the
top half. Nothing debatable about it, just like
0127 is the bottom half and 128255 are the
top half in binary. :o)
Roman

http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclistunsubscriberequestmitvma.mit.edu
2001\05\31@123502
by
Roman Black
David W. Gulley wrote:
>
> To say "NO!" is a bit emphatic, since I could just as well say that we
> will only truncate numbers, which would provide an answer which may be
> fine for some conditions.
>
> I understand your logic; but this is still including 500 numbers below
> the "rounded to" value and 499 above, therefore (and I repeat)
> statistically, you are favoring the round up when given a random set of
> values.
I don't understand your logic?? There are 500 values,
ie, 000 to 499, then there are 500 values in the top
half, ie, 500 to 999. The dividing point is *immediately*
before 500, ie, 499.999999999999999 (forever)
So if it starts with a 5 it absolutely must be in the
top half. There is no favoring, just accuracy.
Roman

http://www.piclist.com hint: To leave the PICList
spamBeGonepiclistunsubscriberequestKILLspamTakeThisOuTmitvma.mit.edu
2001\05\31@124342
by
Doug Joel
Does this really have anything to do with statistics?
I thought it was representing a more accurate number with
fewer digits.
Doug
{Original Message removed}
2001\05\31@133343
by
Paul Hutchinson

>No, actually 4.99999999999 (repeating) is the halfway point.
>5.0 is definitely in the top half.
4.99999999999 (repeating) = 5.00000000 (repeating)
Remember, repeating decimals are equal to an integer divided by 9.
1/9 = 0.1(repeating)
2/9 = 0.2(repeating)
3/9 = 0.3(repeating) = 1/3
4/9 = 0.4(repeating)
5/9 = 0.2(repeating)
6/9 = 0.6(repeating) = 2/3
7/9 = 0.7(repeating)
8/9 = 0.8(repeating)
9/9 = 0.9(repeating) = 1
Maybe this example will help illustrate the bias in >=5 rounding versus
odd/even rounding.
You have four numbers to sum, 1.5, 2.5, 3.5, 4.5
Using the decimal values:
1.5 + 2.5 + 3.5 + 4.5 = 12.
If we round using >=5 rounding:
2 + 3 + 4 + 5 = 14
If we round using odd/even rounding:
2 + 2 + 4 + 4 = 12
Is it any wonder that on Massachusetts State Income Taxes you must (by law)
use the >=5 rounding method, more revenue for the state :).
Actually, because you use the same rounding for exemptions/deductions as for
income the revenue isn't any better for the state but, the simpler >=5
rounding is easier on the tax preparer.
BTW  The CINT() rounding function in all flavors of Microsoft Basic
languages uses odd/even rounding.
Paul
=========================================
Paul Hutchinson
Chief Engineer
Maximum Inc., 30 Samuel Barnet Blvd.
New Bedford, MA 02745
EraseMEphutchinson.....KILLspamimtra.com
http://www.maximuminc.com
=========================================

http://www.piclist.com hint: To leave the PICList
spampiclistunsubscriberequestmitvma.mit.edu
2001\05\31@140430
by
Roman Black
Paul Hutchinson wrote:
> Maybe this example will help illustrate the bias in >=5 rounding versus
> odd/even rounding.
>
> You have four numbers to sum, 1.5, 2.5, 3.5, 4.5
> Using the decimal values:
> 1.5 + 2.5 + 3.5 + 4.5 = 12.
>
> If we round using >=5 rounding:
> 2 + 3 + 4 + 5 = 14
This is what I would expect. The numbers x.5 are
all on the TOP half of the decimal spread, so of
course the average or total of them will be greater
than the half way mark. 0.00 to 0.49 is in the first
half, 0.50 to 0.99 is in the second half.
Just like 0 to 127 is the first half and 128 to 255
is the second half in binary.
Where you might be confused is that 0.50 is not
the half way point between 0 and 1. The half way
point is AFTER 0.4999999 and BEFORE 0.5.
So 0.5 is past the half way mark.
:o)
Roman

http://www.piclist.com hint: To leave the PICList
piclistunsubscriberequestSTOPspammitvma.mit.edu
2001\05\31@163350
by
Paul Hutchinson

>This is what I would expect. The numbers x.5 are
>all on the TOP half of the decimal spread, so of
>course the average or total of them will be greater
>than the half way mark. 0.00 to 0.49 is in the first
>half, 0.50 to 0.99 is in the second half.
>Just like 0 to 127 is the first half and 128 to 255
>is the second half in binary.
>
>Where you might be confused is that 0.50 is not
>the half way point between 0 and 1. The half way
>point is AFTER 0.4999999 and BEFORE 0.5.
>So 0.5 is past the half way mark.
Absolutely not true!
I think I see where the confusion is occurring. You are talking about
numbers limited to ranges of 2^x1 (computer representations of numbers). In
the first paragraph you are talking about a range of 0.00 > 0.99 (not
1.00).
In the second paragraph you change the range to 0 > 1 but don't take into
account the change.
The mid way point of any range of numbers is exactly equal to:
(highest value  lowest value) / 2 + lowest value.
For the normal one byte range (0>255) this is:
(255  0) / 2 + 0 = 127.5
For the range of 0.00>0.99 it's:
(0.99  0.00) / 2 + 0.00 = 0.495
For the range of 0>1 it's:
(1  0) / 2 + 0 = 0.5
Here's all the possible 1 decimal place numbers in the range of 0 to 1.
They are: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 and, 1.0.
There are 11 values and 0.5 is exactly the half way point of a 0 to 1
sequence. There are five numbers above and, five numbers below the mid way
point.
Paul

http://www.piclist.com hint: To leave the PICList
piclistunsubscriberequestSTOPspamKILLspammitvma.mit.edu
2001\05\31@173739
by
Bill Westfield
I don't understand your logic?? There are 500 values,
ie, 000 to 499, then there are 500 values in the top
half, ie, 500 to 999. The dividing point is *immediately*
before 500, ie, 499.999999999999999 (forever)
So if it starts with a 5 it absolutely must be in the
top half. There is no favoring, just accuracy.
No, because we're not talking about "number of values" when rounding, we're
talking about a "distance." There are (always) an infinite number of values
between any two numbers, but .5 is exactly halfway between 0 and 1, so
going consistantly either up or down introduces a slight bias.
Or, looking at all the values of precision N+1 that round to a particular
value, you'll find that there are 5 values that round up to that value, and
only 4 values that round down to it (plus the value itself.)
A trivial pieces of software ought to be able to calculate the accumulated
error over a large number of samples, which IS the value you want to
minimize. Right?
BillW

http://www.piclist.com hint: To leave the PICList
@spam@piclistunsubscriberequest.....spammitvma.mit.edu
'[OT]: Brain Burp Rounding??'
2001\06\01@051140
by
Roman Black

William Chops Westfield wrote:
>
> I don't understand your logic?? There are 500 values,
> ie, 000 to 499, then there are 500 values in the top
> half, ie, 500 to 999. The dividing point is *immediately*
> before 500, ie, 499.999999999999999 (forever)
>
> So if it starts with a 5 it absolutely must be in the
> top half. There is no favoring, just accuracy.
>
> No, because we're not talking about "number of values" when rounding, we're
> talking about a "distance." There are (always) an infinite number of values
> between any two numbers, but .5 is exactly halfway between 0 and 1, so
> going consistantly either up or down introduces a slight bias.
Alright, so you are saying it looks more like
this:
0 to 499 = bottom half (500 units)
500 = dead centre
501 to 999 = top half. (499 units)
This still makes no sense to me. You have a very
obvious bias, one half is bigger than the other.
We are not working with distances, instead there
are a very finite number of possible combinations
in our 3 digits. 0 to 999. There are 1000 total
possible numerical combinations.
1000 can't be included as it is the first combination
of the next 1000 units. And 2000 is the first of the
next block after that.
If you don't believe me write a program that generates
a 3digit random number and then round it... 500 is
past half way and must be rounded up. :o)
Roman

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@063639
by
Bob Ammerman
Roman,
This 'distance' thing really is the way to look at it.
Since n+0.500 is right in the middle between 'n' and 'n+1', the error
introduced is equal (but of opposite sign), whether you go down to 'n' or up
to 'n+1'. So, to have a statistically average error of zero you just go up
half the time and down half the time (ie: round to even).
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)
{Original Message removed}
2001\06\01@064942
by
Kevin Blain

No it doesn't because 9/9 == 1, not 0.9(recurring) (and 5/9 is not 0.2
recurring, but I guess that was a typo!)
4.99999999999 (repeating) is not equal to 5.00000000 (repeating), that's why
we have different numbers to express it. However, 4.99999999999 (repeating)
is nearly equal to 5
This reminds me of the thing where :
 There is 1 cake
 Each person takes half of the amount of cake that is left, indefinatly
Therefore there is always some cake left......
Regards, Kevin
{Quote hidden}> 4.99999999999 (repeating) = 5.00000000 (repeating)
> Remember, repeating decimals are equal to an integer divided by 9.
> 1/9 = 0.1(repeating)
> 2/9 = 0.2(repeating)
> 3/9 = 0.3(repeating) = 1/3
> 4/9 = 0.4(repeating)
> 5/9 = 0.2(repeating)
> 6/9 = 0.6(repeating) = 2/3
> 7/9 = 0.7(repeating)
> 8/9 = 0.8(repeating)
> 9/9 = 0.9(repeating) = 1
>
>
> Maybe this example will help illustrate the bias in >=5 rounding versus
> odd/even rounding.

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@070637
by
Kevin Blain
but n+1 is in the next set. the range should be from n to
n+0.999999999999(recurring)
example.
Here are 10 numbers ( fairly equally distributed between 0 and 1, i.e they
are not biased toward either end) , round them to the nearet integer, then
take the average. Also take the average of the numbers  they should be the
same if the rounding method works
0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95
rounded intergers are: 0 0 0 0 0 1 1 1 1 1 (my method)
average of integers is 0.5
average of actual numbers is 0.5
Regards, Kevin
{Original Message removed}
2001\06\01@070653
by
Alan B. Pearce
My brain burps from all this rounding... It just seems to go round and round
and round and round.... are we having fun yet? that would make it a merry go
round :)

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@072306
by
michael brown

> Is it any wonder that on Massachusetts State Income Taxes you must (by
law)
> use the >=5 rounding method, more revenue for the state :).
> Actually, because you use the same rounding for exemptions/deductions as
for
> income the revenue isn't any better for the state but, the simpler >=5
> rounding is easier on the tax preparer.
I was wondering when this was going to be brought up. I can only imagine
trying to explain to the IRS at an audit that you were only rounding the
"other" way in the interest of national accuracy. BTW if accuracy is so
important that even/odd rounding is needed, then the (IMHO) sensible way to
deal with the math is to carry more digits of precision than required and
then (and only then) round the final total. IIRC (its been a long time)
this is the way the COBOL compiler did math, I suspect other compilers do
the same.
michael

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@082303
by
Thomas McGahee
Sorry, but .99999 repeating is EXACTLY equal to 1.00000
They are just two different ways of EXPRESSING the same
number. Don't believe me? 1/9=.11111 repeating. 2/9=.22222 repeating.
3/9=.3333333 repeating. 4/9=.4444 repeating, 5/9=.55555 repeating.
6/9=.6666 repeating. 7/9=.7777 repeating. 8/8=.888 repeating.
So 9/9=.99999 repeating. The "error" between .999 repeating and
1.000 (repeating, by the way!) is .0000 repeating. Get it?
.999 repeating and 1.000 (repeating the 000 part) are simply two
different ways of EXPRESSING the value. They may LOOK different,
but mathematically the difference is ZERO.
.999 repeating, 9/9, x/x (where x is nonzero), 1, 1.000 repeating
all REPRESENT the same VALUE. One.
Fr. Tom McGahee
{Original Message removed}
2001\06\01@092542
by
Paul Hutchinson

>No it doesn't because 9/9 == 1, not 0.9(recurring)
You missed the point, I was saying that 0.9(repeating) is absolutely equal
to 1. This is a basic principal of mathematics that I think was taught to me
in junior high school.
Here is the algebraic proof:
Given:
x = 0.9(repeating)
Multiply both sides by 10:
10x = 9.9(repeating)
Subtract x from both sides:
10x  x = 9.9(repeating)  x
Substitute value for x on right side:
10x  x = 9.9(repeating)  0.9(repeating)
Simplify right side:
10x  x = 9
Simplify left side:
9x = 9
Divide both sides by 9:
x = 1
Substitute value for x on left side:
0.9(repeating) = 1
>(and 5/9 is not 0.2 recurring, but I guess that was a typo!)
Yep, a typo should have been 0.5(repeating)
>4.99999999999 (repeating) is not equal to 5.00000000 (repeating), that's
why
>we have different numbers to express it. However, 4.99999999999 (repeating)
>is nearly equal to 5
As above 4.99999999999 (repeating) is exactly equal to 5.
Paul

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@093431
by
Alan B. Pearce
>Given:
> x = 0.9(repeating)
>Multiply both sides by 10:
> 10x = 9.9(repeating)
>Subtract x from both sides:
The fallacy in this argument is that at the end x>1, as any repeating
number is not exact.

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@110639
by
Roman Black
Alan B. Pearce wrote:
>
> My brain burps from all this rounding... It just seems to go round and round
> and round and round.... are we having fun yet? that would make it a merry go
> round:)
Ha ha!!! That has got to be a 3 bourbon answer if I
ever heard one. I am feeling the same way. I never
thought rounding a simple decimal number would spark so
much controversy...
:o)
Roman

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@112711
by
Doug Joel

The there is .00001 difference between .99999 and
1.00000....
 Original Message 
From: Thomas McGahee <spamtom_mcgahee..........SIGMAIS.COM>
To: <PICLIST.....MITVMA.MIT.EDU>
Sent: Friday, June 01, 2001 5:24 AM
Subject: Re: [OT]: Brain Burp Rounding??
> Sorry, but .99999 repeating is EXACTLY equal to 1.00000
>
> They are just two different ways of EXPRESSING the same
> number. Don't believe me? 1/9=.11111 repeating. 2/9=.22222
repeating.
> 3/9=.3333333 repeating. 4/9=.4444 repeating, 5/9=.55555
repeating.
> 6/9=.6666 repeating. 7/9=.7777 repeating. 8/8=.888
repeating.
> So 9/9=.99999 repeating. The "error" between .999
repeating and
> 1.000 (repeating, by the way!) is .0000 repeating. Get it?
>
> .999 repeating and 1.000 (repeating the 000 part) are
simply two
> different ways of EXPRESSING the value. They may LOOK
different,
> but mathematically the difference is ZERO.
>
> .999 repeating, 9/9, x/x (where x is nonzero), 1, 1.000
repeating
{Quote hidden}
5/9 is not 0.2
> > recurring, but I guess that was a typo!)
> >
> > 4.99999999999 (repeating) is not equal to 5.00000000
(repeating), that's
> why
> > we have different numbers to express it. However,
4.99999999999
> (repeating)
> > is nearly equal to 5
> >
> > This reminds me of the thing where :
> >
> >  There is 1 cake
> >  Each person takes half of the amount of cake that is
left, indefinatly
> >
> > Therefore there is always some cake left......
> >
> > Regards, Kevin
> >
> >
> >
> > > 4.99999999999 (repeating) = 5.00000000 (repeating)
> > > Remember, repeating decimals are equal to an integer
divided by 9.
{Quote hidden}> > > 1/9 = 0.1(repeating)
> > > 2/9 = 0.2(repeating)
> > > 3/9 = 0.3(repeating) = 1/3
> > > 4/9 = 0.4(repeating)
> > > 5/9 = 0.2(repeating)
> > > 6/9 = 0.6(repeating) = 2/3
> > > 7/9 = 0.7(repeating)
> > > 8/9 = 0.8(repeating)
> > > 9/9 = 0.9(repeating) = 1
> > >
> > >
> > > Maybe this example will help illustrate the bias in
>=5 rounding versus
> > > odd/even rounding.
> >
> > 
> >
http://www.piclist.com hint: PICList Posts must start
with ONE topic:
> > [PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other
[BUY]:,[AD]: >Ads
> >
> >
>
> 
> http://www.piclist.com hint: PICList Posts must start with
ONE topic:
> [PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other
[BUY]:,[AD]: >Ads
>
>

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@114644
by
Roman Black
OK, so now I feel totally inadequate to do rounding
in my simple data table.
As everyone seems to have their own system for rounding
I would like to ask a simple question andd hopefully one
of the math geniuses can give a simple answer??
I do a divide calc (on pocket calculator) that gives a
0.xxxxx answer. I need to round this and make it a binary
number (to fit in one byte).
So 0.400 x 256 = 102.4 = 102 (binary).
Any suggestions for rounding these data figures??
:o)
Roman

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@114846
by
Bob Barr

Kevin Blain <.....kevinb.....RemoveMEWOODANDDOUGLAS.CO.UK> wrote:
>Subject: Re: [OT]: Brain Burp Rounding??
>Date: Fri, 1 Jun 2001 11:44:44 +0100
>
<snip>
>
>This reminds me of the thing where :
>
> There is 1 cake
> Each person takes half of the amount of cake that is left, indefinatly
>
>Therefore there is always some cake left......
>
A similar story is told of a mathematician and an engineer presented with a
problem concerning a beautiful woman located 10 feet away. Each is told that
he can halve the distance to her every 10 minutes and asked how long it will
be until he reaches her.
The mathematician states that he will never be able to reach her.
The engineer figures that, within the hour, it'll be close enough for him.
:=)
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@115058
by
Dipperstein, Michael
> From: Alan B. Pearce [spam_OUTA.B.PearceTakeThisOuTEraseMERL.AC.UK]
>
> >Given:
> > x = 0.9(repeating)
> >Multiply both sides by 10:
> > 10x = 9.9(repeating)
> >Subtract x from both sides:
>
> The fallacy in this argument is that at the end x>1, as any repeating
> number is not exact.
I don't understand where the fallacy lies. A repeating number *is* exact as
long as it isn't truncated.
1/3 is exactly .3 (repeating)
1/3 is not exactly .3333333 or .3333333333 or any truncated version.
Along that line here's another simple Junior High School algebra proof that 1 =
.9 repeating.
1/3 = .3 repeating
multiply both sides by 3
(1/3)*3 = 3 * (.3 repeating)
1 = .9 repeating
Mike

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@121653
by
Paul Hutchinson

> The fallacy in this argument is that at the end x>1, as any repeating
> number is not exact.
Wrong, all repeating fractions have an exact representation (they are
rational numbers). Only irrational numbers like PI have no exact
representation.
<rant on>
I consider, a complete understanding of rounding and number systems (very
basic algebra) to be absolutely essential for good engineering. In my
opinion, anyone involved in engineering of any sort should understand basic
algebra completely. Now, I'm not saying that all engineers must have this
info memorized but, they must have a gut feel for it and know where to look
up the precise info (e.g. their old text books).
<rant off>
In an attempt to help members learn the basics of algebra I searched the web
for some good references. However most of what I found was written for
children 13 years and younger (the authors expect the student to accept some
math principals on faith and, we all know that good engineers never accept
anything on faith :).
I did find that James Brennan, professor of physics and mathematics at Boise
State University in the College of Applied Technology, has posted the
complete contents of his book "Understanding Algebra" online at:
http://www.edteach.com/algebra/
Read the "Decimals" section of Chapter 1 for info on rounding.
BTW  the subject of repeating fractions is also covered in that section.
For those who may have missed it the first time I posted it, here's a nice
web tutorial on significant figures and rounding by, Stephen
L. Morgan, Professor, Department of Chemistry & Biochemistry, The University
of South Carolina.
http://www.chem.sc.edu/faculty/morgan/sigfigs/index.html
Paul

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@122822
by
Wendy J Olend

It seems that we have broken into two camps, the "Always Round Upers"
(ARU) and the "Round to Even Crew" (REC). Being a member of the latter
camp, I'm going to try my hand at explaining our stance.
I've been watching everyone go back and forth, arguing if 5 is the
midpoint between 0 and 9 (REC) or if it's part of the upper half of the
set (ARU). Of course it is part of the upper half of the set
{0,1,2,3,4,5,6,7,8,9}. The confusion comes in at this point: The
roundtoeven method is meant to minimize rounding error. When 0 is the
digit under consideration, there IS no rounding error introduced. Before
the flames head my way, let me elaborate.
We all agree on this point: when you decide to round a number you first
decide how many digits you want in the final answer, then you throw away
all but one plus that number of digits:
Example: 13.1032
If I decide that I want to report my answer with only one decimal place. I
truncate, leaving 13.10 Now we have to ask, "What does this value mean?"
Putting this value into words, it means "I have exactly 13.1, and it what
appears to be 0 in the hundredths place." When I "round" this number to
13.1, I have not introduced any further error, merely reduced the
precision.
Example: 13.1132 to the tenths place, I start with 13.11, which means "I
have exactly 13.1, and what appears to be 1 in the hundredths place." When
I truncate this value, I have reported the value as less than I have
observed it to be. Hence the "rounding error". The same happens when you
round up.
Looking at the error inducing numbers: {1,2,3,4,5,6,7,8,9}, it becomes
obvious why we call 5 the midpoint of this set. If we always round up at
five, we are putting a positive biasing on the data, because we are
rounding up more than half of the time.
The confusion occurs because for 04 it looks like you are doing the same
operation; truncation. But for 0, you are actually just recasting the
value at a lower precision.
There's my $.02 worth,
Wendy

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@125249
by
Alan B. Pearce
>1 = .9 repeating
Except that the error is 0.0_repeating_1.

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@131046
by
John Pfaff
> >1 = .9 repeating
>
> Except that the error is 0.0_repeating_1.
which is exactly equal to zero.
For those who may have missed it:
1/9 = 0.111(repeating)
2/9 = 0.222(repeating)
...
8/9 = 0.888(repeating)
9/9 = 0.999(repeating) which is EXACTLY EQUAL TO ONE.
A math teacher explained this to me years ago (no Chris, not Mr. Zurick).
Also, I'm in the Round To Even crowd. This method was explained in a college chemistry text and was to be used because it
statistically caused the least errors.
jp
>
> 
> http://www.piclist.com hint: PICList Posts must start with ONE topic:
> [PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
>
>

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@132950
by
Paul Hutchinson
You got the rounding correct, by anyone's method :).
But, if the input value can be > 0.99804 it will overflow the 8 bits.
To make it work for any value < 1 you should multiply by 255.
Paul
{Quote hidden}> OK, so now I feel totally inadequate to do rounding
> in my simple data table.
>
> As everyone seems to have their own system for rounding
> I would like to ask a simple question andd hopefully one
> of the math geniuses can give a simple answer??
>
> I do a divide calc (on pocket calculator) that gives a
> 0.xxxxx answer. I need to round this and make it a binary
> number (to fit in one byte).
>
> So 0.400 x 256 = 102.4 = 102 (binary).
>
> Any suggestions for rounding these data figures??
> :o)
> Roman

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@170404
by
Bill Westfield
<rant on>
I consider, a complete understanding of rounding and number systems
(very basic algebra) to be absolutely essential for good engineering. In
my opinion, anyone involved in engineering of any sort should understand
basic algebra completely. Now, I'm not saying that all engineers must
have this info memorized but, they must have a gut feel for it and know
where to look up the precise info (e.g. their old text books).
<rant off>
To tie things in with previous discussions, I suspect that this sort of
thing is one of the differences between "degreed" engineers and "self
taught" engineers. While repeating decimals are theoretically highschool
or earlier math, the sort of "gut feel" for nonintuitive values of limits
and such might be something that one gets drummed into them during the two
years of calculus and physics one endures as "perparation" to using Smith
charts and phasors for EE (not to mention that numerical analysis class.)
There'd be exceptions, of course.
OTOH, in software engineering, I've been rather shocked at how seldom
floating point ("real" numbers) actually gets used...
Is there a simple algorithm for doing the odd/even rounding (equivilent to
N+0.5 and truncate?)
(of course, we're now in big arguments over fine points. Whether you
always round .5 up, or do te even/odd thing, your error introduced over
typical sample sizes is going to be pretty small.)
BillW

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@191009
by
Andrew Warren

William Chops Westfield <EraseMEbillwspamBeGoneKILLspamcisco.com> wrote:
> Is there a simple algorithm for doing the odd/even rounding
> (equivilent to N+0.5 and truncate?)
Bill:
There's a simple implementation in PIC assembly:
; Enter with integer in REG, fraction in the Carry flag.
BNC DONE ;If the carry's clear, no rounding
;is required, so jump.
BTFSS REG,0 ;If the integer is odd, skip ahead.
INCF REG ;Otherwise, round up (i.e., round
;to odd).
DONE:
This implementation uses "round to odd" rather than "round to even"
in order to make the rounding of multibyte integers easier; with
this method, only the leastsignificant byte is ever changed.
This introduces a tiny bit of bias, however, since only ONE value
(0.0) rounds to 0 while THREE values (254.5, 255.0, and 255.5) round
to 255.
If it were important for numbers close to 0 to round down to 0, you
could reverse things so that the bias was toward 0 rather than 255...
But then you'd nonintuitively be rounding 1.0 to 0.
Andy
=== Andrew Warren  RemoveMEaiwspamBeGonespamcypress.com
=== IPD Systems Engineering, CYSD
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@193126
by
Alexandre Domingos F. Souza
>I only used an RPN calc for a few days but I got hooked imediatly,
>those things are great, think I used an HP 32 II or something like that.
>I normally use an TI83 though. I like the RPN calc much better.
I never liked RPN calculators. Had a HP20 and it was algebraic. Xchanged for a HP48G and it is RPN. Completely crazy, but once you got used to, you start to search for the "enter" key on other calculators :o)

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@201618
by
Paul Hutchinson

> To tie things in with previous discussions, I suspect that this sort of
> thing is one of the differences between "degreed" engineers and "self
> taught" engineers. While repeating decimals are theoretically highschool
> or earlier math, the sort of "gut feel" for nonintuitive values of limits
> and such might be something that one gets drummed into them during the two
> years of calculus and physics one endures as "perparation" to using Smith
> charts and phasors for EE (not to mention that numerical analysis class.)
>
> There'd be exceptions, of course.
I guess, I'm an exception. I don't personally know any other self taught
engineers so I can't say how it stacks up but, my gut instinct is that you
are right Bill. I do know two degreed engineers who don't have a good feel
for mathematics, both close personal friends, and they both got out of
design engineering (one does engineering project management and the other
cranks out asp web code).
Paul
=========================================
Paul Hutchinson
Chief Engineer
Maximum Inc., 30 Samuel Barnet Blvd.
New Bedford, MA 02745
@spam@phutchinsonspamimtra.com
http://www.maximuminc.com
=========================================

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\01@225753
by
Kyle Stemen

One thing I don't like about the round to even method is that you lose
precision. Say you are measuring a value from 0 to 9. You have one sig
fig, and 10 different possiblities of what that number can be. Now lets
say that you had to do a calculation such as add .5. You would have to
round back to one digit. Here are the different possiblities with round
to even:
0.5 > 0
1.5 > 2
2.5 > 2
3.5 > 4
4.5 > 4
5.5 > 6
6.5 > 6
7.5 > 8
8.5 > 8
9.5 > 10
with always round up you have
0.5 > 1
1.5 > 2
2.5 > 3
3.5 > 4
4.5 > 5
5.5 > 6
6.5 > 7
7.5 > 8
8.5 > 9
9.5 > 10
With the round to even you can only have an even number so there are 6
possibilites of what it can be, and you started out with 10 so you have
lost precision. With always round up there are still 10 possibilies so
you have lost no precision, but they do not average out the same so you
have lost accuracy.

http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: >uP ONLY! [EE]:,[OT]: >Other [BUY]:,[AD]: >Ads
2001\06\02@053746
by
Roman Black

Paul Hutchinson wrote:
{Quote hidden}> <rant on>
> I consider, a complete understanding of rounding and number systems (very
> basic algebra) to be absolutely essential for good engineering. In my
> opinion, anyone involved in engineering of any sort should understand basic
> algebra completely. Now, I'm not saying that all engineers must have this
> info memorized but, they must have a gut feel for it and know where to look
> up the precise info (e.g. their old text books).
> <rant off>
> I did find that James Brennan, professor of physics and mathematics at Boise
> State University in the College of Applied Technology, has posted the
> complete contents of his book "Understanding Algebra" online at:
>
http://www.edteach.com/algebra/
> Read the "Decimals" section of Chapter 1 for info on rounding.
> BTW  the subject of repeating fractions is also covered in that section.
>
> For those who may have missed it the first time I posted it, here's a nice
> web tutorial on significant figures and rounding by, Stephen
> L. Morgan, Professor, Department of Chemistry & Biochemistry, The University
> of South Carolina.
>
http://www.chem.sc.edu/faculty/morgan/sigfigs/index.html
Thanks Paul, you are absolutely right and I stand
humbled. I should indeed have a thorough understanding
of this.
Unfortunately the last time I sat in a classroom
doing calculus was over 15 years ago, and the amount
of times over the years I have actually needed formula
more intense than the usual freq/reactance etc stuff
has been pretty minimal.
Thanks for the nice links, I will check them out
this weekend. :o)
Roman

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@055045
by
Roman Black
Bob Barr wrote:
> A similar story is told of a mathematician and an engineer presented with a
> problem concerning a beautiful woman located 10 feet away. Each is told that
> he can halve the distance to her every 10 minutes and asked how long it will
> be until he reaches her.
>
> The mathematician states that he will never be able to reach her.
>
> The engineer figures that, within the hour, it'll be close enough for him.
>:=)
Ha ha ha!! <cheeky> Hey, for some of us, 30 minutes
would be close enough... Think about it. ;o)
</cheeky>
Roman

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@074137
by
David W. Gulley

Kyle Stemen wrote:
{Quote hidden}>
> One thing I don't like about the round to even method is that you lose
> precision. Say you are measuring a value from 0 to 9. You have one sig
> fig, and 10 different possiblities of what that number can be. Now lets
> say that you had to do a calculation such as add .5. You would have to
> round back to one digit. Here are the different possiblities with round
> to even:
> 0.5 > 0
> 1.5 > 2
> 2.5 > 2
> 3.5 > 4
> 4.5 > 4
> 5.5 > 6
> 6.5 > 6
> 7.5 > 8
> 8.5 > 8
> 9.5 > 10
>
> with always round up you have
>
> 0.5 > 1
> 1.5 > 2
> 2.5 > 3
> 3.5 > 4
> 4.5 > 5
> 5.5 > 6
> 6.5 > 7
> 7.5 > 8
> 8.5 > 9
> 9.5 > 10
>
> With the round to even you can only have an even number so there are 6
> possibilites of what it can be, and you started out with 10 so you have
> lost precision. With always round up there are still 10 possibilies so
> you have lost no precision, but they do not average out the same so you
> have lost accuracy.
Actually, you lose no precision or accuracy, if your premise is that the
x.5 values are +/ 0.5 in accuracy to start with.
To demonstrate this take the average of the groups above:
0.5 + 1.5 + ... 9.5 = 50/10 = 5 (the list of numbers)
0 + 2 + 2 + ... 10 = 50/10 = 5 (Rounded to Even)
1 + 2 + 3 + ... 10 = 55/10 = 6 (Rounded Up)
Rounding by adding 0.5 to x.5 results in a number that is different from
the original by the same amount that subtracting 0.5 from x.5 would
yield.
In other words, rounding 0.5 to 0 adds no more imprecision than rounding
to 1.
Having now stated that Round to Even does not increase the imprecision,
I must also state that neither does it does it increase the precision.
What Round to Even accomplishes is most valuable when accumulating a set
of values, since it tends to center the accumulated result in the range
of accuracy, while the Round Up method approaches the upper bound of the
accuracy range, and performing a truncate forces the result to the lower
bound of the accuracy range.
The original question in this thread was (essentially):
"How do you round a number?"
When I encounter a task that requires rounding, I first consider what
the appropriate method might be and then implement the most reasonable
solution.
For some jobs, I might just truncate; for others add 0.5 and truncate
(which is Round Up); but, if the rounded values are being accumulated I
(may) use the Round to Even methodology.
But, if you ask me "how do you round a number," my reply is round up if
greater than 0.5, round down if less than 0.5 and if exactly x.5, round
up if previous digit odd, round down if previous digit even.
David W. Gulley
Destiny Designs

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@101114
by
michael brown
> I guess, I'm an exception. I don't personally know any other self taught
> engineers so I can't say how it stacks up but, my gut instinct is that you
> are right Bill. I do know two degreed engineers who don't have a good feel
> for mathematics, both close personal friends, and they both got out of
> design engineering (one does engineering project management and the other
> cranks out asp web code).
>
> Paul
You know me, sort of anyway! Although, I wouldn't rise to call my self an
"engineer", just a guy that loves to play with electricty, computers and
math. I like to learn everything the "hard way", hopefully it will stick
better that way. The guy cranking out the asp code is making some bucks,
isn't he? I still think you should round at the end and not all along the
way. ;D
michael

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@121914
by
Thomas McGahee
Sigh.... I did not say .99999 I said .99999 REPEATING.
As in **forever**.
Do not get confused between the VALUE of a number and its
representation. Whether you like it or not, mathematically the mumber
1 exactly equals .9 repeating. This is not a matter of personal
opinion. It is simple mathematical fact.
Fr. Tom McGahee
{Original Message removed}
2001\06\02@145026
by
Chris Carr
> Do not get confused between the VALUE of a number and its
> representation. Whether you like it or not, mathematically the mumber
> 1 exactly equals .9 repeating. This is not a matter of personal
> opinion. It is simple mathematical fact.
>
Now if I remember my maths correctly 0.9 repeating to infinity will
equal 1........but..........you can never reach infinity, you can only
"Approach Infinity". So whilst 0.9 repeating will get so mind boggling
close to 1
that an amoeba couldn't push his reproductive organ in the gap it will
never actually reach the point where it will equal 1.
Chris Carr

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@152744
by
Thomas McGahee
I really do not want to keep this discussion about .9 repeating
being exactly equal to 1 going and going and going, but as
an educator I really want to make sure that at least some of the
PIC list members "get it".
9/9 is a RATIONAL number. It can be **represented** in decimal
notation in (at least) two ways that LOOK different but have the same
exact VALUE. These are 1.000 (with the zero repeating forever),
and .999 with the 9 repeating forever. The mathematical difference
between the two is .000 with the zero repeating forever.
This concept is difficult for some people to grasp at first,
because .9999 (9 repeating) just LOOKS smaller than 1.0 (0 repeating).
Looks can be VERY deceiving.
777/777 may **look** bigger than .001/.001 to some
people, but believe me the VALUE is the same. 1.
Fr. Tom McGahee
{Original Message removed}
2001\06\02@184812
by
Bill Westfield
> Now if I remember my maths correctly 0.9 repeating to infinity will equal
> 1........but..........you can never reach infinity, you can only "Approach
> Infinity". So whilst 0.9 repeating will get so mind boggling close to 1
> that an amoeba couldn't push his reproductive organ in the gap it will
> never actually reach the point where it will equal 1.
You don't have to "reach" infinity. You SAID that it repeats to infinity,
so it DOES. It doesn't matter that you can't write it down...
BTW, the "half way" problem is equivilent to 0.1111 repeating in BINARY,
and that's 1.0 too. The mathematician shouldn't have had a problem. (The
Philosipher, on the other hand...)
And amoebas don't have reproductive organs...
BillW

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@204500
by
michael brown
 Original Message 
From: "Thomas McGahee" <TakeThisOuTtom_mcgaheeKILLspam@spam@SIGMAIS.COM>
To: <.....PICLISTRemoveMEMITVMA.MIT.EDU>
Sent: Saturday, June 02, 2001 11:19 AM
Subject: Re: [OT]: Brain Burp Rounding??
> Sigh.... I did not say .99999 I said .99999 REPEATING.
> As in **forever**.
>
> Do not get confused between the VALUE of a number and its
> representation. Whether you like it or not, mathematically the mumber
> 1 exactly equals .9 repeating. This is not a matter of personal
> opinion. It is simple mathematical fact.
>
> Fr. Tom McGahee
Yeah, thats the ticket....... And infinity < 2*infinity.........
>
> {Original Message removed}
2001\06\02@212246
by
michael brown

 Original Message 
From: "Chris Carr" <KILLspamnyedTakeThisOuTBTINTERNET.COM>
To: <TakeThisOuTPICLISTspam_OUTMITVMA.MIT.EDU>
Sent: Saturday, June 02, 2001 1:47 PM
Subject: Re: [OT]: Brain Burp Rounding??
{Quote hidden}> > Do not get confused between the VALUE of a number and its
> > representation. Whether you like it or not, mathematically the mumber
> > 1 exactly equals .9 repeating. This is not a matter of personal
> > opinion. It is simple mathematical fact.
> >
> Now if I remember my maths correctly 0.9 repeating to infinity will
> equal 1........but..........you can never reach infinity, you can only
> "Approach Infinity". So whilst 0.9 repeating will get so mind boggling
> close to 1
> that an amoeba couldn't push his reproductive organ in the gap it will
> never actually reach the point where it will equal 1.
>
> Chris Carr
Precisely! The fact that the number is "repeating" implies infinity as a
piece of the formula.

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@212716
by
michael brown

 Original Message 
From: "Thomas McGahee" <RemoveMEtom_mcgaheespamSTOPspamSIGMAIS.COM>
To: <.....PICLISTEraseMEMITVMA.MIT.EDU>
Sent: Saturday, June 02, 2001 2:30 PM
Subject: Re: [OT]: Brain Burp Rounding??
{Quote hidden}> I really do not want to keep this discussion about .9 repeating
> being exactly equal to 1 going and going and going, but as
> an educator I really want to make sure that at least some of the
> PIC list members "get it".
>
> 9/9 is a RATIONAL number. It can be **represented** in decimal
> notation in (at least) two ways that LOOK different but have the same
> exact VALUE. These are 1.000 (with the zero repeating forever),
> and .999 with the 9 repeating forever. The mathematical difference
> between the two is .000 with the zero repeating forever.
Don't forget the 1 at position 'infinity + 1'
>
> This concept is difficult for some people to grasp at first,
> because .9999 (9 repeating) just LOOKS smaller than 1.0 (0 repeating).
It is.
>
> Looks can be VERY deceiving.
> 777/777 may **look** bigger than .001/.001 to some
> people, but believe me the VALUE is the same. 1.
In this I have no problem.
{Quote hidden}>
> Fr. Tom McGahee
>
>  Original Message 
> From: Chris Carr <
spamBeGonenyedRemoveMEBTINTERNET.COM>
> To: <
.....PICLISTEraseMEMITVMA.MIT.EDU>
> Sent: Saturday, June 02, 2001 2:47 PM
> Subject: Re: [OT]: Brain Burp Rounding??
>
>
> > > Do not get confused between the VALUE of a number and its
> > > representation. Whether you like it or not, mathematically the mumber
> > > 1 exactly equals .9 repeating. This is not a matter of personal
> > > opinion. It is simple mathematical fact.
> > >
> > Now if I remember my maths correctly 0.9 repeating to infinity will
> > equal 1........but..........you can never reach infinity, you can only
> > "Approach Infinity". So whilst 0.9 repeating will get so mind boggling
> > close to 1
> > that an amoeba couldn't push his reproductive organ in the gap it will
> > never actually reach the point where it will equal 1.
> >
> > Chris Carr
> >
> > 
> >
http://www.piclist.com hint: The list server can filter out subtopics
> > (like ads or off topics) for you. See
http://www.piclist.com/#topics
> >
> >
>
> 
>
http://www.piclist.com hint: The list server can filter out subtopics
> (like ads or off topics) for you. See
http://www.piclist.com/#topics
>
>

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@222346
by
David VanHorn

At 07:39 PM 6/2/01 0500, michael brown wrote:
> Original Message 
>From: "Thomas McGahee" <spamtom_mcgaheespam_OUT@spam@SIGMAIS.COM>
>To: <spamPICLIST@spam@STOPspamMITVMA.MIT.EDU>
>Sent: Saturday, June 02, 2001 11:19 AM
>Subject: Re: [OT]: Brain Burp Rounding??
>
>
> > Sigh.... I did not say .99999 I said .99999 REPEATING.
> > As in **forever**.
> >
> > Do not get confused between the VALUE of a number and its
> > representation. Whether you like it or not, mathematically the mumber
> > 1 exactly equals .9 repeating.
hold on jack..
That's as nonsensical as saying that 2=3 for large values of 2.
I have a problem with that.
0.99(followed by any finite or infinite number of nines) is by definition,
not equal to 1.0
The value of 0.99(inf..) is less than 1.0 by an infinitely small (but
nonzero) amount.

Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@223902
by
Bob Ammerman
Sorry Dave,
He's right and you are wrong.
The value .9 repeating is the same as the infinite series:
9/10 + 9/100 + 9/1000 + 9/10000 + ...
Which sums to 1.
Remember  infinite is infinite. If you carry the series out infinitely
there will be _no_ 'residual'.
We have the same thing in binary where
.1 repeating (binary) is the same as the infinite series:
1/2 + 1/4 + 1/8 + 1/16 + ...
Which again, after summing an infinite number of terms, comes to exactly 1.
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)
{Original Message removed}
2001\06\02@224305
by
Jinx
> .1 repeating (binary) is the same as the infinite series:
>
> 1/2 + 1/4 + 1/8 + 1/16 + ...
>
> Which again, after summing an infinite number of terms, comes to
> exactly 1.
Wouldn't it come infinitely close to 1 ?

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@225948
by
David VanHorn

At 10:35 PM 6/2/01 0400, Bob Ammerman wrote:
>Sorry Dave,
>
>He's right and you are wrong.
>
>The value .9 repeating is the same as the infinite series:
>
>9/10 + 9/100 + 9/1000 + 9/10000 + ...
>
>Which sums to 1.
It sums to almost one. The degree of "almost" is a function of your patience.
As you expand the sequence, the difference becomes small, but it is never zero.
You claim 1 = 0.9...
Is it then true that 1(inf) = 0.9...(inf)?
There may be a rule which says so (Which I suspect exists to avoid ugly
problems in calculation), but you're not going to convince me that a number
which is "less than 1 by an infinitely small amount" is equal to 1.
Next, you'll want to sell me 5 pounds of potatoes multiplied by the Sqrt of
1 :)

Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
'[OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding'
2001\06\02@231056
by
Andrew Warren

"Thomas McGahee" <spamBeGonetom_mcgaheespamBeGone@spam@SIGMAIS.COM> wrote, over and over and
over:
> Whether you like it or not, mathematically the mumber 1 exactly
> equals .9 repeating.
and David VanHorn <RemoveMEPICLISTRemoveMERemoveMEMITVMA.MIT.EDU> replied:
> That's as nonsensical as saying that 2=3 for large values of 2.
> ....
>
> 0.99(followed by any finite or infinite number of nines) is by
> definition, not equal to 1.0
>
> The value of 0.99(inf..) is less than 1.0 by an infinitely small (but
> nonzero) amount.
[Sorry to single you out, Dave; this applies not only to you,
but to everyone else who's posted essentially the same thing.]
It's been a long time since I've written a "God DAMN it, you peopole
are pissing me off" email to the PICLIST, and since James Newton has
imposed a "no profanity" rule, I guess I won't write one now.
Still, though, you people ARE pissing me off. 0.9 repeating IS
exactly equal to 1. Someone posted a simple algebraic explanation
earlier; was that TOO simple? Here, for your edification, is a more
complex explanation, courtesy of the sci.math FAQ (where the
"0.999... = 1" question used to be #1 on the list):
11Q: Why is 0.9999... = 1?
A: In modern mathematics, the string of symbols "0.9999..." is
understood to be a shorthand for "the infinite sum 9/10 + 9/100
+ 9/1000 + ...." This in turn is shorthand for "the limit of the
sequence of real numbers 9/10, 9/10 + 9/100, 9/10 + 9/100 +
9/1000, ..." Using the wellknown epsilondelta definition of
limit, one can easily show that this limit is 1. The statement
that 0.9999... = 1 is simply an abbreviation of this fact.
oo m
 9  9
0.999... = >  = lim > 
 10^n m>oo  10^n
n=1 n=1
Choose epsilon > 0. Suppose delta = 1/log_10 epsilon, thus
epsilon = 10^(1/delta). For every m>1/delta we have that
 m 
  9  1 1
 >   1  =  <  = epsilon
  10^n  10^m 10^(1/delta)
 n=1 
So by the (epsilondelta) definition of the limit we have
m
 9
lim >  = 1
m>oo  10^n
n=1
Does that make it clearer?
It's a basic mathematical FACT that 0.9 repeating is equal to 1. If
you don't "get" this, ask questions. Say, "Gee, that sure seems
counterintuitive." Find your old schoolbooks and see if it's
explained there. Post a message to the sci.math newsgroup if you
want a thousand people to tell you to read the FAQ... But for God's
sake, if you just can't understand it no matter how hard you try,
don't ARGUE about it; that does nothing but advertise your
unwillingness or inability to learn.
Andy
=== Andrew Warren  fastfwdKILLspamspamix.netcom.com
=== Fast Forward Engineering  San Diego, CA
=== http://www.geocities.com/SiliconValley/2499

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@231932
by
Alexandre Domingos F. Souza
>It's been a long time since I've written a "God DAMN it, you peopole
>are pissing me off" email to the PICLIST, and since James Newton has
>imposed a "no profanity" rule, I guess I won't write one now.
Hmmm...got stressed. It's bad.
>Still, though, you people ARE pissing me off. 0.9 repeating IS
>exactly equal to 1. Someone posted a simple algebraic explanation
>earlier; was that TOO simple? Here, for your edification, is a more
>complex explanation, courtesy of the sci.math FAQ (where the
>"0.999... = 1" question used to be #1 on the list):
So tell me why my teacher doesn't let me go to the next class/year if I mark 4.9 on her exam??? :o)))
8<Corte aqui8<
Alexandre Souza
spam_OUTtaito@spam@terra.com.br
http://planeta.terra.com.br/lazer/pinball/
8<Corte aqui8<

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@232157
by
Jim Paul

who cares?
Original Message
From: Andrew Warren <TakeThisOuTfastfwdspam_OUTIX.NETCOM.COM>
To: KILLspamPICLIST.....TakeThisOuTMITVMA.MIT.EDU <TakeThisOuTPICLISTEraseMERemoveMEMITVMA.MIT.EDU>
Date: Saturday, June 02, 2001 10:14 PM
Subject: [OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding??")
"Thomas McGahee" <spam_OUTtom_mcgaheeRemoveME.....SIGMAIS.COM> wrote, over and over and
over:
> Whether you like it or not, mathematically the mumber 1 exactly
> equals .9 repeating.
and David VanHorn <spamPICLISTKILLspamKILLspamMITVMA.MIT.EDU> replied:
> That's as nonsensical as saying that 2=3 for large values of 2.
> ....
>
> 0.99(followed by any finite or infinite number of nines) is by
> definition, not equal to 1.0
>
> The value of 0.99(inf..) is less than 1.0 by an infinitely small (but
> nonzero) amount.
[Sorry to single you out, Dave; this applies not only to you,
but to everyone else who's posted essentially the same thing.]
It's been a long time since I've written a "God DAMN it, you peopole
are pissing me off" email to the PICLIST, and since James Newton has
imposed a "no profanity" rule, I guess I won't write one now.
Still, though, you people ARE pissing me off. 0.9 repeating IS
exactly equal to 1. Someone posted a simple algebraic explanation
earlier; was that TOO simple? Here, for your edification, is a more
complex explanation, courtesy of the sci.math FAQ (where the
"0.999... = 1" question used to be #1 on the list):
11Q: Why is 0.9999... = 1?
A: In modern mathematics, the string of symbols "0.9999..." is
understood to be a shorthand for "the infinite sum 9/10 + 9/100
+ 9/1000 + ...." This in turn is shorthand for "the limit of the
sequence of real numbers 9/10, 9/10 + 9/100, 9/10 + 9/100 +
9/1000, ..." Using the wellknown epsilondelta definition of
limit, one can easily show that this limit is 1. The statement
that 0.9999... = 1 is simply an abbreviation of this fact.
oo m
 9  9
0.999... = >  = lim > 
 10^n m>oo  10^n
n=1 n=1
Choose epsilon > 0. Suppose delta = 1/log_10 epsilon, thus
epsilon = 10^(1/delta). For every m>1/delta we have that
 m 
  9  1 1
 >   1  =  <  = epsilon
  10^n  10^m 10^(1/delta)
 n=1 
So by the (epsilondelta) definition of the limit we have
m
 9
lim >  = 1
m>oo  10^n
n=1
Does that make it clearer?
It's a basic mathematical FACT that 0.9 repeating is equal to 1. If
you don't "get" this, ask questions. Say, "Gee, that sure seems
counterintuitive." Find your old schoolbooks and see if it's
explained there. Post a message to the sci.math newsgroup if you
want a thousand people to tell you to read the FAQ... But for God's
sake, if you just can't understand it no matter how hard you try,
don't ARGUE about it; that does nothing but advertise your
unwillingness or inability to learn.
Andy
=== Andrew Warren  spamfastfwdspam_OUTix.netcom.com
=== Fast Forward Engineering  San Diego, CA
=== http://www.geocities.com/SiliconValley/2499

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@233849
by
Jinx
> 11Q: Why is 0.9999... = 1?
>
> A: In modern mathematics,
Modern mathematics. Not old common sense and logic
That's where I make a distinction and where my query about
0.999999r being infinitely close to 1 came from  a logical point
of view, not arguing mathematical proofs. If mathemeticians
in a mathematical world choose to represent 0.99999r as 1 then
I have no problem with that and respect your opinion Andrew
In the physical world "a miss is as good as a mile"

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
2001\06\02@233934
by
David VanHorn

>
>It's been a long time since I've written a "God DAMN it, you peopole
>are pissing me off" email to the PICLIST, and since James Newton has
>imposed a "no profanity" rule, I guess I won't write one now.
I'm sorry it's so upsetting to you.
0.9 is different from 1 by a tenth part.
0.99, by a hundredth.
No matter how far you go, the difference is still not zero.
It may become awkward to calculate, but tossing the remainder doesn't seem
fair.
You're telling me that I can take infinity as the number that makes
(1/N)*(10.9) = (1/N)*0 true.
It seems that it all hinges on what infinity means, and since people like
Feynman and Hawking are having trouble with calculations where infinity
pops in, I'm not bothered that it causes me trouble.
Still, science is that which, when you stop believing in it, is still works.
Can you show me something by which this is a consequence?
Something physical, that requires this to be true?
Or is this just a peculiarity of the current rule set.
It wasn't that long ago that "zero" didn't exist in mathmatics. I'm sure
the scholars of that day thought their mathematics was quite complete and
correct as well.

Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
'[OT]: Brain Burp Rounding??'
2001\06\03@003649
by
James Newton. Admin 3
"...by an infinitely small (but nonzero) amount...."
To paraphrase a popular space opera "Never underestimate the power of the
infinity." Infinity is a mindnumbingly large (or small) thing. A totally
incomprehensible value. Anyone who can actually understand it's magnitude,
would be insane. It is one of the many things in life that one must not try
to completely investigate but rather to, at some point, simply accept.
I always enjoyed a story that a teacher of mine told about a class of
juvenal delinquents that he once enjoyed and tried to inspire. He told them
that they could not walk from one end of a class room to the other. He felt
that in a class of "normal" kids, the students would have sat, smiling,
waiting for the teacher to go on, but in this class one of the kids popped
up, walked to the back wall, then to the front then said "shows what you
know, sucker" and sat down to the applause of his classmates. The teacher
then went on to explain that in order to walk from one end to the other, you
first must walk half way. But then to complete the task, you have to walk
half the remaining distance, and so on (here it comes) * infinitely * so
that you never actually reach the other end, because you always have half
way left to go. The kids thought about it and then one said, "that's bull
shit teach, I know can still walk all the way" and another said "no man,
he's right, you can get that close, but you actually never get there!" And
before the shanks came out, the teacher said "Does it really make a
difference? Can you get close enough that it doesn't matter? If you just
keep walking WILL YOU STILL BREAK YOUR NOSE!!!???" and the kids were willing
to accept that it probably isn't a good thing to understand that you can't
actually get from one wall to another.
Anyway, the point is, if you can believe that you can walk from one end of a
room to the other, then you can believe that infinitely small IS zero and
that 4.999 repeating is 5 and that you need to round even to avoid bias.
In fact, this is the main difference between engineers and technicians. The
difference between things making sense and things working.
James Newton, PICList Admin #3
STOPspamjamesnewtonspam_OUTspamBeGonepiclist.com
16196520593 phone
http://www.piclist.com
{Original Message removed}
2001\06\03@003717
by
Bob Ammerman
 Original Message 
From: "Jinx" <spam_OUTjoecolquittspamBeGoneCLEAR.NET.NZ>
To: <EraseMEPICLISTKILLspamMITVMA.MIT.EDU>
Sent: Saturday, June 02, 2001 10:42 PM
Subject: Re: [OT]: Brain Burp Rounding??
> > .1 repeating (binary) is the same as the infinite series:
> >
> > 1/2 + 1/4 + 1/8 + 1/16 + ...
> >
> > Which again, after summing an infinite number of terms, comes to
> > exactly 1.
>
> Wouldn't it come infinitely close to 1 ?
Not after an _infinite_ number of terms.
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@003725
by
Bob Ammerman
Dave,
The point is that it does _not_ take patience.
.9 repeating is already an _infinite_ series. Not just a "sorta infinite as
long as you want to go on" series.
Its value is exactly 1.
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)
{Original Message removed}
2001\06\03@005515
by
David VanHorn

>
>Anyway, the point is, if you can believe that you can walk from one end of a
>room to the other, then you can believe that infinitely small IS zero and
>that 4.999 repeating is 5 and that you need to round even to avoid bias.
That's Zeno's Paradox, and the problem is that they kept decreasing the
time intervals over which the motion was made. (Half the distance, in half
the time) The paradox points out only that you can't really make those
measurements, not that you can't get there.
Indeed, you'll MUCH sooner cross the quantum uncertanity limit, where you
can't say where you are, and how fast you're moving.

Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@010945
by
David VanHorn
At 12:18 AM 6/3/01 0400, Bob Ammerman wrote:
>Dave,
>
>The point is that it does _not_ take patience.
>
>.9 repeating is already an _infinite_ series. Not just a "sorta infinite as
>long as you want to go on" series.
At each point, it evaluates to <1. Repeating it in smaller steps forever
doesn't change that.
Show me the point at which it changes, and evaluates to 1.
I know, it's infinitely far away, and it can never be reached, but if you
wish real hard...
>Its value is exactly 1.
Can you show any physical thing that requires this to be true?

Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@015012
by
David VanHorn

>
>Its value is exactly 1.
So I did a little digging, and found this link.
http://www.maths.abdn.ac.uk/~igc/tch/ma1002/appl/node57.html
However, all that is said about a converging series is that you can
determine a value that it approaches. I see no requirement or statement
that it REACHES that value.
Here also,
http://forum.swarthmore.edu/dr.math/problems/may7.8.98.html
S = 1/2 + 1/4 + 1/8 + 1/16 + ... + 1/2^n + ...
This series is described as convergent (obvious) and approaching 1, but not
described as being equal to 1
Here:
http://www.misd.wednet.edu/~kim_schjelderup/Integrated%203/Pages/Seq&Series/4.7l%20Inifinite%20Series%20(WP).pdf
Finally the statement:
If the sequence of partial sums of an infinite series has a limit, then
that limit is the sum of the series.
Looks to me like we are defining "sum of the series" as something special,
and we are not saying that the series is equal to the limit, in a manner
similar to the way that "spin" is used in quantum mechanics.
It's certainly useful in calculation, because it causes those awkward
infinities to dissapear, by ignoring the infinitely tiny difference between
the actual result, and the defined result.
Inverting Zeno's paradox, the fallacy is that a finite distance (or number)
does not become infinite, simply because it can be divided into an infinte
number of smaller distances (or numbers)

Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@024811
by
michael brown

 Original Message 
From: "David VanHorn" <EraseMEdvanhornRemoveMECEDAR.NET>
To: <.....PICLISTspam_OUTMITVMA.MIT.EDU>
Sent: Saturday, June 02, 2001 9:57 PM
Subject: Re: [OT]: Brain Burp Rounding??
{Quote hidden}> At 10:35 PM 6/2/01 0400, Bob Ammerman wrote:
> >Sorry Dave,
> >
> >He's right and you are wrong.
> >
> >The value .9 repeating is the same as the infinite series:
> >
> >9/10 + 9/100 + 9/1000 + 9/10000 + ...
> >
> >Which sums to 1.
>
> It sums to almost one. The degree of "almost" is a function of your
patience.
> As you expand the sequence, the difference becomes small, but it is never
zero.
>
> You claim 1 = 0.9...
> Is it then true that 1(inf) = 0.9...(inf)?
>
> There may be a rule which says so (Which I suspect exists to avoid ugly
> problems in calculation), but you're not going to convince me that a
number
> which is "less than 1 by an infinitely small amount" is equal to 1.
>
>
> Next, you'll want to sell me 5 pounds of potatoes multiplied by the Sqrt
of
> 1 :)
I'm with Dave on this one. Sqrt of 1 = i "i"  that amazingly
ridiculous, nonexistant value that allows mathematicians to continue on
creating even more ridiculous mathematics coming up with answers that don't
(can't) exist. Sort of like "e" the fascinating irational number that
somehow ocupies an exact position on a number line. Where as pi is a
supposedly "irrational" number easily represented as a fraction (which by
definition makes it rational) as in pi = C/D where C is some number
representing circumfrence and D representing diameter of a circle. You
cannot use infinity in an equation and expect any sanity in the result.
However, we are supposed to accept these things and then also believe that
you cannot divide by 0 (answer is undefined even though the real answer
should be infinity). Since division is nothing but repetive subtraction,
you can easily prove (using a pic ;D ) that dividing by 0 is infinite and
not "undefined". Look Dave its true 1=2 ;)
a = x [true for some a's and x's]
a+a = a+x [add a to both sides]
2a = a+x [a+a = 2a]
2a2x = a+x2x [subtract 2x from both sides]
2(ax) = a+x2x [Factor left side]
2(ax) = ax [Simplify right side]
2 = 1 [divide both sides by ax]
Of course we can't divide by zero, which is precisely what happens in the
last step. Back to the .999 rpt.=1 arithmetic with infinity is NOT allowed,
because infinity is not a number. And, just like our little puzzle, we get
answers that make no sense.
>

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding'
2001\06\03@025229
by
michael brown

 Original Message 
From: "Andrew Warren" <@spam@fastfwdEraseMEspamIX.NETCOM.COM>
To: <PICLISTTakeThisOuTKILLspamMITVMA.MIT.EDU>
Sent: Saturday, June 02, 2001 10:10 PM
Subject: [OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding??")
{Quote hidden}> "Thomas McGahee" <
RemoveMEtom_mcgaheeTakeThisOuTSIGMAIS.COM> wrote, over and over and
> over:
>
> > Whether you like it or not, mathematically the mumber 1 exactly
> > equals .9 repeating.
>
> and David VanHorn <
@spam@PICLISTSTOPspamMITVMA.MIT.EDU> replied:
>
> > That's as nonsensical as saying that 2=3 for large values of 2.
> > ....
> >
> > 0.99(followed by any finite or infinite number of nines) is by
> > definition, not equal to 1.0
> >
> > The value of 0.99(inf..) is less than 1.0 by an infinitely small (but
> > nonzero) amount.
>
> [Sorry to single you out, Dave; this applies not only to you,
> but to everyone else who's posted essentially the same thing.]
>
> It's been a long time since I've written a "God DAMN it, you peopole
> are pissing me off" email to the PICLIST, and since James Newton has
> imposed a "no profanity" rule, I guess I won't write one now.
>
> Still, though, you people ARE pissing me off. 0.9 repeating IS
> exactly equal to 1. Someone posted a simple algebraic explanation
> earlier; was that TOO simple? Here, for your edification, is a more
> complex explanation, courtesy of the sci.math FAQ (where the
> "0.999... = 1" question used to be #1 on the list):
>
> 11Q: Why is 0.9999... = 1?
>
> A: In modern mathematics, the string of symbols "0.9999..." is
> understood to be a shorthand for "the infinite sum 9/10 + 9/100
> + 9/1000 + ...." This in turn is shorthand for "the limit of the
> sequence of real numbers 9/10, 9/10 + 9/100, 9/10 + 9/100 +
> 9/1000, ..." Using the wellknown epsilondelta definition of
> limit, one can easily show that this limit is 1. The statement
> that 0.9999... = 1 is simply an abbreviation of this fact.
>
> oo m
>  9  9
> 0.999... = >  = lim > 
>  10^n m>oo  10^n
> n=1 n=1
>
>
> Choose epsilon > 0. Suppose delta = 1/log_10 epsilon, thus
> epsilon = 10^(1/delta). For every m>1/delta we have that
>
>  m 
>   9  1 1
>  >   1  =  <  = epsilon
>   10^n  10^m 10^(1/delta)
>  n=1 
>
> So by the (epsilondelta) definition of the limit we have
>
> m
>  9
> lim >  = 1
> m>oo  10^n
> n=1
>
> Does that make it clearer?
>
> It's a basic mathematical FACT that 0.9 repeating is equal to 1. If
> you don't "get" this, ask questions. Say, "Gee, that sure seems
> counterintuitive." Find your old schoolbooks and see if it's
> explained there. Post a message to the sci.math newsgroup if you
> want a thousand people to tell you to read the FAQ... But for God's
Now, without trying to upset anyone, I find it hard to believe that an FAQ
is the end all answer to this.
{Quote hidden}

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@025845
by
Bill Westfield
>> In the physical world "a miss is as good as a mile"
In the physical world, you don't need to get anywhere NEAR an infinite
number of 9s after your decimal point for .999... to be "equal to" 1.0
Say you're talking meters  at about 10 9s ("0.9999999999 m") you're about
one atomic diameter from 1.0
BillW

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@030711
by
Bill Westfield
It seems that it all hinges on what infinity means, and since people like
Feynman and Hawking are having trouble with calculations where infinity
pops in, I'm not bothered that it causes me trouble.
Infinity is fun. Not very intuitive, but fun. The sort of infinity we're
talking about here is pretty well understood, mathematically. Someone said
recently here that "infinity < (2 * infinity)" Sorry, that's wrong.
infinity = 2*infinity
Furthermore, you have bits like the number of integers is the same as the
number of real numbers (infinity, alephnull (?), "countably infinite"), but
the number of irrational numbers is larger ("uncoutably infinite")
Can you show me something by which this is a consequence?
Something physical, that requires this to be true?
Physical things don't require infinity to work... See previous message
about atomic diameters...
Or is this just a peculiarity of the current rule set.
Sure. That's "all."
BillW

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: Brain Burp Rounding??'
2001\06\03@035319
by
Chris Carr
>
> And amoebas don't have reproductive organs...
>
Are you sure ?
According to the arguments going on here they must have.
Because nothing is the same as infinitely small so....
if they have no reproductive organ they must have
a reproductive organ that is infinitely small.
All this was explained in the service manual for Starship Titanic's
Infinite Improbability Drive. Unfortunately no longer available since
the Starship suffered a Spontaneous Massive Existence Failure.
8)
Chris Carr

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@043345
by
Roman Black
David VanHorn wrote:
> > > Sigh.... I did not say .99999 I said .99999 REPEATING.
> > > As in **forever**.
> > >
> > > Do not get confused between the VALUE of a number and its
> > > representation. Whether you like it or not, mathematically the mumber
> > > 1 exactly equals .9 repeating.
>
> hold on jack..
> The value of 0.99(inf..) is less than 1.0 by an infinitely small (but
> nonzero) amount.
I'm with you David, if you are going to believe in
the mystical concept of infinity then it has to be
credited both ways. 0.99 (inf) is different to 1.0
by an infinitely small difference. If it was equal
to 1.0 then it would be written as such...
Seems the argument is "does an infinitely small
thing exist?" and I think by the very concept of
infinity the answer has to be yes.
Roman

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@052228
by
Roman Black
michael brown wrote:
> a = x [true for some a's and x's]
> a+a = a+x [add a to both sides]
> 2a = a+x [a+a = 2a]
> 2a2x = a+x2x [subtract 2x from both sides]
> 2(ax) = a+x2x [Factor left side]
> 2(ax) = ax [Simplify right side]
> 2 = 1 [divide both sides by ax]
>
> Of course we can't divide by zero, which is precisely what happens in the
> last step.
Actually I think I proved this with one of
my early PC programming experiments. I programmed
it to "divide N by zero", and yes, the PC sat there
for an *infinitely* long time.... I think other PC
programmers may have duplicated my test results,
Microsoft have done some astounding research in
this field... ;o)
Roman

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding'
2001\06\03@053058
by
Roman Black

Andrew Warren wrote:
{Quote hidden}> oo m
>  9  9
> 0.999... = >  = lim > 
>  10^n m>oo  10^n
> n=1 n=1
>
> Choose epsilon > 0. Suppose delta = 1/log_10 epsilon, thus
> epsilon = 10^(1/delta). For every m>1/delta we have that
>
>  m 
>   9  1 1
>  >   1  =  <  = epsilon
>   10^n  10^m 10^(1/delta)
>  n=1 
>
> So by the (epsilondelta) definition of the limit we have
>
> m
>  9
> lim >  = 1
> m>oo  10^n
> n=1
>
> Does that make it clearer?
Hmmm. I feel like the child in the "emperors new
clothes". These experts all backing each other up re
what they agree is "right". Sort of like politicians
but with better formulas. ;o)
Surely any child could point out that with the
0.9999 issue that ANY POSSIBLE STEP can only reduce
the error to a smaller amount. The *number* of steps
is completely confusing and superfluous, the error
must always exist as there is NO POSSIBLE STEP
that can eliminate the error, only reduce it a bit
more. And you really don't need impressive formulas
to understand that reality? :o)
Roman

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: Brain Burp Rounding??'
2001\06\03@090310
by
Bob Ammerman

 Original Message 
From: "David VanHorn" <spam_OUTdvanhornspam.....CEDAR.NET>
To: <PICLIST.....@spam@MITVMA.MIT.EDU>
Sent: Sunday, June 03, 2001 12:58 AM
Subject: Re: [OT]: Brain Burp Rounding??
> At 12:18 AM 6/3/01 0400, Bob Ammerman wrote:
> >Dave,
> >
> >The point is that it does _not_ take patience.
> >
> >.9 repeating is already an _infinite_ series. Not just a "sorta infinite
as
> >long as you want to go on" series.
>
> At each point, it evaluates to <1. Repeating it in smaller steps forever
> doesn't change that.
> Show me the point at which it changes, and evaluates to 1.
It doesn't change at any given step, yet, _after_ infinite steps (if one can
comprehend that), in the _limit_ that is its value.
> I know, it's infinitely far away, and it can never be reached, but if you
> wish real hard...
> >Its value is exactly 1.
Show me where infinity is and I'll show you the 'point' you are looking for.
>
> Can you show any physical thing that requires this to be true?
>
Obviously not, physical reality is limited by Heisenburg, quantum effects,
etc.
>
> 
> Dave's Engineering Page: http://www.dvanhorn.org
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding'
2001\06\03@092443
by
Bob Ammerman

>
> Surely any child could point out that with the
> 0.9999 issue that ANY POSSIBLE STEP can only reduce
> the error to a smaller amount. The *number* of steps
> is completely confusing and superfluous, the error
> must always exist as there is NO POSSIBLE STEP
> that can eliminate the error, only reduce it a bit
> more. And you really don't need impressive formulas
> to understand that reality? :o)
> Roman
Roman, thank you. You gave me the words to deal with this.
Above, you said:
"The *number* of steps is completely confusing and superfluous"
However, 'infinitely many steps' is _not_ a number of steps. Rather it is
the process carried out for (if I may) an _infinite_ number of steps.
Remember: 'infinity' is not a number, its a concept.
That is the difference.
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: Brain Burp Rounding??'
2001\06\03@095955
by
Alexandre Domingos F. Souza
'[OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding'
2001\06\03@110451
by
David W. Gulley
Earlier in this thread, the most simple (IMO)) proof that
0.999(Repeating) = 1 was shown using no magic, mirrors or divides by 0.
There are 3 thirds in a whole (ie 3*(1/3) = 1)
and, 1/3 = 0.33333333(repeating forever) (divide it out and see!)
Multiply that by 3 and get 0.99999999(repeating forever) (try it!)
Therefore 1 = 0.99999999(repeating forever)
It may be uncomfortable, but it is true!
Show me any flaw, trick, or error in this example.
David W. Gulley
Destiny Designs

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@112351
by
Alexandre Domingos F. Souza

>Earlier in this thread, the most simple (IMO)) proof that
>0.999(Repeating) = 1 was shown using no magic, mirrors or divides by 0.
> There are 3 thirds in a whole (ie 3*(1/3) = 1)
> and, 1/3 = 0.33333333(repeating forever) (divide it out and see!)
> Multiply that by 3 and get 0.99999999(repeating forever) (try it!)
> Therefore 1 = 0.99999999(repeating forever)
>It may be uncomfortable, but it is true!
>Show me any flaw, trick, or error in this example.
It seems to be something like "angel's gender" but let's revise it.
When you part one something MATERIAL (numbers aren't material, they just TRY to represent it), you get three thirds. One equals another. That's ok.
When you divide the number one, by three, you get ALMOST three equal parts. ALMOST because a calculator cannot represent the part who tend to infinity. If you divide something physical, you can get all three parts with the same volume or weight. But a calculator cannot represent this.
When you bring these three parts togheter (ops, where is my english lexican?) it becomes 1 again. But in a calculator, that ROUND NUMBERS PER SE, it will not bring you the same result. It's valid for any calcule that brings the "dizima periodica" (anyone who speaks portuguese, can tell me how we say this expression in english? It means the infinite .33333333 of the 1/3), because a calculator has a limit of HOW FAR can it store numbers.
So, I think it's nice to speak that 0.9999999999999 TENDS to 1. But it can never be 1.
And of course, In my HP48 I trust :o) And it gives me 0.99999999999999 when I multiply 0.33333333333 x 3 :o)
8<Corte aqui8<
Alexandre Souza
EraseMEtaito.....terra.com.br
http://planeta.terra.com.br/lazer/pinball/
8<Corte aqui8<

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@112409
by
David Covick

You trust your calculator? :)
 Original Message 
From: "David W. Gulley" <spamdgulleyKILLspam@spam@DESTINYDESIGNS.COM>
To: <PICLISTspamTakeThisOuTMITVMA.MIT.EDU>
Sent: Sunday, June 03, 2001 7:57 AM
Subject: Re: [OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding??")
{Quote hidden}> Earlier in this thread, the most simple (IMO)) proof that
> 0.999(Repeating) = 1 was shown using no magic, mirrors or divides by 0.
>
> There are 3 thirds in a whole (ie 3*(1/3) = 1)
> and, 1/3 = 0.33333333(repeating forever) (divide it out and see!)
> Multiply that by 3 and get 0.99999999(repeating forever) (try it!)
>
> Therefore 1 = 0.99999999(repeating forever)
>
> It may be uncomfortable, but it is true!
>
> Show me any flaw, trick, or error in this example.
>
> David W. Gulley
> Destiny Designs
>
> 
>
http://www.piclist.com hint: The PICList is archived three different
> ways. See
http://www.piclist.com/#archives for details.
>
>
>

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@113013
by
Alexandre Domingos F. Souza
2001\06\03@121951
by
michael brown

 Original Message 
From: "David W. Gulley" <TakeThisOuTdgulley@spam@@spam@DESTINYDESIGNS.COM>
To: <TakeThisOuTPICLISTspamMITVMA.MIT.EDU>
Sent: Sunday, June 03, 2001 9:57 AM
Subject: Re: [OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding??")
{Quote hidden}> Earlier in this thread, the most simple (IMO)) proof that
> 0.999(Repeating) = 1 was shown using no magic, mirrors or divides by 0.
>
> There are 3 thirds in a whole (ie 3*(1/3) = 1)
> and, 1/3 = 0.33333333(repeating forever) (divide it out and see!)
> Multiply that by 3 and get 0.99999999(repeating forever) (try it!)
>
> Therefore 1 = 0.99999999(repeating forever)
>
> It may be uncomfortable, but it is true!
>
> Show me any flaw, trick, or error in this example.
IMnotsoHO the only flaw here is that many simple ratios cannot be precisely
represented by decimal notation. But (being ignorant and hard headed) I
still fail to see how this proves anything except that decimal notation is
sometimes imprecise. I guess it only serves to show that mathematics (much
like statistics) can be used (and abused) to show that anything is true.
Sort of like geometry, being based on axioms and postulates, where we
"assume" that certain basics are true. Then we take these things and
extrapolate further information using "proofs". How can we really say that
these "proofs" prove anything, when they are entirely based upon assumptions
(granted that these assumptions have never been shown to be false, yet). I
realize that this is more philosophy than math but I cannot resist. ;D
When taken to an extreme simple logic, reasoning and mathematics can be
shown to fall apart. Mathematical infinity is such an extreme. Taking
Kepler's laws of motion as an example, they worked fine most of the time
(until simple observation of Mercury indicated that something was critically
wrong). Enter Albert Einstein who showed us why they didn't always work,
while introducing a new world of paradox's and problems such as parallel
lines that eventually meet. Even the socalled "Big Bang Theory" relies on
an "assumption" that during the first miniscule amount of time after the
bang that all of the apparant "laws" of physics and quantum mechanics were
somehow not in effect. Mathematics is flawed, plain and simple.
Demonstrating these flaws and then arguing about them probably serves no
practical purpose. However without debate and questioning advancement will
not occur. Standing up and shouting that something is true because an FAQ
says so is not proof, neither is a mathematical proof necessarily equal to
absolute truth. Nothing has ever really been proved, only temporarily shown
to be apparantly true. As time rolls on we find that their seems to always
be an exception to the rule. Reality is not (and never has been) what
mathematics tells us that it is. Mathematics (like a yard stick) is a
wonderful tool, but it does not dictate absolute truth. It seems that the
only thing that is sure is that we can never be absolutely sure (only sure
until someone "proves" that we are not). At any given time througout
history, there exists at least one known mathematical paradox. This seems
to serve the purpose of contiunally reminding us that something is
fundamentaly wrong with our reasoning. If people didn't question apparant
truth we would all still be living on a flat earth in a geocentric universe.
michael the fool
(not trying to upset anyone, just trying to stimulate some neurons and
healthy debate)
>
> David W. Gulley
> Destiny Designs

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: Brain Burp Rounding??'
2001\06\03@130049
by
David VanHorn
>
>I'm with Dave on this one. Sqrt of 1 = i "i"  that amazingly
>ridiculous, nonexistant value that allows mathematicians to continue on
>creating even more ridiculous mathematics coming up with answers that don't
>(can't) exist.
Hold on there. Sqrt 1 is a valuable tool, but it is an imaginary number.

Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding'
2001\06\03@131810
by
Byron A Jeff
On Sun, Jun 03, 2001 at 12:22:50PM 0300, Alexandre Domingos F. Souza wrote:
> >Earlier in this thread, the most simple (IMO)) proof that
> >0.999(Repeating) = 1 was shown using no magic, mirrors or divides by 0.
> > There are 3 thirds in a whole (ie 3*(1/3) = 1)
> > and, 1/3 = 0.33333333(repeating forever) (divide it out and see!)
> > Multiply that by 3 and get 0.99999999(repeating forever) (try it!)
> > Therefore 1 = 0.99999999(repeating forever)
> >It may be uncomfortable, but it is true!
> >Show me any flaw, trick, or error in this example.
>
> It seems to be something like "angel's gender" but let's revise it.
>
> When you part one something MATERIAL (numbers aren't material, they just TRY to represent it), you get three thirds. One equals another. That's ok.
>
> When you divide the number one, by three, you get ALMOST three equal parts. ALMOST because a calculator cannot represent the part who tend to infinity. If you divide something physical, you can get all three parts with the same volume or weight. But a calculator cannot represent this.
>
But this is exactly the point. When you divide the number 1 by 3 you get
exactly (note EXACTLY!!!!) 3 equal parts. However the representation of that
exactly is .3 (repeating).
Everyone is getting confused by the repeating. "There is a difference at
every step therefore there must be a difference at the 'infinite' step." is
close to the quote I've read in this thread.
There is no infinite step. The threes stop ending at the same place that
you find the biggest integer! Now would anyone care to discuss what the
biggest integer is?
The repeating series is the only way to represent the value exactly. Any
attempt to cut off the repeating and it's no longer an exact representation.
You have to take the baby with the bathwater. 1/3 is exactly .3 (repeating) and
three times each value is 1 and .9 (repeating) which are exactly (note
EXACTLY!!!) the same.
And no finite string of 3's or 9's, no matter how long the string is is
exactly equal to the infinitely repeating string. And that's why this works.
Any attempt to make the string finite gives a value less than the exact value.
However the infinite string is the exact value.
Let's consider a couple of cases. Consider two numbers x1 and x2. x1 is
exactly equal to 9 (repeating). x2 is equal to 2^1024 9's after the decimal
point (a lot of 9's to be sure). Now we should be able to agree on a couple
of things.
1) That x1 > x2. x1 has more 9's than x2, so it's bigger.
2) That 10*x2  x2 is less than 9. Consider:
10 * 0.9999 (2^1024 of them) = 9.99999 (2^1024  1 9's after decimal point)
(x2) 0.99999 (2^1024 9's after decimal point)

8.99999 (2^1024 1 9's and a 1 on the end)
No problem right? Now do the same with x1 and you see the difference.
10 * .9 (repeating) = 9.9 (repeating)
0.9 (repeating)

9.0 (repeating)
Now the difference is that since in both cases the .9 (repeating) are exactly
the same. That's the difference with infinity. Arithmetic operations on
infinity result with exactly equal infinite values. That's the catch. With
any finite string, multiplying by 10 and subtracting has a difference however
small. But the same operation on a infinite string gives no, zero, 0 , nada
difference. Not an infintessimally small difference. NO DIFFERENCE!!! It's
like trying to define the smallest real number larger than 0. That number is
0. Sounds strange, but it's true because the limit of an infinite series
approching 0 is 0.
Everyone who's arguing the difference between the sum of an infinite series
and the limit of the series isn't getting that when you deal with infinity
there is no end, therefore there is no difference.
Just remember that to justify your argument you must, absolutely must, be
able to define the largest integer. Once you can do that, then everything
else falls into place.
Good luck. ;)
> When you bring these three parts togheter (ops, where is my english lexican?) it becomes 1 again. But in a calculator, that ROUND NUMBERS PER SE, it will not bring you the same result. It's valid for any calcule that brings the "dizima periodica" (anyone who speaks portuguese, can tell me how we say this expression in english? It means the infinite .33333333 of the 1/3), because a calculator has a limit of HOW FAR can it store numbers.
>
> So, I think it's nice to speak that 0.9999999999999 TENDS to 1. But it can never be 1.
>
> And of course, In my HP48 I trust :o) And it gives me 0.99999999999999 when I multiply 0.33333333333 x 3 :o)
>
Calculators don't help. They're finite. Infinity has different rules than
finite. I'm sure your calculator also has a largest integer or real that it
can store. So does that mean that the next larger integer or real (which
clearly does exist) does not actually exist because your calculator says so.
So to summarize. 1/3 = .3 (repeating). 3*(1/3) = 3 * .3 (repeating). Therefore
1 = .9 (repeating). End of story.
And by the way if you fell compelled to refute this argument, please bring
along the largest possible integer with you. You'll need it.
BAJ

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@132214
by
Alexandre Domingos F. Souza
2001\06\03@134459
by
Sebastian Garcia

 Earlier in this thread, the most simple (IMO)) proof that
 0.999(Repeating) = 1 was shown using no magic, mirrors or divides by 0.
 There are 3 thirds in a whole (ie 3*(1/3) = 1)
 and, 1/3 = 0.33333333(repeating forever) (divide it out and see!)
 Multiply that by 3 and get 0.99999999(repeating forever) (try it!)
 Therefore 1 = 0.99999999(repeating forever)
 It may be uncomfortable, but it is true!
Hi,
Leaving behind calculators and computers, mathematically "it can be proof"
(i'm not doing that in this post)that the following are two different
decimal series development for the same number:
1) 1
2) 0.99999999... (infinite periodic digits)
A quick view: Starting with, for example, the number: 0.999 and "appending"
by steps a 9 to the rightmost digit, the number obtained step by step is
greater. You can find in every step infinite real numbers between the
number obtained and 1. Remember that in the real set of numbers, there's
always an infinite quantity of numbers between two different numbers. This
is not what it happens in the limit, You can't find infinite (in fact, You
can't find *any* number...) real numbers between 0.999... and 1.
So the mathematical proof of the equality is based on showing that between
0.9999... and 1 there's not an infinite quantity of real numbers.
Best regards,
S.

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: Brain Burp Rounding??'
2001\06\03@135116
by
Byron A Jeff
On Sat, Jun 02, 2001 at 08:03:04PM 0500, David VanHorn wrote:
{Quote hidden}> At 07:39 PM 6/2/01 0500, michael brown wrote:
> > Original Message 
> >From: "Thomas McGahee" <
spamBeGonetom_mcgaheeKILLspamSIGMAIS.COM>
> >To: <
PICLIST@spam@KILLspamMITVMA.MIT.EDU>
> >Sent: Saturday, June 02, 2001 11:19 AM
> >Subject: Re: [OT]: Brain Burp Rounding??
> >
> >
> > > Sigh.... I did not say .99999 I said .99999 REPEATING.
> > > As in **forever**.
> > >
> > > Do not get confused between the VALUE of a number and its
> > > representation. Whether you like it or not, mathematically the mumber
> > > 1 exactly equals .9 repeating.
>
> hold on jack..
>
> That's as nonsensical as saying that 2=3 for large values of 2.
>
> I have a problem with that.
>
> 0.99(followed by any finite or infinite number of nines) is by definition,
> not equal to 1.0
>
> The value of 0.99(inf..) is less than 1.0 by an infinitely small (but
> nonzero) amount.
Dave,
You need some infinity training. Let's try a few examples:
1) What's the largest integer?
2) What's the value of 1/0?
2A) What's the value of 1/infinity?
3) What's the smallest real number larger than 0? (BTW that's the answer to
your question above)
4) Pick any two real numbers. How many real numbers are between the two?
5) What's the last digit of PI?
It's a simple mathematical fact that once you start dealing with infinity
the rules change. You find your difference above in the same place as the
largest integer and the smallest number bigger than 0. The answer is
infinity and 0. The last one sounds incongruous, but true. That's the nature
of infinity. 1/infinity doesn't approch zero. It doesn't approximate zero. It
isn't infinitely close to zero. IT IS ZERO! EXACTLY ZERO!
There is no difference between 1 and .9 (repeating). Not in infantisimal
difference. No difference. They are the same number. Of course any attempt
to make an infinite value finite make it lose it's infiniteness.
All of this fuss is over trying to attribute infinity to an approximation.
We use approximations to gain understanding in our little finite minds!
But you have to cross over and realize that once something is defined as
infinite, it is no longer an approximation of anything. It's exact.
And the math that works on infinity fails once you express finiteness on it.
The best treatment on the subject I ever read was Issac Asimov's "Asimov on
Numbers". He has several essay's on the nature of infinity.
Just remember that whenever you're having an infinity discussion, that you must
bring the largest integer to the table. Once you know that integer, the rest
is easy.
BAJ

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding'
2001\06\03@165134
by
Bill Westfield
What about the math proof someone posted a while ago...
x = .999...
10*x = 9.999...
9*x = 10*x  x (the infinite .9999 cleanly subtract from one another >)
9*x = 9.999...  .999... = 9.0
x = 1
No divisions by zero or other mathdestroying magic required...
BillW

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@173818
by
Jinx
> What about the math proof someone posted a while ago...
>
> x = .999...
>10*x = 9.999...
> 9*x = 10*x  x (the infinite .9999 cleanly subtract from one
> another >)
> 9*x = 9.999...  .999... = 9.0
> x = 1
>
> No divisions by zero or other mathdestroying magic required...
>
> BillW
Making something look like something else isn't how "I" define
proof. I'll be blunt and say that type of mathematical manipulation
is just card tricks. And as for "a miss is as good as a mile", look
at the number of particle smashes needed to detect neutrinos or
other subatomic bits, which are far far smaller than atoms. How
many headon collisions were an infinitely small "that much" off ?
But understand that I'm quite comfortable with the fact that there
is a mathematical world and a physical world

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@181128
by
Mg
 Original Message 
From: "Jinx"
> But understand that I'm quite comfortable with the fact that there
> is a mathematical world and a physical world
This concept can be seen in 'Donald Duck in Mathematical World'! :)
Mg

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
2001\06\03@232440
by
M. Adam Davis

Reminds me of a mathematician and an engineer in the same class, where
the teacher presents the problem:
Suppose a beautiful woman (or man, take your pick ;) is opposite a
room from you, and you can approach her/him with the restriction that
each movement can only halve the distance between you and her/him. Will
you ever reach her/him?
The mathematician responds:
No. You may get infinetely close, but you will never reach her/him.
The engineer responds:
You will get close enough for most intents or purposes...
Of course, conceptually, 0.999... does not equal one. It equals
0.999.... But using calculus and other methods you see that 0.999...
approaches 1, and, for all intents and purposes, is equal to 1. It
really depends on what level of precision one is asking for. If one
want infinite precision then one cannot say that 0.999... = 1 unless one
can prove that 0.999... approaches one faster than the needed precision
approaches infinity.
But this is all academic, and is akin to proving that the chicken came
before the eggroll. If anyone wants to prove me wrong, then sit down
and write a 0, a decimal point, an infinite series of nines, and equal
sign, and a one (no shorthand, please!) before hitting reply.
Adam

http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
'[OT]: Brain Burp Rounding??'
2001\06\04@022854
by
Russell McMahon
'[OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding'
2001\06\04@042543
by
Andrew Warren

David VanHorn <RemoveMEPICLISTspamEraseMEMITVMA.MIT.EDU> wrote:
> I'm sorry it's so upsetting to you.
Thanks, Dave. I don't know WHY this thread makes me so crazy 
it really shouldn't  but I just can't help it. I know you're
not deliberately trolling for an argument.
> 0.9 is different from 1 by a tenth part.
> 0.99, by a hundredth.
Ok, maybe it's easier if we turn the original assertion around:
What if I said that the DEFINITION of "infinite" is "the number
of 9s you'd have to append to 0.9 in order to make that number
equal to 1"? Would that make sense?
Perhaps you could look at it in this casual, commonsense way:
If 0.999... APPROACHES 1 as the number of 9s APPROACHES infinity,
then 0.999... EQUALS 1 when the number of 9s EQUALS infinity.
Do either of those approaches help?
> It seems that it all hinges on what infinity means
Well, yeah.
> people like Feynman and Hawking are having trouble with
> calculations where infinity pops in
Feynman hasn't been having trouble with ANY calculations since
he died, and if Hawking could speak, I'm pretty sure he'd tell
you that 0.999... is equal to 1.
> I'm not bothered that it causes me trouble.
That's fine... But the fact that you have difficulty with the
concept isn't a good reason to assert that mathematics is wrong.
> It wasn't that long ago that "zero" didn't exist in mathmatics.
"Zero" has ALWAYS existed in mathematics: "If Julius has X
apples, and he gives III to Brutus and VII to Biggus Dickus, how
many apples remain?"
It's just the "0" SYMBOL which hasn't always existed.
> I'm sure the scholars of that day thought their mathematics was
> quite complete and correct as well.
That's an argument AGAINST your point of view, not for it.
Andy
=== Andrew Warren  STOPspamfastfwd.....ix.netcom.com
=== Fast Forward Engineering  San Diego, CA
=== http://www.geocities.com/SiliconValley/2499

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservRemoveMERemoveMEmitvma.mit.edu with SET PICList DIGEST in the body
'[OT]: Brain Burp Rounding??'
2001\06\04@044703
by
uter van ooijen & floortje hanneman
'[OT]: ENOUGH! (was: "Re: [OT]: Brain Burp Rounding'
2001\06\04@044706
by
uter van ooijen & floortje hanneman
2001\06\04@044709
by
uter van ooijen & floortje hanneman
> > The value of 0.99(inf..) is less than 1.0 y an infinitely small (but
> > nonzero) amount.
> 11Q: Why is 0.9999... = 1?
Mathematically speaking the propositions "The value of 0.99... is less than
1.0 by an infinitely small amount" and "0.99... = 1" are the same! Maybe
that helps to understand a counterintuitive fact... Infinitely small must
be interstand as "when I name an amount, *any amount at all*, the infinitely
small number is still smaller". Think of infinitely small as a very verbose
(but very usefull) way of specifying zero. In fact it is this way of
thinking about zero (or equality) that makes calculus possible.
Wouter

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamlistservspamspammitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@123552
by
David VanHorn

>
> What if I said that the DEFINITION of "infinite" is "the number
> of 9s you'd have to append to 0.9 in order to make that number
> equal to 1"? Would that make sense?
No.
If, at any point we can just say "aw to hell with it, it's almost 1, so
it's 1", I have a problem with that.
However, as a tool in calculus, to allow calculations that wouldn't
otherwise be possible, and with the proviso that we are approximating, and
not exactly calculating an answer, I have no problem with it.
The root problem here appears to be that there some numbers which the
decimal system is ill equipped to represent, in a manner similar to roman
numerals having problems with large numbers, only in a deeper manner.
1/3 is easy to deal with, but can't be represented with complete accuracy
in decimal form.
> Perhaps you could look at it in this casual, commonsense way:
>
> If 0.999... APPROACHES 1 as the number of 9s APPROACHES infinity,
Ok
> then 0.999... EQUALS 1 when the number of 9s EQUALS infinity.
No.
I see no requirement that it do so.
> Feynman hasn't been having trouble with ANY calculations since
> he died, and if Hawking could speak, I'm pretty sure he'd tell
> you that 0.999... is equal to 1.
For any practical matter, yes.
However, in an absolute sense, this is just sweeping some ugliness under
the carpet.
> > It wasn't that long ago that "zero" didn't exist in mathmatics.
>
> "Zero" has ALWAYS existed in mathematics: "If Julius has X
> apples, and he gives III to Brutus and VII to Biggus Dickus, how
> many apples remain?"
If you can't represent it, then you can't do calculations with it.

Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservKILLspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@131343
by
Jeff DeMaagd

 Original Message 
From: David VanHorn <TakeThisOuTdvanhornspamCEDAR.NET>
> > Perhaps you could look at it in this casual, commonsense way:
> >
> > If 0.999... APPROACHES 1 as the number of 9s APPROACHES infinity,
>
> Ok
>
> > then 0.999... EQUALS 1 when the number of 9s EQUALS infinity.
>
> No.
> I see no requirement that it do so.
>
> > Feynman hasn't been having trouble with ANY calculations since
> > he died, and if Hawking could speak, I'm pretty sure he'd tell
> > you that 0.999... is equal to 1.
>
> For any practical matter, yes.
> However, in an absolute sense, this is just sweeping some ugliness under
> the carpet.
I haven't seen this used in this thread, so I'll describe it this way, as my
old college calc prof used this as his example, try this:
Using decimal representations:
1/3 = .33333333333 (to infinity)
1/3 * 3 = .3333333333 * 3 = .99999999999 (to infinity)
However, using fracional simplification:
1/3 * 3 = 3/3 = 1/1 = 1
Therefore 1 = .9999999999 (to infinity)
Is that good enough for you?
> If you can't represent it, then you can't do calculations with it.
What is wrong with the overbar? Are you requiring all numeric
representations be in decimal? So I can't use Pi in any of my calculations?
e? i?
Jeff

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservmitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@132226
by
David VanHorn

>
>1/3 * 3 = .3333333333 * 3 = .99999999999 (to infinity)
>
>However, using fracional simplification:
>1/3 * 3 = 3/3 = 1/1 = 1
>
>Therefore 1 = .9999999999 (to infinity)
>
>Is that good enough for you?
Works for me.
It's just awkward to represent in decimal
The fractions don't "simplify" it, they are a better representation.
Simplification implying discarding accuracy to achieve an end.
I'll agree with 1 = the sum of the infinite series 0.999.. strictly as a
simplification, because the result isn't likely to be significantly different.
But I don't agree that 1 = 0.999...
The key point is that by making the first statement, you are defining what
"sum of the infinite series" means, not stating the equality 1 = 0.999...
> > If you can't represent it, then you can't do calculations with it.
>
>What is wrong with the overbar? Are you requiring all numeric
>representations be in decimal? So I can't use Pi in any of my calculations?
>e? i?
'Snot what I said.
1/3 is a precise representation, 0.3333 isn't
PI works, 3.141... isn't precise.
When you force any of these trancendentals into decimal form, you can't
represent them accurately. It's a fundamental limitation of the decimal form.

Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservEraseMEmitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@134408
by
eter William Green
so in a nutshell
_
1/(10.9)=infinity
1/infinity=0
therefore
_
10.9 = 0 ?
it's certainly not intuitive but i think it is true. also seems pretty academic for practical purposes.
it would be interesting to look at this thread (well the rounding thread) from a point of view of how many siginificant digits do i need so that i'm not significantly biasing my calculations ie: my robot won't be off course more than a 1" after traveling 20' using my optical encoder or accelerometer or whatever.
is anybody still reading this thread? :)
pete
On Mon, 4 Jun 2001, Jeff DeMaagd wrote:
> {Original Message removed}
2001\06\04@135241
by
Dal Wheeler
 Original Message 
From: Peter William Green <spamBeGonepwgreenspam_OUT.....ENGINEERING.UIOWA.EDU>
> it would be interesting to look at this thread (well the rounding thread)
from a point of view of how many siginificant digits do i need so that i'm
not significantly biasing my calculations ie: my robot won't be off course
more than a 1" after traveling 20' using my optical encoder or accelerometer
or whatever.
Well, that kind of depends on how complex your computations are and how
loose the mechanical tolerances are on your robots (mechanical error vs.
round off error). My robots don't need many significant digits at all...
:')
Dal

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamlistservmitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@141942
by
Paul Hutchinson

First, I'd like to thank everyone for their comments on this topic. They
have made me review and rethink the basic concepts of mathematics in
general. I've spent way too much time in the past few days rereading text
books and searching for other texts on the various fundamental algebraic
operations, definitions and, axioms. However, I don't consider this wasted
time because I firmly believe that blind faith in anything is bad and, I
have not reviewed the fundamentals in the past decade or two.
I especially would like to thank Dave V. for the link to Swarthmore Colleges
excellent Dr. Math project. http://forum.swarthmore.edu/dr.math
There is only one thing I feel comfortable stating with 100% certainty after
my research and review.
If you are a student and the question of, does .999... = 1, comes up on a
test, answer Yes.
I could not find one single reference by any professor/teacher/school
district/college or university that would allow you to answer no and be
given credit for a correct answer. The most complete web resource for info
on this topic I found is,
http://forum.swarthmore.edu/dr.math/faq/faq.0.9999.html. If you read the
page be sure to also read the five linked pages at the end of the FAQ
answer.
> The root problem here appears to be that there some numbers which the
> decimal system is ill equipped to represent, in a manner similar to roman
> numerals having problems with large numbers, only in a deeper manner.
>
> 1/3 is easy to deal with, but can't be represented with complete accuracy
> in decimal form.
This statement has brought much needed closure in my mind as to what the
objections are to the simple algebraic proof I presented in a post last
week. I had been wondering what step(s) in the proof were potentially
flawed. From this statement I see that the disagreement comes with the very
first statement of the proof.
"Given:
x = 0.9(repeating)"
The problem is that repeating decimals are considered by some to not be
accurate representations of numbers like 1/3. This statement appears to be
somewhat supported by the work of Georg Cantor from the late 19th century.
For 1/3 to be <> 0.333... all that needs to be true is that long division
does not work in some cases. Personally I don't believe this but to my mind
it is certainly possible that at some point in the future this may be proven
to be the case. After all similar events have happened regularly throughout
the course of human history. For those interested I recommend James Burkes,
"The Day the Universe Changed" either the book or television series from the
mid 1980's.
I have decided that in the future if a question regarding repeating decimal
representations of fractions comes up on the PICLIST, I will ask if the
questioner believes that 0.333... = 1/3. If they do I'll try to help but if
they don't I'll ask that the question be restated without the need for
repeating decimals before attempting to help.
Paul
PS  I was a bit shocked by some of the assertions that mathematics is all
magic tricks, I had thought that everyone accepted mathematics as the
official language of science and felt there was no magic to it. I do expect
people to look skeptically at things but to attribute magic to anything is
way more than I can accept.

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservKILLspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@142928
by
David VanHorn

>
>The problem is that repeating decimals are considered by some to not be
>accurate representations of numbers like 1/3. This statement appears to be
>somewhat supported by the work of Georg Cantor from the late 19th century.
>For 1/3 to be <> 0.333... all that needs to be true is that long division
>does not work in some cases.
:) Work it out, and let me know what you get :)
I would assert that it does not work here, since you can't ever finish the
problem.
Feel free to prove me wrong, but show your work. <VBG>
> Personally I don't believe this but to my mind
>it is certainly possible that at some point in the future this may be proven
>to be the case. After all similar events have happened regularly throughout
>the course of human history. For those interested I recommend James Burkes,
>"The Day the Universe Changed" either the book or television series from the
>mid 1980's.
I'm in agreement here.
Science guides us into theories and systems that are imperfect, but
workable representations of how the universe works. As time progresses, we
refine our theories and systems.
>PS  I was a bit shocked by some of the assertions that mathematics is all
>magic tricks, I had thought that everyone accepted mathematics as the
>official language of science and felt there was no magic to it. I do expect
>people to look skeptically at things but to attribute magic to anything is
>way more than I can accept.
I don't think it's "magic" or anything of the sort. Just a convenient way
to deal with inconvenient numbers. It works, till something better comes
along.

Dave's Engineering Page: http://www.dvanhorn.org
I would have a link to FINDU here in my signature line, but due to the
inability of sysadmins at TELOCITY to differentiate a signature line from
the text of an email, I am forbidden to have it.

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@144020
by
Paul Hutchinson
> I don't think it's "magic" or anything of the sort. Just a convenient way
> to deal with inconvenient numbers. It works, till something better comes
> along.
I'm very sorry, I should have stated that you where completely excluded from
this final comment (since I had mentioned you by name earlier in the post).
I found your arguments to be excellent with absolutely no hints of anything
mystical.
It was some other members who made statements like this including one that
actually said "mathematical manipulation is just card tricks".
Again, sorry for unintentionally implying that you where in that group.
Paul

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservmitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@144524
by
Byron A Jeff
On Sun, Jun 03, 2001 at 11:22:48PM 0400, M. Adam Davis wrote:
>
> Of course, conceptually, 0.999... does not equal one.
Nope. It equals 1. No intents or purposes necessary.
> It equals
> 0.999.... But using calculus and other methods you see that 0.999...
> approaches 1, and, for all intents and purposes, is equal to 1. It
> really depends on what level of precision one is asking for.
> If one
> want infinite precision then one cannot say that 0.999... = 1 unless one
> can prove that 0.999... approaches one faster than the needed precision
> approaches infinity.
Precision implies finiteness. It implies that there will be a cutoff of the
9's at some point in the string.
The 9's end at the same place that the largest possible integer resides. Care
to define that number?
>
> But this is all academic, and is akin to proving that the chicken came
> before the eggroll. If anyone wants to prove me wrong, then sit down
> and write a 0, a decimal point, an infinite series of nines, and equal
> sign, and a one (no shorthand, please!) before hitting reply.
There's no need for that. The term 0.9 (repeating) is a sufficient
representation for that infinite series. Folks here are failing to grasp that
mathematics for infinity doesn't follow normal finite mathematicl rules.
Equations as simple as 'infinity*2 = infinity' are completely nonsensical
for nonfinite values but true for infinity. Any argument for precision or
truncation of infinity is akin to stating that 'The largest integer is x.'
There's simply to truth to that statement.
In infinity arithmatic 0.9 (repeating) = 1. Not approximates. No approches.
No precision. No error. The proof has been given in this thread multiple times.
I really liked the argument I saw yesterday. I'll repeat it and ask if anyone
can propose a solution: "If 0.9 (repeating) < 1, then there are an infinite
number of real numbers that exists between 0.9 (repeating) and 1. Give one
such number."
And try as you might, you'll find that there is no such number. You'll find
in your search that no matter what number you pick, it will not be between
0.9 (repeating) and 1. Therefore the two values must be the same because not
only can you not define an infinite number of real numbers between the two,
you can't even pick one.
There's no pretense here. Infinity mathematics is exact. Not approximations.
It doesn't exist in the real world, only in the concepts of our minds.
So for the refuters you now need to bring two items to the table. The largest
possible integer, and a number between 0.9 (repeating) and 1.
Good luck.
BAJ

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspam_OUTspammitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@174151
by
Bill Westfield
Heh. Next we should argue about
lim sin(x)/x = 1
x>0
Lots of signal theory being based on sine waves, this is probably
of more practical application (?) And it's even less intuitive.
:)
BillW

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@175626
by
Peter L. Peres
I think that one of the fundamental laws of arithmetics says that a number
is only equal to itself. This includes rational numbers (like 0.(9) and
1). This means that 1 != 0.(9) by definition. Proving this is rather
interesting (i.e. I missed that class). I believe that it can be reduced
to absurdum somehow.
Peter

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistserv.....mitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@180041
by
Jinx
> one that actually said "mathematical manipulation is just card tricks"
It wasn't meant to imply any sort of chicanery or mumbo jumbo. David
VanHorn put it better. " I don't think it's "magic" or anything of the sort.
Just a convenient way to deal with inconvenient numbers. It works, till
something better comes along". It's just how these convoluted means
to an end look to a mathematical outsider

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listserv@spam@mitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@185516
by
Bill Westfield
I think that one of the fundamental laws of arithmetics says that a number
is only equal to itself. This includes rational numbers (like 0.(9) and
1). This means that 1 != 0.(9) by definition.
But ".999 repeating" is not a "number", per se. It's shorthand for an
algorithm that produces a value (that happens to be 1.0)
BillW

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservmitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@195048
by
Russell McMahon
> 'Snot what I said.
> 1/3 is a precise representation, 0.3333 isn't
> PI works, 3.141... isn't precise.
Full circle!!! :)
This is where this topic started.
Pi to 4 significant figures / 2 decimal places should be 3.142 as hammered
out in brain burp rounding.
(But I know you knew that and it wasn't the point you were making)
Quite coincidentally, Pi for most any engineering purpose is 355/113
High by about 0.00000026676...
Easy to remember 113355 and split it in two and divide.
Courtesy HP long ago.
Russell McMahon

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservRemoveMEmitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@201839
by
michael brown
> Easy to remember 113355 and split it in two and divide.
> Courtesy HP long ago.
>
OH NO another thing to remember. ;D I'll pass on this and continue
recalling what I already learned about pi. 3.1415926585 (PS I didn't cheat,
this is off the top of my head. So I could be wrong!) If I ever need more
precision than this I will just look it up. ;D I doubt that I ever will,
since this is more than accurate enough to navigate to the moon should I
ever build a Pic controlled spacecraft. Thanks everyone! It's been fun. I
love a good argument. I'm still not convinced though. TTYL

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamlistservmitvma.mit.edu with SET PICList DIGEST in the body
2001\06\04@203601
by
Bob Barr
Russell McMahon wrote:
<snip>
>Quite coincidentally, Pi for most any engineering purpose is 355/113
>High by about 0.00000026676...
>Easy to remember 113355 and split it in two and divide.
>Courtesy HP long ago.
>
>
Depending on the accuracy required, 22/7 can work also. While not as
accurate as 355/113, it's only high by about 0.001264489... (about 0.04%). I
find the 22/7 easier to remember. :=)
Courtesy of a Forth Interest Group member, also long ago.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspam_OUTTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body
2001\06\05@014016
by
Bill Westfield
2001\06\05@015521
by
David VanHorn
2001\06\05@021942
by
Russell McMahon

> >Quite coincidentally, Pi for most any engineering purpose is 355/113
> >High by about 0.00000026676...
> >Easy to remember 113355 and split it in two and divide.
> >Courtesy HP long ago.
> >
> >
> Depending on the accuracy required, 22/7 can work also. While not as
> accurate as 355/113, it's only high by about 0.001264489... (about 0.04%).
I
> find the 22/7 easier to remember. :=)
> Courtesy of a Forth Interest Group member, also long ago.
Seriously, I think 113355 is easier for those who have no real grasp of what
is going on but want to use Pi. I have met a few.
Some cannot remember 22/7 and have no idea what the 'real" number is.
You take them down the "11 33 55" path and drum the pattern in.
All odd numbers, Isn't that odd etc,
Then just divide in two and divide larger by smaller.
113355
355/113
bingo.
I personally just remember it to 14 places (which is where my brain decided
to stop for reasons known only to itself) which has been good enough fro
everything so far. 3.14159265358979
More than any Engineer will ever need.
RM

http://www.piclist.com hint: To leave the PICList
@spam@piclistunsubscriberequestspam_OUTmitvma.mit.edu
2001\06\05@045436
by
Roman Black
Russell McMahon wrote:
> Seriously, I think 113355 is easier for those who have no real grasp of what
> is going on but want to use Pi. I have met a few.
> Some cannot remember 22/7 and have no idea what the 'real" number is.
> I personally just remember it to 14 places (which is where my brain decided
> to stop for reasons known only to itself) which has been good enough fro
> everything so far. 3.14159265358979
>
> More than any Engineer will ever need.
Ha ha! This is like the nerd olympics! See who
knows Pi to the most decimal places! ;o)
(no offense meant Russell!)
Gee I don't even own a calculator that I could
type that number into. <grin>
Roman

http://www.piclist.com hint: To leave the PICList
.....piclistunsubscriberequest.....mitvma.mit.edu
2001\06\05@070531
by
Bob Ammerman
> > I personally just remember it to 14 places (which is where my brain
decided
> > to stop for reasons known only to itself) which has been good enough fro
> > everything so far. 3.14159265358979
> Gee I don't even own a calculator that I could
> type that number into. <grin>
> Roman
Yes you do, if you have Windoze.
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)

http://www.piclist.com hint: To leave the PICList
spampiclistunsubscriberequestKILLspammitvma.mit.edu
2001\06\05@072024
by
Spehro Pefhany
2001\06\05@073106
by
Wendy J Olend
2001\06\05@084013
by
Spehro Pefhany
2001\06\05@094200
by
Bob Ammerman

Well, we all pick on the Indiana legislature for this, but I'm pretty sure
the whole thing was a spoof even when it happened. Here is an excerpt from
the bill:
<QUOTE>
Section 3 In further proof of the value of the author's proposed
contribution to education and offered as a gift to the State of Indiana, is
the fact of his solutions of the trisection of the angle, duplication of the
cube and quadrature of the circle having been already accepted as
contributions to science by the American Mathematical Monthly, the leading
exponent of mathematical thought in this country. And be it remembered that
these noted problems had been long since given up by scientific bodies as
insolvable mysteries and above man's ability to comprehend.
</QUOTE>
Given that, IIRC, it has been _proven_ that trisection of an angle is
impossible (and I think the other items listed also); it seems to me that
this whole thing was done tongueincheek.
Bob Ammerman
RAm Systems
(contract development of high performance, high function, lowlevel
software)
{Original Message removed}
More... (looser matching)
 Last day of these posts
 In 2001
, 2002 only
 Today
 New search...