jit.op bug: 12 multiplied by 10 outputs 0
i think i found a jit.op bug
12 * 10 = 0;
12 * 10. = 11;
You should do this with float32 matrix
hm, i had a similar problem like this:
solution was to switch to a long matrix. but nevertheless i do not understand why jit.op is so buggy with char matrices.
and: i do not understand why nobody from cycling comments on such a blatant bug.
and: this was with max 4, in max 5 this bug is still existing!
somehow i get a feeling that this forum has changed?
micha
thanks kyred and micha for the quick reply
converting each matrix from char to float32 is for sure a very performative workaround ;-)
actually i am trying to apply jit.op * to a char matrix in java
now i converted it with mymatrix.setType("float32")
and i still cant multiply my by 10. !!!!!!!!!!!! ;-(
well. never mind. multiplications are probably not so important for programming
yeah, they are not so important and way overrated. additionally you can fake them using additions.
i still don't understand why nobody from cycling comments on this? there were times, when communication to the company (esp. joshua, ben and topher) was really easy and quick via the mailinglist.
After a conversation with JKC regarding this whole deal and the float value 10., I think I understand what is going on here.
Culling from our conversation, float 10. is actually 1., as char data is mapped to 0-1. However, 1. (char 255) is not really 1. (which isn't representable in 8 bit fixed point, since it would be 256). So floating point greater than 1. becomes 1.-1/256., i.e. 0.996.
This all boils down to a more simple explanation that float maps to the range 0-0.996 char 0-255.
-Ben
Also, there is no modulo arithmetic going on as it says in the jit.op ref regarding char data. I'll make sure that our documentation is updated.
-Ben
ben, thanks for the detailed explanation, these are the kind of answers and interna i want to hear ;-). only question open is why jit.expr works correctly, while jit.op does not?
jit.expr is always float32 processing.
thanks for the explanations