mailing list of musl libc
 help / color / mirror / code / Atom feed
From: bobodog <8192542@qq.com>
To: musl <musl@lists.openwall.com>
Cc: musl <musl@lists.openwall.com>
Subject: 回复: [musl] [math] The math library have some bug forceil,floor,round functioin, in arm mode
Date: Tue, 14 Oct 2014 10:51:58 +0800	[thread overview]
Message-ID: <tencent_435BF874599D31711BA3323D@qq.com> (raw)
In-Reply-To: <20141014024238.GL32028@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 2299 bytes --]

Test it in qemu-system-arm, with soft fp, realview-pb-a8 platform‍


we porting musl to our project, and just write test functions to test cases, i don't kown, how to test musl in origin test cases.


------------------
____________________________
蒋建军                            
深圳市九鼎创展科技有限公司
地址:深圳市宝安区西乡街道宝源路宝安互联网产业基地A区7栋301
邮编:518101
手机:18665386306
电邮:8192542@qq.com
网站:http://www.9tripod.com

论坛:http://xboot.org
 


 




------------------ 原始邮件 ------------------
发件人: "Rich Felker";<dalias@libc.org>;
发送时间: 2014年10月14日(星期二) 上午10:42
收件人: "bobodog"<8192542@qq.com>; 
抄送: "musl"<musl@lists.openwall.com>; 
主题: Re: [musl] [math] The math library have some bug forceil,floor,round functioin, in arm mode



On Tue, Oct 14, 2014 at 10:17:34AM +0800, bobodog wrote:
> HI,ALL
>          We use musl in arm process, but found some bugs about math library,  x86 process is ok!

I can't reproduce this issue. Are you using soft (arm) or hard (armhf)
float based target?

>         The test code:
> int test(int argc, char ** argv)
> {
> 	double n = 0.0;
> 	int i;
> 
> 
> 	for(i = 0; i < 20; i++)
> 	{
> 		n = n - 0.125;
> 		printf("ceil(%f) = %f, floor(%f) = %f, round(%f) = %f\n", n, ceil(n), n, floor(n), n, round(n));
> 	}
> 
> 
> 	return 0;
> }‍

Is this the whole test program? I don't see a main function or any
#include directives. Compiling it with gcc -Dtest=main results in:

foo.c:10:17: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
foo.c:10:78: warning: incompatible implicit declaration of built-in function ‘ceil’ [enabled by default]
foo.c:10:90: warning: incompatible implicit declaration of built-in function ‘floor’ [enabled by default]
foo.c:10:103: warning: incompatible implicit declaration of built-in function ‘round’ [enabled by default]

These warnings should all be treated as errors; calling a function
with variadic arguments (printf) or a function that returns a floating
point type without a valid declaration/prototype is a serious error
and will not work.

Rich

[-- Attachment #2: Type: text/html, Size: 5024 bytes --]

  reply	other threads:[~2014-10-14  2:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14  2:17 [math] The math library have some bug for ceil,floor,round " bobodog
2014-10-14  2:42 ` Rich Felker
2014-10-14  2:51   ` bobodog [this message]
2014-10-14  3:03     ` 回复: [musl] [math] The math library have some bug forceil,floor,round " Rich Felker
2014-10-14  4:11       ` 回复: [musl] 回复: [musl ] [math] The math library have some bugforceil,floor,round " bobodog
2014-10-14  6:26         ` RE:[musl ] [math] I Found math library's bug in ceil, floor, round functions, Using arm toolchains bobodog
2014-10-14  6:43           ` [BUG][math]build musl with optimizing flags, some math functions are broken bobodog
     [not found]             ` <tencent_07C7708762DD414A5A757808@qq.com>
2014-10-14 15:12               ` RE:[BUG][math]build " Rich Felker
2014-10-14 15:33               ` RE???[BUG][math]build " Szabolcs Nagy
2014-10-14  8:06           ` RE???[musl ] [math] I Found math library's bug in ceil, floor, round functions, Using arm toolchains Szabolcs Nagy
2014-10-14  3:04     ` 回复: [musl] The math library have some bug forceil,floor,round functioin, in arm mode bobodog

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_435BF874599D31711BA3323D@qq.com \
    --to=8192542@qq.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).