diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-28 12:24:45 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-28 12:24:45 -0400 |
commit | bdea94a6653240e0e477eda186ceccbe6be00535 (patch) | |
tree | 64e57e8684f65fba4b0e953ef2a99d7fdb353a06 /src/lib/math/fp.h | |
parent | 6178a9f758d60f5fc896644f1b9b0aaf4c32f2a5 (diff) | |
download | tor-bdea94a6653240e0e477eda186ceccbe6be00535.tar.gz tor-bdea94a6653240e0e477eda186ceccbe6be00535.zip |
Move floating-point math functions into a new lib/math
Diffstat (limited to 'src/lib/math/fp.h')
-rw-r--r-- | src/lib/math/fp.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/math/fp.h b/src/lib/math/fp.h new file mode 100644 index 0000000000..b35c18a1c7 --- /dev/null +++ b/src/lib/math/fp.h @@ -0,0 +1,17 @@ +/* Copyright (c) 2003, Roger Dingledine + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2018, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +#ifndef TOR_FP_H +#define TOR_FP_H + +#include "lib/cc/compat_compiler.h" +#include "lib/cc/torint.h" + +double tor_mathlog(double d) ATTR_CONST; +long tor_lround(double d) ATTR_CONST; +int64_t tor_llround(double d) ATTR_CONST; +int64_t clamp_double_to_int64(double number); + +#endif |