Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
00a4da93
Commit
00a4da93
authored
Jan 27, 2014
by
mux
Browse files
Fix implicit double conversion warning
parent
ddf1aa92
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/objcomplex.c
View file @
00a4da93
...
...
@@ -24,9 +24,9 @@ mp_obj_t mp_obj_new_complex(mp_float_t real, mp_float_t imag);
void
complex_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
o_in
,
mp_print_kind_t
kind
)
{
mp_obj_complex_t
*
o
=
o_in
;
if
(
o
->
real
==
0
)
{
print
(
env
,
"%.8gj"
,
o
->
imag
);
print
(
env
,
"%.8gj"
,
(
double
)
o
->
imag
);
}
else
{
print
(
env
,
"(%.8g+%.8gj)"
,
o
->
real
,
o
->
imag
);
print
(
env
,
"(%.8g+%.8gj)"
,
(
double
)
o
->
real
,
(
double
)
o
->
imag
);
}
}
...
...
py/objfloat.c
View file @
00a4da93
...
...
@@ -21,7 +21,7 @@ mp_obj_t mp_obj_new_float(mp_float_t value);
static
void
float_print
(
void
(
*
print
)(
void
*
env
,
const
char
*
fmt
,
...),
void
*
env
,
mp_obj_t
o_in
,
mp_print_kind_t
kind
)
{
mp_obj_float_t
*
o
=
o_in
;
print
(
env
,
"%.8g"
,
o
->
value
);
print
(
env
,
"%.8g"
,
(
double
)
o
->
value
);
}
static
mp_obj_t
float_make_new
(
mp_obj_t
type_in
,
uint
n_args
,
uint
n_kw
,
const
mp_obj_t
*
args
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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