epd/epd.c File Reference

Arithmetic functions with extended double precision. More...

#include <math.h>
#include "util.h"
#include "epdInt.h"
Include dependency graph for epd.c:

Functions

EpDoubleEpdAlloc (void)
 Allocates an EpDouble struct.
int EpdCmp (const void *key1, const void *key2)
 Compares two EpDouble struct.
void EpdFree (EpDouble *epd)
 Frees an EpDouble struct.
void EpdGetString (EpDouble const *epd, char *str)
 Converts an extended precision double value to a string.
void EpdConvert (double value, EpDouble *epd)
 Converts double to EpDouble struct.
void EpdMultiply (EpDouble *epd1, double value)
 Multiplies an extended precision double by a double.
void EpdMultiply2 (EpDouble *epd1, EpDouble const *epd2)
 Multiplies an extended precision double by another.
void EpdMultiply2Decimal (EpDouble *epd1, EpDouble const *epd2)
 Multiplies two extended precision double values.
void EpdMultiply3 (EpDouble const *epd1, EpDouble const *epd2, EpDouble *epd3)
 Multiplies two extended precision double values.
void EpdMultiply3Decimal (EpDouble const *epd1, EpDouble const *epd2, EpDouble *epd3)
 Multiplies two extended precision double values.
void EpdDivide (EpDouble *epd1, double value)
 Divides an extended precision double by a double.
void EpdDivide2 (EpDouble *epd1, EpDouble const *epd2)
 Divides an extended precision double by another.
void EpdDivide3 (EpDouble const *epd1, EpDouble const *epd2, EpDouble *epd3)
 Divides two extended precision double values.
void EpdAdd (EpDouble *epd1, double value)
 Adds a double to an extended precision double.
void EpdAdd2 (EpDouble *epd1, EpDouble const *epd2)
 Adds an extended precision double to another.
void EpdAdd3 (EpDouble const *epd1, EpDouble const *epd2, EpDouble *epd3)
 Adds two extended precision double values.
void EpdSubtract (EpDouble *epd1, double value)
 Subtracts a double from an extended precision double.
void EpdSubtract2 (EpDouble *epd1, EpDouble const *epd2)
 Subtracts an extended precision double from another.
void EpdSubtract3 (EpDouble const *epd1, EpDouble const *epd2, EpDouble *epd3)
 Subtracts two extended precision double values.
void EpdPow2 (int n, EpDouble *epd)
 Computes extended precision pow of base 2.
void EpdPow2Decimal (int n, EpDouble *epd)
 Computes extended precision pow of base 2.
void EpdNormalize (EpDouble *epd)
 Normalize an extended precision double value.
void EpdNormalizeDecimal (EpDouble *epd)
 Normalize an extended precision double value.
void EpdGetValueAndDecimalExponent (EpDouble const *epd, double *value, int *exponent)
 Returns value and decimal exponent of EpDouble.
int EpdGetExponent (double value)
 Returns the exponent value of a double.
int EpdGetExponentDecimal (double value)
 Returns the decimal exponent value of a double.
void EpdMakeInf (EpDouble *epd, int sign)
 Makes EpDouble Inf.
void EpdMakeZero (EpDouble *epd, int sign)
 Makes EpDouble Zero.
void EpdMakeNan (EpDouble *epd)
 Makes EpDouble NaN.
void EpdCopy (EpDouble const *from, EpDouble *to)
 Copies an EpDouble struct.
int EpdIsInf (EpDouble const *epd)
 Checks whether the value is Inf.
int EpdIsZero (EpDouble const *epd)
 Checks whether the value is Zero.
int EpdIsNan (EpDouble const *epd)
 Checks whether the value is NaN.
int EpdIsNanOrInf (EpDouble const *epd)
 Checks whether the value is NaN or Inf.
int IsInfDouble (double value)
 Checks whether the value is Inf.
int IsNanDouble (double value)
 Checks whether the value is NaN.
int IsNanOrInfDouble (double value)
 Checks whether the value is NaN or Inf.

Detailed Description

Arithmetic functions with extended double precision.

Author:
In-Ho Moon

Copyright (c) 1995-2015, Regents of the University of Colorado

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the University of Colorado nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Function Documentation

void EpdAdd2 ( EpDouble epd1,
EpDouble const *  epd2 
)

Adds an extended precision double to another.

The sum goes in the first argument.

int EpdCmp ( const void *  key1,
const void *  key2 
)

Compares two EpDouble struct.

Returns:
0 if the two structures hold the same value; 1 otherwise.
void EpdGetString ( EpDouble const *  epd,
char *  str 
)

Converts an extended precision double value to a string.

Side effects
The string is written at the address passed in `str`.
void EpdMultiply3 ( EpDouble const *  epd1,
EpDouble const *  epd2,
EpDouble epd3 
)

Multiplies two extended precision double values.

The result goes in the third operand.

 All Data Structures Files Functions Variables Typedefs Enumerations Defines

Generated on 31 Dec 2015 for cudd by  doxygen 1.6.1