Re: Problems with C floats

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...
irv said...
puts(1, "\n> printf test:\n") 
s = define_c_proc(libc, "printf", {C_POINTER, C_INT, C_DOUBLE, C_INT, C_FLOAT}) 
format = allocate_string("Here are 4 numbers: %d, %.3f, %d, %e\n") 
c_proc(s, {format, 111, 222.222, 333, 444.4444}) 

I think that printf expects a double float (64-bits) with the %f format.

Matt

The test used %e format, not %f format.

But OTOH I think all of printf's formats might expect doubles.. as I posted already in this thread.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu