///////////////////////////////////////////////////////////////////////////////
//                             Lisaac Library                                //
//                                                                           //
//                   LSIIT - ULP - CNRS - INRIA - FRANCE                     //
//                                                                           //
//   This program is free software: you can redistribute it and/or modify    //
//   it under the terms of the GNU General Public License as published by    //
//   the Free Software Foundation, either version 3 of the License, or       //
//   (at your option) any later version.                                     //
//                                                                           //
//   This program is distributed in the hope that it will be useful,         //
//   but WITHOUT ANY WARRANTY; without even the implied warranty of          //
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           //
//   GNU General Public License for more details.                            //
//                                                                           //
//   You should have received a copy of the GNU General Public License       //
//   along with this program.  If not, see <http://www.gnu.org/licenses/>.   //
//                                                                           //
//                     http://isaacproject.u-strasbg.fr/                     //
///////////////////////////////////////////////////////////////////////////////
Section Header
  
  + name    := FLOAT_MAP80;
    
  - comment := "Mapping for REAL_80.";
    
Section Inherit
  
  - parent_float_map:FLOAT_MAP := FLOAT_MAP;
  
Section Mapping
  
  + exp_16:UINTEGER_16;
  + man_64:UINTEGER_64;
  
Section REAL, REAL_32, REAL_64, REAL_80
    
  - get_map f:SELF <-
  ( + tab:NATIVE_ARRAY[SELF];
    tab := CONVERT[FLOAT_MAP80,NATIVE_ARRAY[SELF]].on FLOAT_MAP80;
    tab.put f to 0;        
  );
    
  - sign:BOOLEAN         <- (exp_16 >> 15) = 0; // TRUE if positif, FALSE else.
  
  - exponent:UINTEGER_32 <- exp_16 & 07F_FFh;
  
  - mantissa:UINTEGER_64 <- man_64;
  
Section Public

  //
  // Format.
  //
  
  - mantissa_bits:INTEGER_8 := 64;

  - exponent_bits:INTEGER_8 := 15;
  
