/* trootofunity -- test file for mpc_rootofunity. Copyright (C) 2012, 2016 INRIA This file is part of GNU MPC. GNU MPC is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. GNU MPC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/ . */ #include "mpc-tests.h" #define MPC_FUNCTION_CALL \ P[0].mpc_inex = mpc_rootofunity (P[1].mpc, P[2].ui, P[3].ui, P[4].mpc_rnd) #include "data_check.tpl" #include "tgeneric.tpl" static void check (unsigned long int n) /* checks whether zeta_n^n = 1, which is somewhat dangerous in floating point */ { mpc_t z, zero; mpfr_prec_t prec; mpc_init2 (z, 2); mpc_init2 (zero, 2); for (prec = 2*n; prec < 1000; prec = (mpfr_prec_t) (prec * 1.1 + 1)) { mpc_set_prec (z, prec); mpc_set_prec (zero, prec); mpc_rootofunity (z, n, 1, MPC_RNDNN); mpc_pow_ui (zero, z, n, MPC_RNDNN); mpc_sub_ui (zero, zero, 1u, MPC_RNDNN); if (MPC_MAX (mpfr_get_exp (mpc_realref (zero)), mpfr_get_exp (mpc_imagref (zero))) > - ((long int) prec - (long int) n)) { fprintf (stderr, "rootofunity too imprecise for n=%lu\n", n); MPC_OUT (z); MPC_OUT (zero); exit (1); } } mpc_clear (z); mpc_clear (zero); } int main (void) { unsigned long int n; for (n = 1; n < 10000; n += 10) check (n); test_start (); data_check_template ("rootofunity.dsc", "rootofunity.dat"); /* Avoid checking roots of unity of high order at very low precision, so start only at 20. */ tgeneric_template ("rootofunity.dsc", 20, 512, 7, 256); test_end (); return 0; } lue='search'/>
path: root/sys/compat/linux/linux_syscall.h
AgeCommit message (Expand)Author
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2005-12-11merge ktrace-lwp.christos
2005-05-15Fix up COMPAT_LINUX support for amd64. Still a work in progress, notfvdl
2002-01-14Crude first cut at ARMLinux binary compatibility. Successfully runsbjh21
2001-09-22Enabled Mips Linux emul in header filesmanu
2001-01-19Added support for powerpc Linux compatibilitymanu
1998-12-15Added linux compat support on m68k ports.itohy
1998-10-03Attempt to fix the mess.christos
1998-10-01Provide a suitable default so that kdump compiles on architectureschristos
1998-10-01Add the architechture-wise multiplexing header files. These are the files th...erh
1998-10-01These syscall table files have been regenerated in compat/linux/i386.erh
1998-09-11Regen.mycroft
1998-08-07Regen again, to indicate which master revision these were generated from.kleink
1998-08-05enable nanosleep in linux emul, per pr-5906 from Soren S. Jorvangperry
1998-02-20Regen.mycroft
1998-02-19Regen: makesyscalls.sh changed.thorpej
1998-02-19regen; makesyscalls.sh changedthorpej
1998-01-09Regen.thorpej
1998-01-08Regen: back out RCD ID related changes.thorpej
1998-01-05regened with RCSIDs in placeperry
1997-10-16Regen.christos
1997-10-16Regen.mycroft
1997-10-10Regen.mycroft
1997-06-13Regen: Use compat_12_sys_swapon().thorpej
1997-04-07Regen.augustss
1997-01-13Regen; makesyscalls.sh emits comments now.thorpej
1996-05-20Regen.fvdl
1995-12-18syscalls.master changedfvdl
1995-12-09Reran makesyscalls.sh.mycroft
1995-10-07Reran makesyscalls.sh.mycroft
1995-09-07syscalls.master changedfvdl
1995-08-27syscalls.master changedfvdl
1995-08-23syscalls.master changedfvdl
1995-08-21syscalls.master changed.mycroft
1995-08-14syscalls.master changed.mycroft
1995-07-24syscalls.master changedfvdl
1995-06-11Remade these after syscalls.master had changed.fvdl
1995-05-06Add linux_modify_ldt(), if __i386__.mycroft
1995-04-22- added struct emul to all emulations.christos
1995-04-07syscalls.master was changed, so update thesefvdl
1995-03-10Update automatically generated syscall files.fvdl
1995-03-05Added a few more system calls.fvdl
1995-02-28Added Linux compat code.fvdl