Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
703599cb
Commit
703599cb
authored
May 31, 2005
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SF bug #1209411: divmod documentation shd reference // not /
parent
2c174a75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
Doc/lib/libfuncs.tex
Doc/lib/libfuncs.tex
+1
-1
Doc/lib/libstdtypes.tex
Doc/lib/libstdtypes.tex
+1
-1
No files found.
Doc/lib/libfuncs.tex
View file @
703599cb
...
...
@@ -297,7 +297,7 @@ class C:
consisting of their quotient and remainder when using long division. With
mixed operand types, the rules for binary arithmetic operators apply. For
plain and long integers, the result is the same as
\code
{
(
\var
{
a
}
/
\var
{
b
}
,
\var
{
a
}
\%
{}
\var
{
b
}
)
}
.
\code
{
(
\var
{
a
}
/
/
\var
{
b
}
,
\var
{
a
}
\%
{}
\var
{
b
}
)
}
.
For floating point numbers the result is
\code
{
(
\var
{
q
}
,
\var
{
a
}
\%
{}
\var
{
b
}
)
}
, where
\var
{
q
}
is usually
\code
{
math.floor(
\var
{
a
}
/
\var
{
b
}
)
}
but may be 1 less than that. In any case
\code
{
\var
{
q
}
*
...
...
Doc/lib/libstdtypes.tex
View file @
703599cb
...
...
@@ -256,7 +256,7 @@ comparison operations):
\lineiii
{
float(
\var
{
x
}
)
}{
\var
{
x
}
converted to floating point
}{}
\lineiii
{
complex(
\var
{
re
}
,
\var
{
im
}
)
}{
a complex number with real part
\var
{
re
}
, imaginary part
\var
{
im
}
.
\var
{
im
}
defaults to zero.
}{}
\lineiii
{
\var
{
c
}
.conjugate()
}{
conjugate of the complex number
\var
{
c
}}{}
\lineiii
{
divmod(
\var
{
x
}
,
\var
{
y
}
)
}{
the pair
\code
{
(
\var
{
x
}
/
\var
{
y
}
,
\var
{
x
}
\%
{}
\var
{
y
}
)
}}{
(3)(4)
}
\lineiii
{
divmod(
\var
{
x
}
,
\var
{
y
}
)
}{
the pair
\code
{
(
\var
{
x
}
/
/
\var
{
y
}
,
\var
{
x
}
\%
{}
\var
{
y
}
)
}}{
(3)(4)
}
\lineiii
{
pow(
\var
{
x
}
,
\var
{
y
}
)
}{
\var
{
x
}
to the power
\var
{
y
}}{}
\lineiii
{
\var
{
x
}
**
\var
{
y
}}{
\var
{
x
}
to the power
\var
{
y
}}{}
\end{tableiii}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment