Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Commodore » C= Homestead » Re: trig tables
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: trig tables [message #287208] Sat, 04 April 2015 12:34 Go to next message
Jim Brain is currently offline  Jim Brain
Messages: 962
Registered: August 2012
Karma: 0
Senior Member
On 4/4/2015 8:57 AM, Lnda Tnnr wrote:
> Hi All:
> I'm writing a little program that requires the use of trig. tables.
> It could be written very quickly in such a way that the result
> produced will then necessitate looking up in trig. tables to find my
> angle.
Any reason why the calculation could not be added to the program to
calculate the angle given the inputs?
>
> But I want it to be rather idiot friendly and would like to be able to
> have those tables in the computer and readily accessible. Does anyone
> have the tables already on disk? Or already stored in some file in
> their uIEC?
You should be able to copy this from the web
(http://math2.org/math/trig/tables.htm) to a file on your PC, convert it
to text on the way, and then read it into the 64 with uIEC or something.
>
> I'm supposedly retired and have all this free time, so I suppose I
> could sit down with a trig. book and laboriously input each and every
> one of the thousands of numbers, but, is there an easier way?
> Thanks all,
> Linda
>
>
>
> -----------------------------------------------------
> HOMESTEAD
> -----------------------------------------------------
> List Admin: Robert Bernardo
> rbernardo@iglou.com
>
> List Help rbernardo@iglou.com
> Add 'help' in the subject or message body. _______________________________________________
> Homestead mailing list
> Homestead@robertbernardo.com
> http://robertbernardo.com/mailman/listinfo/homestead_robertb ernardo.com


--
Jim Brain
brain@jbrain.com
www.jbrain.com



-----------------------------------------------------
HOMESTEAD
-----------------------------------------------------
List Admin: Robert Bernardo
rbernardo@iglou.com

List Help rbernardo@iglou.com
Add 'help' in the subject or message body. _______________________________________________
Homestead mailing list
Homestead@robertbernardo.com
http://robertbernardo.com/mailman/listinfo/homestead_robertb ernardo.com

Re: trig tables [message #287216 is a reply to message #287208] Sat, 04 April 2015 12:59 Go to previous messageGo to next message
Terry Raymond is currently offline  Terry Raymond
Messages: 316
Registered: August 2012
Karma: 0
Senior Member
Hi Jim And Linda,

Sorry to interrupt

Linda have you changed your email address I had tried last fall to send you
the
uiec procedure for booting GEOS but my email wouldnt go thru to you so just
wondering
if you had changed your email address possibly?

Enjoying retirement eh :-D

And if youre still interested in booting GEOS on your uiec.

All the best,

Terry Raymond
-------------------

On Saturday, April 4, 2015, Jim Brain <brain@jbrain.com> wrote:

> On 4/4/2015 8:57 AM, Lnda Tnnr wrote:
>
> Hi All:
> I'm writing a little program that requires the use of trig. tables. It
> could be written very quickly in such a way that the result produced will
> then necessitate looking up in trig. tables to find my angle.
>
> Any reason why the calculation could not be added to the program to
> calculate the angle given the inputs?
>
>
> But I want it to be rather idiot friendly and would like to be able to
> have those tables in the computer and readily accessible. Does anyone have
> the tables already on disk? Or already stored in some file in their uIEC?
>
> You should be able to copy this from the web (
> http://math2.org/math/trig/tables.htm) to a file on your PC, convert it
> to text on the way, and then read it into the 64 with uIEC or something.
>
>
> I'm supposedly retired and have all this free time, so I suppose I could
> sit down with a trig. book and laboriously input each and every one of the
> thousands of numbers, but, is there an easier way?
> Thanks all,
> Linda
>
>
>
> -----------------------------------------------------
> HOMESTEAD
> -----------------------------------------------------
> List Admin: Robert Bernardo
> rbernardo@iglou.com <javascript:_e(%7B%7D,'cvml','rbernardo@iglou.com');>
>
> List Help rbernardo@iglou.com <javascript:_e(%7B%7D,'cvml','rbernardo@iglou.com');>
> Add 'help' in the subject or message body. _______________________________________________
> Homestead mailing listHomestead@robertbernardo.com <javascript:_e(%7B%7D,'cvml','Homestead@robertbernardo.com');> http://robertbernardo.com/mailman/listinfo/homestead_robertb ernardo.com
>
>
>
> --
> Jim Brainbrain@jbrain.com <javascript:_e(%7B%7D,'cvml','brain@jbrain.com');> www.jbrain.com
>
>

--
Sent from Gmail Mobile


-----------------------------------------------------
HOMESTEAD
-----------------------------------------------------
List Admin: Robert Bernardo
rbernardo@iglou.com

List Help rbernardo@iglou.com
Add 'help' in the subject or message body. _______________________________________________
Homestead mailing list
Homestead@robertbernardo.com
http://robertbernardo.com/mailman/listinfo/homestead_robertb ernardo.com

Re: trig tables [message #287277 is a reply to message #287208] Sun, 05 April 2015 21:33 Go to previous messageGo to next message
Marc Walters is currently offline  Marc Walters
Messages: 33
Registered: November 2012
Karma: 0
Member
Treat it as an opportunity to further develop your programming skills.
Here are my thoughts on the matter:

REQUIREMENT
A set of pre-calculated Sin, Cos and Tan values indexed by angle.

RUNTIME STORAGE
Assuming the program is written in BASIC, you'll need to keep it simple.
Store the lookup data for Sin, Cos and Tan in a single arrays and use
the angle as the index.
The following line would fetch the correct Sin for a given angle:
LET CurrentSin = SinArray( CurrentAngle )

However, arrays are limited to 256 values, so consider the following
alternatives:

A) Store just the values for angles 0 to 45. Use conditional tests and a
bit of math to derive the correct value for angles beyond 45 degrees.
This saves memory at the expense of speed.

B) Reduce the accuracy in some way. For example, by half - store only
even-numbered values.
The following line would then fetch the Sin for a given angle:
LET CurrentSin = SinArray( INT( CurrentAngle / 2 ) )

C) Spread the 360 values across two arrays then either use a conditional
test to choose which array to get the value from, or do it
programmatically by fetching the value from both arrays on the same line.

POPULATE THE ARRAYS
It's probably easier to generate and store the values when the program
begins. There will be a wait regardless of whether the arrays are filled
from using the inbuilt BASIC trig functions or from data statements. The
use of data statements will be faster.

On 5/04/2015 12:57 AM, Lnda Tnnr wrote:
> Hi All:
> I'm writing a little program that requires the use of trig. tables. It
> could be written very quickly in such a way that the result produced
> will then necessitate looking up in trig. tables to find my angle.
>
> But I want it to be rather idiot friendly and would like to be able to
> have those tables in the computer and readily accessible. Does anyone
> have the tables already on disk? Or already stored in some file in
> their uIEC?
>
> I'm supposedly retired and have all this free time, so I suppose I could
> sit down with a trig. book and laboriously input each and every one of
> the thousands of numbers, but, is there an easier way?
> Thanks all,
> Linda


-----------------------------------------------------
HOMESTEAD
-----------------------------------------------------
List Admin: Robert Bernardo
rbernardo@iglou.com

List Help rbernardo@iglou.com
Add 'help' in the subject or message body. _______________________________________________
Homestead mailing list
Homestead@robertbernardo.com
http://robertbernardo.com/mailman/listinfo/homestead_robertb ernardo.com
Re: trig tables [message #287302 is a reply to message #287277] Mon, 06 April 2015 12:24 Go to previous messageGo to next message
David Wood is currently offline  David Wood
Messages: 9
Registered: August 2012
Karma: 0
Junior Member
Or use a two-dimensional array, say dim trig(89,3) and divide the angle by
4 to get the second element. This assumes you're measuring in degrees but
could be scaled for radians etc.

On Sun, Apr 5, 2015 at 9:33 PM, Marc Walters <mwalters@hunter.apana.org.au>
wrote:

> Treat it as an opportunity to further develop your programming skills.
> Here are my thoughts on the matter:
>
> REQUIREMENT
> A set of pre-calculated Sin, Cos and Tan values indexed by angle.
>
> RUNTIME STORAGE
> Assuming the program is written in BASIC, you'll need to keep it simple.
> Store the lookup data for Sin, Cos and Tan in a single arrays and use the
> angle as the index.
> The following line would fetch the correct Sin for a given angle:
> LET CurrentSin = SinArray( CurrentAngle )
>
> However, arrays are limited to 256 values, so consider the following
> alternatives:
>
> A) Store just the values for angles 0 to 45. Use conditional tests and a
> bit of math to derive the correct value for angles beyond 45 degrees. This
> saves memory at the expense of speed.
>
> B) Reduce the accuracy in some way. For example, by half - store only
> even-numbered values.
> The following line would then fetch the Sin for a given angle:
> LET CurrentSin = SinArray( INT( CurrentAngle / 2 ) )
>
> C) Spread the 360 values across two arrays then either use a conditional
> test to choose which array to get the value from, or do it programmatically
> by fetching the value from both arrays on the same line.
>
> POPULATE THE ARRAYS
> It's probably easier to generate and store the values when the program
> begins. There will be a wait regardless of whether the arrays are filled
> from using the inbuilt BASIC trig functions or from data statements. The
> use of data statements will be faster.
>
> On 5/04/2015 12:57 AM, Lnda Tnnr wrote:
>
>> Hi All:
>> I'm writing a little program that requires the use of trig. tables. It
>> could be written very quickly in such a way that the result produced
>> will then necessitate looking up in trig. tables to find my angle.
>>
>> But I want it to be rather idiot friendly and would like to be able to
>> have those tables in the computer and readily accessible. Does anyone
>> have the tables already on disk? Or already stored in some file in
>> their uIEC?
>>
>> I'm supposedly retired and have all this free time, so I suppose I could
>> sit down with a trig. book and laboriously input each and every one of
>> the thousands of numbers, but, is there an easier way?
>> Thanks all,
>> Linda
>>
>
>
> -----------------------------------------------------
> HOMESTEAD
> -----------------------------------------------------
> List Admin: Robert Bernardo
> rbernardo@iglou.com
>
> List Help rbernardo@iglou.com
> Add 'help' in the subject or message body.
> _______________________________________________
> Homestead mailing list
> Homestead@robertbernardo.com
> http://robertbernardo.com/mailman/listinfo/homestead_robertb ernardo.com
>


-----------------------------------------------------
HOMESTEAD
-----------------------------------------------------
List Admin: Robert Bernardo
rbernardo@iglou.com

List Help rbernardo@iglou.com
Add 'help' in the subject or message body. _______________________________________________
Homestead mailing list
Homestead@robertbernardo.com
http://robertbernardo.com/mailman/listinfo/homestead_robertb ernardo.com

Re: trig tables [message #287303 is a reply to message #287302] Mon, 06 April 2015 12:24 Go to previous message
David Wood is currently offline  David Wood
Messages: 9
Registered: August 2012
Karma: 0
Junior Member
Allow me to correct myself: divide the angle by 90 :P

On Mon, Apr 6, 2015 at 12:24 PM, David Wood <jbevren@gmail.com> wrote:

> Or use a two-dimensional array, say dim trig(89,3) and divide the angle by
> 4 to get the second element. This assumes you're measuring in degrees but
> could be scaled for radians etc.
>
> On Sun, Apr 5, 2015 at 9:33 PM, Marc Walters <mwalters@hunter.apana.org.au
>> wrote:
>
>> Treat it as an opportunity to further develop your programming skills.
>> Here are my thoughts on the matter:
>>
>> REQUIREMENT
>> A set of pre-calculated Sin, Cos and Tan values indexed by angle.
>>
>> RUNTIME STORAGE
>> Assuming the program is written in BASIC, you'll need to keep it simple.
>> Store the lookup data for Sin, Cos and Tan in a single arrays and use the
>> angle as the index.
>> The following line would fetch the correct Sin for a given angle:
>> LET CurrentSin = SinArray( CurrentAngle )
>>
>> However, arrays are limited to 256 values, so consider the following
>> alternatives:
>>
>> A) Store just the values for angles 0 to 45. Use conditional tests and a
>> bit of math to derive the correct value for angles beyond 45 degrees. This
>> saves memory at the expense of speed.
>>
>> B) Reduce the accuracy in some way. For example, by half - store only
>> even-numbered values.
>> The following line would then fetch the Sin for a given angle:
>> LET CurrentSin = SinArray( INT( CurrentAngle / 2 ) )
>>
>> C) Spread the 360 values across two arrays then either use a conditional
>> test to choose which array to get the value from, or do it programmatically
>> by fetching the value from both arrays on the same line.
>>
>> POPULATE THE ARRAYS
>> It's probably easier to generate and store the values when the program
>> begins. There will be a wait regardless of whether the arrays are filled
>> from using the inbuilt BASIC trig functions or from data statements. The
>> use of data statements will be faster.
>>
>> On 5/04/2015 12:57 AM, Lnda Tnnr wrote:
>>
>>> Hi All:
>>> I'm writing a little program that requires the use of trig. tables. It
>>> could be written very quickly in such a way that the result produced
>>> will then necessitate looking up in trig. tables to find my angle.
>>>
>>> But I want it to be rather idiot friendly and would like to be able to
>>> have those tables in the computer and readily accessible. Does anyone
>>> have the tables already on disk? Or already stored in some file in
>>> their uIEC?
>>>
>>> I'm supposedly retired and have all this free time, so I suppose I could
>>> sit down with a trig. book and laboriously input each and every one of
>>> the thousands of numbers, but, is there an easier way?
>>> Thanks all,
>>> Linda
>>>
>>
>>
>> -----------------------------------------------------
>> HOMESTEAD
>> -----------------------------------------------------
>> List Admin: Robert Bernardo
>> rbernardo@iglou.com
>>
>> List Help rbernardo@iglou.com
>> Add 'help' in the subject or message body.
>> _______________________________________________
>> Homestead mailing list
>> Homestead@robertbernardo.com
>> http://robertbernardo.com/mailman/listinfo/homestead_robertb ernardo.com
>>
>
>


-----------------------------------------------------
HOMESTEAD
-----------------------------------------------------
List Admin: Robert Bernardo
rbernardo@iglou.com

List Help rbernardo@iglou.com
Add 'help' in the subject or message body. _______________________________________________
Homestead mailing list
Homestead@robertbernardo.com
http://robertbernardo.com/mailman/listinfo/homestead_robertb ernardo.com

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Lyon Labs
Next Topic: Error accessing Lyon Labs website
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Apr 16 04:55:32 EDT 2024

Total time taken to generate the page: 0.07019 seconds