00001 /* 00002 * Copyright 2004, 2005 PathScale, Inc. All Rights Reserved. 00003 */ 00004 00005 /* Copyright (C) 1995, 1996 Free Software Foundation, Inc. 00006 This file is part of GNU Fortran libU77 library. 00007 00008 This library is free software; you can redistribute it and/or modify it 00009 under the terms of the GNU Library General Public License as published 00010 by the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 GNU Fortran is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public 00019 License along with GNU Fortran; see the file COPYING.LIB. If 00020 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 Boston, MA 02111-1307, USA. */ 00022 00023 #include "f2c.h" 00024 #include <math.h> 00025 00026 #ifdef KEY /* Bug 1683 */ 00027 /* Experiment shows that g77 calls the dp version, not the sp version, 00028 * converting precision outside the code generator. It seems to make a 00029 * difference in the low-order bits of the result. This file was 00030 * incorrect anyway when we got it from the G77 distribution: it passed 00031 * sp args to dp functions j0 etc. */ 00032 #endif /* KEY Bug 1683 */ 00033 00034 float 00035 G77_besj0_0 (const real * x) 00036 { 00037 return (float) j0 ((double) *x); 00038 } 00039 00040 float 00041 G77_besj1_0 (const real * x) 00042 { 00043 return (float) j1 ((double) *x); 00044 } 00045 00046 float 00047 G77_besjn_0 (const integer * n, real * x) 00048 { 00049 return (float) jn (*n, (double) *x); 00050 } 00051 00052 float 00053 G77_besy0_0 (const real * x) 00054 { 00055 return (float) y0 ((double) *x); 00056 } 00057 00058 float 00059 G77_besy1_0 (const real * x) 00060 { 00061 #if defined(BUILD_OS_DARWIN) 00062 return (float) y1 ((double) *x); 00063 #else /* defined(BUILD_OS_DARWIN) */ 00064 return y1f (*x); 00065 #endif /* defined(BUILD_OS_DARWIN) */ 00066 } 00067 00068 float 00069 G77_besyn_0 (const integer * n, real * x) 00070 { 00071 #if defined(BUILD_OS_DARWIN) 00072 return (float) yn (*n, (double) *x); 00073 #else /* defined(BUILD_OS_DARWIN) */ 00074 return ynf (*n, *x); 00075 #endif /* defined(BUILD_OS_DARWIN) */ 00076 }
1.5.6