Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgContentJComments has a deprecated constructor in /var/www/astarmathsandphysics/plugins/content/jcomments/jcomments.php on line 25 Call Stack: 0.0001 362456 1. {main}() /var/www/astarmathsandphysics/index.php:0 0.0793 1213304 2. Joomla\CMS\Application\SiteApplication->execute() /var/www/astarmathsandphysics/index.php:49 0.0793 1213304 3. Joomla\CMS\Application\SiteApplication->doExecute() /var/www/astarmathsandphysics/libraries/src/Application/CMSApplication.php:267 0.1479 4200008 4. Joomla\CMS\Application\SiteApplication->dispatch() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:233 0.1491 4227672 5. Joomla\CMS\Component\ComponentHelper::renderComponent() /var/www/astarmathsandphysics/libraries/src/Application/SiteApplication.php:194 0.1498 4245384 6. Joomla\CMS\Component\ComponentHelper::executeComponent() /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:356 0.1500 4275904 7. require_once('/var/www/astarmathsandphysics/components/com_content/content.php') /var/www/astarmathsandphysics/libraries/src/Component/ComponentHelper.php:381 0.1510 4298624 8. ContentController->execute() /var/www/astarmathsandphysics/components/com_content/content.php:42 0.1510 4298624 9. ContentController->display() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:710 0.2126 4984528 10. ContentController->display() /var/www/astarmathsandphysics/components/com_content/controller.php:113 0.2162 5176680 11. Joomla\CMS\Cache\Controller\ViewController->get() /var/www/astarmathsandphysics/libraries/src/MVC/Controller/BaseController.php:663 0.2167 5197608 12. ContentViewArticle->display() /var/www/astarmathsandphysics/libraries/src/Cache/Controller/ViewController.php:102 0.2272 5414120 13. Joomla\CMS\Plugin\PluginHelper::importPlugin() /var/www/astarmathsandphysics/components/com_content/views/article/view.html.php:189 0.2272 5414376 14. Joomla\CMS\Plugin\PluginHelper::import() /var/www/astarmathsandphysics/libraries/src/Plugin/PluginHelper.php:182

Computer Arithmetic

Consider a computer that uses 20-bit floating point numbers of the form

with a 1-bit sign indicator,a 7-bit exponent,and a 12-bit mantissa,stored as binary numbers. The most significant bit of the mantissa must be 1.is a bias subtracted from n to

represent both positive and negative exponents.

Note thatfor positive numbers andfor negative numbers and the maximum value of the 7-bit exponent isi.e.

The length of the exponent controls the range of numbers that can be represented. To ensure

however that numbers with small magnitude can be represented as accurately as numbers with

large amplitude, we subtract the biasfrom the exponentThus, the effective

range of the exponent is notbut

The minimum value ofand its maximum value isThus,

The absolute value of the largest oating point number that can

be stored in the computer isComputations involving larger numbers, e.g.produce an overow error.

The smaller absolute number that can be stored isSimilarly computations involving smaller numbers, e.g.produce an underflow error.

 

Consider the number represented by

Sign

Exponent

Mantissa

0

1001001

110100010011

That is

The sign indicator is 0, i.e. the number is positive.

The exponent isso the effective exponenti.e.

The mantissa gives

So, the machine number represents

The next floating point number that we can store in this machine is

Sign

Exponent

Mantissa

0

1001001

110100010100

The sign and the exponent remain unchanged and we simply add 1 to the least significant bit of the mantissa. The new number isso our primitive computer would be unable to store exactly any number between 836.75 and 837, leading to a relative uncertainty equal to

At worst, the relative uncertainty in the value of floating point numbers that this primitive computer can store is equal to

Suppose that we perform a calculation to which the answer is

There are two ways to approximate this:

1. the most accurate is rounding to the nearest floating point number,

2. Many computers simply chop off the expression at the bit length of the mantissa

and ignore the extra digits, giving an answer of