Floating-Point Representations; Figure 2.2: Internal Ti Bcd Floating-Point Representation - Texas Instruments TI-89 Software Manual

Sierra c assembler
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Section 2: Compiler
include file (tiams.h) supplied with the TI-89 / TI-92 Plus SDK, BCD16 has been
defined as double, and should be used when coding applications as a reminder
that routines containing floating-point operations may not be portable code.
2.9.4.

Floating-Point Representations

All TI BCD floating points are 10 byte objects. The first two bytes in the TI BCD
floating-point format are the mantissa sign and exponent. The mantissa sign is
the most significant bit of that word (1=negative, 0=positive) and the other 15 bits
are a 0x4000 biased exponent, where a value less than 0x4000 represents a
negative exponent, and a value greater than 0x4000 represents a positive
exponent. The memory address of a floating-point data object is the address of
the first byte of the sign/exponent. The decimal point is assumed to be after the
first BCD mantissa digit. The mantissa consists of 16 BCD digits, with digits 15
and 16 always equal to 0 in a float.
double and float
Low address
2 bytes
0x4000 biased
exp and sign
Following are some examples of common floating-point values shown as if
written in 68000 assembly language:
_PI:
.word
.long
_FPZERO:
.word
.long
_FPPT001:
.word
.long
_FPPTFIVE:
.word
.long
_FPONE:
.word
.long
_FPNEG1:
.word
.long
_FPTEN:
.word
.long
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual
MSD
1 . . .
16 digit mantissa (digits 15 and 16=0 for float)
Figure 2.2: Internal TI BCD Floating
0x4000
0x31415926,0x53589793
0x4000
0,0
0x3FFD
0x10000000,0
0x3FFF
0x50000000,0
0x4000
0x10000000,0
0xC000
0x10000000,0
0x4001
0x10000000,0
8 bytes
Point Representation
-
; 3.141592653589793
; 0
; .001
; .5
; 1
; -1
; 10
Not for Distribution
61
High Address
LSD
. . . 15
16
Beta Version February 2, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-89 plusTi-92 plus

Table of Contents