[all-commits] [llvm/llvm-project] 50d15e: [flang] Subnormal arguments to and results from SP...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Sep 16 13:46:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 50d15e688f4a88662f28d5d712f2ba2533466974
      https://github.com/llvm/llvm-project/commit/50d15e688f4a88662f28d5d712f2ba2533466974
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2024-09-16 (Mon, 16 Sep 2024)

  Changed paths:
    M flang/lib/Evaluate/real.cpp
    M flang/runtime/numeric-templates.h
    M flang/test/Evaluate/fold-spacing.f90

  Log Message:
  -----------
  [flang] Subnormal arguments to and results from SPACING (#108861)

The standards aren't clear about how IEEE-754 subnormal values interact
with the intrinsic function SPACING. Four compilers interpret the
standard such that SPACING(x) will return a value never less than
TINY(x); one compiler returns TINY(x) for ABS(x) <= TINY(x) but can
return SPACING(x) < TINY(x) for some ABS(x) > TINY(x); one other
compiler works similarly, but also oddly returns SPACING(x) < TINY(x)
for ABS(x) >= TINY(x)/2.

Follow the most common precedent.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list