- Contrassegnare come Nuovo
- Preferito
- Iscriversi
- Disattiva notifiche
- Iscriversi a feed RSS
- Evidenziare
- Stampare
- Segnalare contenuto inappropriato
I noticed when attempting to match the behavior of ippiScale_32f8u that I was getting unexpected results from the intel function.
Specifically, scaling the following float rounds down to 0 instead of up to 1.
float a = 0.00196078443;
Since the float range is 0.0 to 1.0 and the 8u range is inherently 0 to 255, a * 255 = 0.50000002965. And thus the function should round up I believe, but the scaling function outputs 0 for this. Am I misunderstanding how this should work?
Link copiato
- Contrassegnare come Nuovo
- Preferito
- Iscriversi
- Disattiva notifiche
- Iscriversi a feed RSS
- Evidenziare
- Stampare
- Segnalare contenuto inappropriato
Hello,
Thank you for contacting us!
Could you help provide out the information: IPP version, CPU platform, OS, etc? As well as a simple reproducer.
Have a nice day.
Regards,
Ruqiu
- Contrassegnare come Nuovo
- Preferito
- Iscriversi
- Disattiva notifiche
- Iscriversi a feed RSS
- Evidenziare
- Stampare
- Segnalare contenuto inappropriato
I literally just gave you the code to try.
I think I figured it out ... this is due to the use of "bankers rounding" aka "round to nearest, ties to even". This makes sense, but should be documented in the function behavior.

- Iscriversi a feed RSS
- Contrassegnare la discussione come nuova
- Contrassegnare la discussione come letta
- Sposta questo Discussione per l'utente corrente
- Preferito
- Iscriversi
- Pagina in versione di stampa