FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/Include/cpython/floatobject.h at main · python/cpython · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
python
/
cpython
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
35.3k
Star
74.9k
Code
Issues
5k+
Pull requests
2.6k
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
Include
/
cpython
/
floatobject.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (21 loc) · 900 Bytes
Breadcrumbs
cpython
/
Include
/
cpython
/
floatobject.h
Copy path
File metadata and controls
27 lines (21 loc) · 900 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef
Py_CPYTHON_FLOATOBJECT_H
# error
"this header file must not be included directly"
#endif
typedef
struct
{
PyObject_HEAD
double
ob_fval
;
}
PyFloatObject
;
#define
_PyFloat_CAST
(
op
) \
(assert(PyFloat_Check(op)), _Py_CAST(PyFloatObject*, op))
// Static inline version of PyFloat_AsDouble() trading safety for speed.
// It doesn't check if op is a double object.
static
inline
double
PyFloat_AS_DOUBLE
(
PyObject
*
op
) {
return
_PyFloat_CAST
(
op
)
->
ob_fval
;
}
#define
PyFloat_AS_DOUBLE
(
op
) PyFloat_AS_DOUBLE(_PyObject_CAST(op))
PyAPI_FUNC
(
int
)
PyFloat_Pack2
(
double
x
,
char
*
p
,
int
le
);
PyAPI_FUNC
(
int
)
PyFloat_Pack4
(
double
x
,
char
*
p
,
int
le
);
PyAPI_FUNC
(
int
)
PyFloat_Pack8
(
double
x
,
char
*
p
,
int
le
);
PyAPI_FUNC
(
double
)
PyFloat_Unpack2
(
const
char
*
p
,
int
le
);
PyAPI_FUNC
(
double
)
PyFloat_Unpack4
(
const
char
*
p
,
int
le
);
PyAPI_FUNC
(
double
)
PyFloat_Unpack8
(
const
char
*
p
,
int
le
);
Back
|
FazBrowse Home
|
New Git URL