|
From: Andreas F. <and...@di...> - 2003-08-01 08:30:42
|
Hi Nicholas,
it seems I was a bit quick to type, cosf() actually works,
what I really meant was acosf():
#include <math.h>
int main(int argc, char** argv)
{
float f = asinf(0.5);
return 0;
}
gives me:
$ valgrind /tmp/acostest
==4163== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==4163== Copyright (C) 2002, and GNU GPL'd, by Julian Seward.
==4163== Using valgrind-1.9.6, a program instrumentation system for
x86-linux.
==4163== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==4163== Estimated CPU clock rate is 1754 MHz
==4163== For more details, rerun with: -v
==4163==
REPE then 0xF
valgrind: the `impossible' happened:
Unhandled REPE case
Basic block ctr is approximately 0
sched status:
Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0
==4163== at 0x4022D502: __acosf (in /lib/libm-2.3.2.so)
==4163== by 0x80483A3: main (in /tmp/acostest)
==4163== by 0x402557A6: __libc_start_main (in /lib/libc-2.3.2.so)
==4163== by 0x80482F0: (within /tmp/acostest)
Regards,
Andreas
-----Original Message-----
From: Nicholas Nethercote
To: Andreas Fredriksson
Cc: 'val...@li...'
Sent: 8/1/2003 10:20 AM
Subject: Re: [Valgrind-users] cosf() and friends
On Fri, 1 Aug 2003, Andreas Fredriksson wrote:
> this is my first post here, so first let me say that I'm very
> impressed with valgrind and it's becoming an indispensible tool
> in my toolbox.
Great, thanks :)
> I noticed that the floating-point variations of cos(),
> sin() and friends are not supported by valgrind-1.9.6
> (I'm using gentoo linux 1.4), so I had to whip up a sed
> script to replace these with their double couterparts
> for the valgrind build.
I'm not sure what you mean by "not supported". Does it abort execution?
I'd never heard of these functions, but I just ran this program:
#include <stdio.h>
#include <math.h>
int main(void)
{
float arg = 0.777;
float ans = cosf(arg);
printf("%f\n", ans);
return 0;
}
and it worked fine with the current version (which I think should
operate
the same as 1.9.6 in this case).
Is this what you mean? Can you post a small test program in C or (even
better) assembly code?
N
|