From a578390f798204d8db5a3402dbbbf4c7cec2a351 Mon Sep 17 00:00:00 2001 From: Eric Kunze Date: Mon, 1 May 2023 15:52:58 -0700 Subject: Fix logic error for RESCALE of uint16 Existing logic was impossible to resolve Signed-off-by: Eric Kunze Change-Id: I7f38ea57adb7fff9018a6f0fa8dd82453782d59b --- chapters/type_conversion.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapters/type_conversion.adoc b/chapters/type_conversion.adoc index d6cd1b2..415c5d9 100644 --- a/chapters/type_conversion.adoc +++ b/chapters/type_conversion.adoc @@ -55,8 +55,8 @@ for_each(index in shape) { ERROR_IF(out_t != int8_t && out_t != uint8_t && out_t != uint16_t && output_zp != 0); - ERROR_IF(in_t == uint16_t && (input_zp != 0 || input_zp != 32768)); - ERROR_IF(out_t == uint16_t && (output_zp != 0 || output_zp != 32768)); + ERROR_IF(in_t == uint16_t && input_zp != 0 && input_zp != 32768); + ERROR_IF(out_t == uint16_t && output_zp != 0 && output_zp != 32768); ERROR_IF(scale32 && in_t == int48_t); ERROR_IF(!scale32 && double_round); int48_t value = tensor_read(input, shape, index); -- cgit v1.2.1