Setting the Floating-Point Environment

This function lets you change the Floating Point Status and Control Register ( FPSCR). It sets the FPSCR to its argument and returns the original value of the FPSCR.

This function is not available if you select the None option button in the EPPC Processor settings panel.

float 

  __setflm(float);
  

shows how to set and restore the FPSCR.

Listing 1. Example of setting the FPSCR
double old_fpscr;

/* Clear flag/exception/mode bits, save original settings */
oldfpscr = __setflm(0.0); 
/* Peform some floating-point operations */

__setflm(old_fpscr); /* Restores the FPSCR */