From owner-freebsd-numerics@freebsd.org Mon Jul 23 18:28:22 2018 Return-Path: Delivered-To: freebsd-numerics@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 490181051EA3 for ; Mon, 23 Jul 2018 18:28:22 +0000 (UTC) (envelope-from enh@google.com) Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2C76891CD for ; Mon, 23 Jul 2018 18:28:21 +0000 (UTC) (envelope-from enh@google.com) Received: by mail-lj1-x22e.google.com with SMTP id f8-v6so1383244ljk.1 for ; Mon, 23 Jul 2018 11:28:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/2sahZxSYRuYKaouUizQWpDgNP6HBp46p7GA4YXwTXg=; b=G5DkvUsZFhAiSjPppILK3AtralL52EN0mtxzhpE38SOGGQ+9mCYa9BoPyktERuMKWD KVKBcUKniZj1FZkIORUkLaiB9ac3nMVu/0yK3lG9DR5gg99fFTdnVqzBnCXlp05JFLtu MJ5JuKyL+F4jMAAK8K2x5noAN1KJkLfGWw650jV9KaRxSM6TcvBd6dJ8T/NFCUOf2tXh KfTK14E0GT/CNhN4u4EDKsKcU/0G9zvtaCKYzWJtIuworB/jF49+li+9HrTW7CBXbGoz Ij1+pqjyHL9nn2VXz6QSBreVugdHPMuaKX1R+ljnjJ/7lYBtjmPrB+bSdw/6DjMGUiqw Ox/Q== X-Gm-Message-State: AOUpUlGGbvUOYYTUJ4ky9yI2ff8D/gLGRZNRXesUL/kAhekX7KVoMhVD XARvWfNo1FQ8JD2xk3NrWptLtvqzbNr0UPdbb3yVGhH8Ck32Ug== X-Google-Smtp-Source: AAOMgpfuz9CEv6tN0BikqPUheGLcRfNECsWka31r/cbyoeiaKvXUP6HCP90hMWf0wCXT4Ms7sj5Ve68bz3bsYDsWOKY= X-Received: by 2002:a2e:2bd7:: with SMTP id r84-v6mr10113178ljr.40.1532370499830; Mon, 23 Jul 2018 11:28:19 -0700 (PDT) MIME-Version: 1.0 From: enh Date: Mon, 23 Jul 2018 11:28:08 -0700 Message-ID: Subject: fmod nan_mix usage To: freebsd-numerics@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2018 18:28:22 -0000 the recent change from return (x*y)/(x*y); to return nan_mix(x, y)/nan_mix(x, y); in e_fmod.c broke some of our unit tests. for example, fmod(3.f, 0.f) in one of the VM tests. bionic/tests/math_test.cpp:(784) Failure in test math_h_force_long_double.fmod Value of: isnan(fmod(3.0, 0.0)) Actual: false Expected: true math_h_force_long_double.fmod exited with exitcode 1. [ FAILED ] math_h_force_long_double.fmodf (13 ms) bionic/tests/math_test.cpp:(798) Failure in test math_h_force_long_double.fmodf Value of: isnanf(fmodf(3.0f, 0.0f)) Actual: false Expected: true math_h_force_long_double.fmodf exited with exitcode 1. [ FAILED ] math_h_force_long_double.fmodl (12 ms) bionic/tests/math_test.cpp:(812) Failure in test math_h_force_long_double.fmodl Value of: isnanl(fmodl(3.0L, 0.0L)) Actual: false Expected: true it looks like e_remainder.c might have the same issue, but Android's tests didn't catch that :-( i'll improve the tests...