EasyManuals Logo

Casio ClassPad 300 Programming Guide

Casio ClassPad 300
125 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #83 background imageLoading...
Page #83 background image
Using Floating-Point Values with the ClassPad
The ClassPad does not support the use of double data types. Instead, the ClassPad has a
native representation of doubles called BCD.
There are two types of BCDs: OBCD and CBCD. OBCD is used to represent real
numbers, whereas CBCD is used to represent complex numbers. We will look at using
OBCD numbers first and then look at CBCD numbers.
OBCD Data Structure
The structure of an OBCD is defined as:
typedef struct obcd_ {
unsigned char mantissa[IM_CAL_INDIGIT];
unsigned short exponential;
} OBCD_;
typedef union obcd {
OBCD_ obcd1;
unsigned long dummy[3];
} OBCD;
The mantissa of a number is stored in obcd1.mantissa. The mantissa is 10 bytes long,
with the least significant 2 bytes reserved for system use. The most significant nibble is
reserved for a flag. There is also a 2 byte exponent that is stored in a short. The entire
structure looks like this:
eF 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 eS e1 e2 e3
Flag Mantissa reserved Exponent
OBCD Flag
The most significant nibble of the mantissa is reserved for a flag. When this flag is non-
zero it means there is a non-numeric value in the OBCD. The possible values for the flag
and the meaning are described in the following table:
flag Meaning
0 There is a decimal value in mantissa
4 Infinity if the exponent is 0x1000 or negative infinity is the exponent is 0x6000
8 The value is undefined
9 True
a False
f Error
Here are some examples of OBCD values that have the flag set to a value other than 0.
83

Table of Contents

Other manuals for Casio ClassPad 300

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Casio ClassPad 300 and is the answer not in the manual?

Casio ClassPad 300 Specifications

General IconGeneral
BrandCasio
ModelClassPad 300
CategoryCalculator
LanguageEnglish

Related product manuals