HP-UX Floating-Point Guide
26 Chapter 1
Introduction
Overview of HP-UX Math Libraries
When you compile a program on a PA2.0 system at HP-UX Release 11.0,
the compiler by default generates PA2.0N code. To generate PA2.0W
code, you need to specify the +DA2.0W option (see “Selecting Different
Versions of the Math Libraries” on page 27).
All HP 9000 systems except the oldest Series 800 systems are
PA1.1-based or PA2.0-based. If you do not know your system’s
architecture type, see “Determining Your System’s Architecture Type” on
page 26.
For complete information about the math libraries, see Chapter 4.
Determining Your System’s Architecture Type
There are two main ways to find the architecture type of your system. To
do it from the command line:
1. Issue the command uname -m to learn the model number of your
system. For example:
$ uname -m
9000/879
2. Look up the second part of the model number in the file
/opt/langtools/lib/sched.models to find its architecture type.
For example:
$ grep 879 /opt/langtools/lib/sched.models
879 2.0 PA8000
The 2.0 indicates that a Model 879 is PA2.0-based.
You can also learn the system architecture type at run time. A simple
program that gives you useful information follows.
Sample Program: get_arch.c
#include <stdio.h>
#include <sys/utsname.h>
extern int _SYSTEM_ID;
extern int _CPU_REVISION;
struct utsname uts;
int main(void)
{
uname(&uts);
printf(“Release = %s\n”, uts.release);
printf(“_SYSTEM_ID = %x\n”, _SYSTEM_ID);
printf(“_CPU_REVISION = %x\n”, _CPU_REVISION);
}