Title: | VAX and Alpha VMS |
Notice: | This is a new VMSnotes, please read note 2.1 |
Moderator: | VAXAXP::BERNARDO |
Created: | Wed Jan 22 1997 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 703 |
Total number of notes: | 3722 |
OpenVMS Alpha V7.1, DPML (Digital Portable Mathematics Libary) OpenVMS Alpha V6.1 documents the routine "drem" (remainder) as being part of OpenVMS Alpha; however when you attempt to use it you'll get a LINK warning: %LINK-W-NUDFSYMS, 1 undefined symbol: %LINK-I-UDFSYM, MATH$DREM_T Is this simply the case that some of these routines just don't exist or there are equivalent routines? If so, why don't we document this or provide the correct routine name. The "Digital Portable Mathematics Library", November 1996, (order no AA-PV6VC-TE ) manual documents the OpenVMS Alpha entry-points, but some of these routines are not provided. As a workaround we are using fmodl() and/OR mth$tmod(), but it would great if the documentation were corrected or the routines provided. The following routines are missing from SYS$SHARE:DPML$SHR.EXE ( cabs, drem, fmod, random, and remainder ): MATH$CABS_S MATH$CABS_T MATH$CABS_X MATH$CABS_F MATH$CABS_G MATH$DREM_S MATH$DREM_T MATH$DREM_X MATH$DREM_F MATH$DREM_G MATH$FMOD_S MATH$FMOD_T MATH$FMOD_X MATH$FMOD_F MATH$FMOD_G MATH$RANDOM_S MATH$RANDOM_T MATH$RANDOM_X MATH$RANDOM_F MATH$RANDOM_G MATH$REMAINDER_S MATH$REMAINDER_T MATH$REMAINDER_X MATH$REMAINDER_F MATH$REMAINDER_G An example and HELP from OpenVMS Alpha V6.2 is included below. Regards, Drew Sanford /* CC/FLOAT=IEEE sample */ /* LINK sample */ #include <stdio.h> static double a; main() { double math$drem_t(); a = math$drem_t(&5.0, &3.0); printf("%f\n", a); } $ HELP DPML drem DPML drem() Interface F_TYPE drem (F_TYPE x, F_TYPE y) Description drem() returns the remainder r = x-n*y, where n = rint(x/y). Additionally, if |n-x/y|=1/2, then n is even. Consequently, the remainder is computed exactly, and |r| is less than or equal to |y|/2. drem() is equivalent to the function remainder(). IEEE Std 754 defines drem(x,0) and drem(infinity,y) to be invalid operations that produce a NaN. Entry-Point Names Generic Function Data Type DEC OSF/1 Name Required OpenVMS AXP AXP drem S_FLOAT math$drem_s dremf T_FLOAT math$drem_t drem X_FLOAT math$drem_x F_FLOAT math$drem_f G_FLOAT math$drem_g Exceptions Exceptional Argument Routine Behavior y = 0 Invalid argument x = infinity Invalid argument
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
154.1 | QUARK::LIONEL | Free advice is worth every cent | Fri Feb 07 1997 11:12 | 13 | |
[I forwarded this to Bob Hanek - here's his reply - Steve] This is a documentation error. Those routines have never been part of the VMS libary. There are routines with other names that perform the appropriate operation: MATH$CABS_<t> ==> math$hypot_<t> MATH$DREM_<t> ==> math$rem_<t> MATH$FMOD_<t> ==> math$mod_<t> MATH$RANDOM_<t> ==> math$random_L_<s or f > MATH$REMAINDER_<t> ==> math$rem_<t> -Bob | |||||
154.2 | CSC32::D_SANFORD | Fri Feb 07 1997 17:06 | 1 | ||
Thank you Steve, we were going crazy looking for them. -drew | |||||
154.3 | Where are math routines (DPML) cabs, drem, fmod, random and remainder | CSC32::D_SANFORD | Wed Feb 19 1997 12:00 | 91 | |
FYI - This is an article we wrote for the CSC until the documentation is updated, no IPMT case was raised. -drew {Draft} Where are math routines (DPML) cabs, drem, fmod, random and remainder Any party granted access to the following copyrighted information (protected under Federal Copyright Laws), pursuant to a duly executed Digital Service Agreement may, under the terms of such agreement copy all or selected portions of this information for internal use and distribution only. No other copying or distribution for any other purpose is authorized. Copyright (c) Digital Equipment Corporation 1997. All rights reserved. TITLE: Where are math routines (DPML) cabs, drem, fmod, random and remainder Copyright (c) Digital Equipment Corporation 1996. All rights reserved. OP/SYS: OpenVMS Alpha Version(s) 6.1, 6.2, 7.0, 7.1 COMPONENT: Digital Portable Mathematics Library (DPML) SOURCE: Digital Equipment Corporation OVERVIEW: The Digital Portable Mathematics Library manual contains a documentation error. Five generic math routines provide an incorrect entry-point name for OpenVMS Alpha. INFORMATION: These routines were not provided because other routines already performed the appropriate operation. Refer to the list below for the correct entry-point for OpenVMS Alpha. DPML routine Use routine cabs - Complex Absolute Value math$cabs_s math$hypot_s math$cabs_t math$hypot_t math$cabs_x math$hypot_x math$cabs_f math$hypot_f math$cabs_g math$hypot_g drem - Remainder math$drem_s math$rem_s math$drem_t math$rem_t math$drem_x math$rem_x math$drem_f math$rem_f math$drem_g math$rem_g fmod - Modulo Remainder math$fmod_s math$mod_s math$fmod_t math$mod_t math$fmod_x math$mod_x math$fmod_f math$mod_f math$fmod_g math$mod_g random - Random Number Generator, Uniformly Distributed math$random_s math$random_L_s math$random_t none math$random_x none math$random_f math$random_L_f math$random_g none remainder - Remainder math$remainder_s math$rem_s math$remainder_t math$rem_t math$remainder_x math$rem_x math$remainder_f math$rem_f math$remainder_g math$rem_g REFERENCES: "Digital Portable Mathematics Library", November 1996, (AA-PV6VC-TE), Appendix B. |