﻿ Tangent?
19 June, 2013, 19:31:23
 OmnomIRC You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

 Pages: 1 [2]   Go Down
 Author Topic: Tangent? -  (Read 855 times) 0 Members and 1 Guest are viewing this topic.
Builderboy
Physics Guru

Offline

Gender:
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645

Total Post Ratings: +589

 « Reply #15 on: 17 May, 2012, 22:09:17 » 0

Consider for a second the range of the tangent function.  It ranges from -Infinite to +Infinite, and a large portion of the range is between -1 and 1.  If we were to ignore the *256, and simply take the ratio of Sin(angle)/Cos(angle), our function would return 0 for that portion of the range, as Axe cannot represent fractional numbers.  Obviously this is highly undesirable, so before we divide, we multiply by 256.  This is what is known as 8.8 fixed point notation.  In 8.8 fixed point, 256 is treated as 1, and this way, we can represent fractional numbers.  128 for example would represent 0.5.
 Logged

C0deH4cker

Offline

Gender:
Last Login: 19 December, 2012, 22:22:42
Date Registered: 18 October, 2011, 23:19:08
Location: \$9D95
Posts: 258

Total Post Ratings: +10

 « Reply #16 on: 23 May, 2012, 05:18:26 » 0

Alright, I get it now. Thanks for the explanation. I am not used to working with platforms that do not contain easy to use floating point variables, so fixed-point and other types of arithmetic inflation are new to me.
 Logged

 Pages: 1 [2]   Go Up