NetBSD Problem Report #22503

Received: (qmail 13621 invoked by uid 605); 16 Aug 2003 15:51:42 -0000
Message-Id: <20030816155138.72F8B2B292@usausa.dyndns.org>
Date: Sun, 17 Aug 2003 00:51:38 +0900 (JST)
From: usa@ruby-lang.org
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: usa@ruby-lang.org
To: gnats-bugs@gnats.netbsd.org
Subject: modf(3) returns wrong value on amd64
X-Send-Pr-Version: 3.95

>Number:         22503
>Category:       port-amd64
>Synopsis:       modf(3) returns wrong value on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 16 15:52:00 +0000 2003
>Closed-Date:    Sat Aug 16 21:47:12 +0000 2003
>Last-Modified:  Sat Aug 16 21:47:12 +0000 2003
>Originator:     NAKAMURA Usaku
>Release:        NetBSD 1.6R
>Organization:
>Environment:
System: NetBSD jupitris 1.6R NetBSD 1.6R (GENERIC) #0: Fri May 9 12:01:14 CEST 2003 fvdl@thingy:/scratch/obj/current/sys/arch/amd64/compile.amd64/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	On amd64, modf(3) returns integer part instead of fractional part.
>How-To-Repeat:
	#include <math.h>
	#include <stdio.h>
	main()
	{
		double f, d;
		f = modf(2.5, &d);
		printf("%f %f\n", d, f);
		/* should print "2.0 0.5", but print "2.0 2.0" */
	}
>Fix:
	I think /usr/src/lib/libc/arch/x86_64/gen/modf.S is wrong.
>Release-Note:
>Audit-Trail:

From: Frank van der Linden <fvdl@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/22503 CVS commit: src/lib/libc/arch/x86_64/gen
Date: Sat, 16 Aug 2003 21:45:51 +0000 (UTC)

 Module Name:	src
 Committed By:	fvdl
 Date:		Sat Aug 16 21:45:51 UTC 2003

 Modified Files:
 	src/lib/libc/arch/x86_64/gen: modf.S

 Log Message:
 Return the right value for modf(). Fixes PR 22503.


 To generate a diff of this commit:
 cvs rdiff -r1.2 -r1.3 src/lib/libc/arch/x86_64/gen/modf.S

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: fvdl 
State-Changed-When: Sat Aug 16 21:46:49 UTC 2003 
State-Changed-Why:  
Fixed in rev. 1.3 of modf.S, thanks! 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.