Developer Notes

The user needs to avoid operations that generate NaNs, as different hardware has different levels of support and/or behavior regarding NaNs.

Description

NaN (Not a Number) is handled different when clamped on Windows and Android/iOS. If you clamp a NaN (Acheived by -3 ^ 0.2 in the reproduction project) from 0.0 to 1.0 and then print the result, you'll get a 0.0 on Windows. If you do the same on Android and iOS, you'll get 1.0.

Regression?: No
This also occurs in 4.16

Steps to Reproduce
  1. Download the attached project
  2. Press Play to Play in Editor and note the output from the Print String on BeginPlay
  3. Launch the project on Android or iOS and note the same Print String
    Result: On Windows, the output is 0.0 and on Mobile it's 1.0. See description for details
    Expected: The output is the same on both platforms

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-51441 in the post.

0
Login to Vote

Won't Fix
ComponentUE - Platform - Mobile
Affects Versions4.164.174.184.19
CreatedOct 18, 2017
ResolvedOct 24, 2017
UpdatedSep 16, 2019