Lokathor / wide

A crate to help you go wide. By which I mean use SIMD stuff.
https://docs.rs/wide
zlib License
279 stars 23 forks source link

Should Debug include the type name? #75

Closed RazrFalcon closed 3 years ago

RazrFalcon commented 3 years ago

The Debug output for, let's say, f32x4 looks like this:

(1.95763, 1.95276, 1.9478897, 1.9430195)

Maybe it would be better to have something like:

f32x4(1.95763, 1.95276, 1.9478897, 1.9430195)
Lokathor commented 3 years ago

possibly? f32 debug doesn't say it is an f32 though.

RazrFalcon commented 3 years ago

Yes, but this is what Debug does by default. Also, (1, 2, 3, 4) can be either i32x4 or i64x4. Hard to guess.

This is just a suggestion, by the way.

Lokathor commented 3 years ago

well a derived debug shows the type name of a structure sure, but debug on a f32 is still just the f32. that's also why it shows as 1 sometimes. Note that you can specify format arguments and each float within will respect that, so you can specify, i think it's :0.0? or something like that and it'll force the .0 part to print for whole numbers.