1 / 4

NUMERICAL METHODS M. Antczak , S. Wąsik

NUMERICAL METHODS M. Antczak , S. Wąsik. Floating point numbers are coded with using equation x = s * 2 c * m , where s – sign (+1,-1) c – attribute (integer value) m – floating point <1/2; 1). Example :. / 2. -2 =. -1 * 2 0 * 2. -1 * 2 1 * 1. / 2. -1 * 2 2 * 1/2.

necia
Download Presentation

NUMERICAL METHODS M. Antczak , S. Wąsik

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NUMERICAL METHODS M. Antczak, S. Wąsik

  2. Floating point numbers are coded with using equation • x = s * 2c * m, • where • s – sign (+1,-1) • c – attribute (integer value) • m – floating point <1/2; 1) Example: / 2 -2 = -1 * 20 * 2 -1 * 21 * 1 / 2 -1 * 22 * 1/2 s = -1 c = 2 m=1/2

  3. Binaryrepresentation of floating point b1b2b3b4… • m = b1/2 + b2/4 + b3/8 + .. + bt/2t • where • t – number of bits Example (t = 5 bits): ≥ Yes 1 0 ≥ No ≥ Yes 1 0 0 ≥ No Finally: 10100 0 0 ≥ No

  4. Recurrence function example: recurrencestoppingcondition recurrencerule Example: n = 5 => silnia(5)  5 * silnia(4)  120  24  4 * silnia(3)  6  3 * silnia(2)  2 * silnia(1)  2  1

More Related