diff options
author | John Hauser <jhauser@eecs.berkeley.edu> | 2016-07-22 18:04:32 -0700 |
---|---|---|
committer | John Hauser <jhauser@eecs.berkeley.edu> | 2016-07-22 18:04:32 -0700 |
commit | ddfb9e70c434ae238635784ce66cb7ed93d0a2e7 (patch) | |
tree | 3502b5d96dcdbc5ad0c16c00caf4cd21428314b3 /source/uint128.h | |
parent | 11a6a656c7651695deacfdcda9c5d80fdbc05fee (diff) | |
download | berkeley-testfloat-3-ddfb9e70c434ae238635784ce66cb7ed93d0a2e7.zip berkeley-testfloat-3-ddfb9e70c434ae238635784ce66cb7ed93d0a2e7.tar.gz berkeley-testfloat-3-ddfb9e70c434ae238635784ce66cb7ed93d0a2e7.tar.bz2 |
Release 3b. See "doc/TestFloat-history.html".
Diffstat (limited to 'source/uint128.h')
-rw-r--r-- | source/uint128.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/uint128.h b/source/uint128.h index fefadbd..0f433bb 100644 --- a/source/uint128.h +++ b/source/uint128.h @@ -1,12 +1,12 @@ /*============================================================================ -This C header file is part of TestFloat, Release 3a, a package of programs for +This C header file is part of TestFloat, Release 3b, a package of programs for testing the correctness of floating-point arithmetic complying with the IEEE Standard for Floating-Point, by John R. Hauser. -Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. -All rights reserved. +Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of +California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -47,6 +47,8 @@ struct uint128 { uint64_t v0, v64; }; struct uint128 { uint64_t v64, v0; }; #endif +#ifdef INLINE + INLINE bool eq128( struct uint128 a, struct uint128 b ) { return (a.v64 == b.v64) && (a.v0 == b.v0); } @@ -56,6 +58,14 @@ INLINE bool le128( struct uint128 a, struct uint128 b ) INLINE bool lt128( struct uint128 a, struct uint128 b ) { return (a.v64 < b.v64) || ((a.v64 == b.v64) && (a.v0 < b.v0)); } +#else + +bool eq128( struct uint128, struct uint128 ); +bool le128( struct uint128, struct uint128 ); +bool lt128( struct uint128, struct uint128 ); + +#endif + struct uint128 shortShiftLeft128( struct uint128, int ); struct uint128 shortShiftRight128( struct uint128, int ); struct uint128 shortShiftRightJam128( struct uint128, int ); |