OpenCL 2.1 Extended Instruction Set Specification (Provisional)

Size: px
Start display at page:

Download "OpenCL 2.1 Extended Instruction Set Specification (Provisional)"

Transcription

1 OpenCL 2.1 Etended Instruction Set Specification (Provisional) Boaz Ouriel, Intel Version 0.99, Revision 30 April 2, 2015

2 OpenCL 2.1 Etended Instruction Set Specification (Provisional) ii Copright The Khronos Group Inc. All Rights Reserved. This specification is protected b copright laws and contains material proprietar to the Khronos Group, Inc. It or an components ma not be reproduced, republished, distributed, transmitted, displaed, broadcast, or otherwise eploited in an manner without the epress prior written permission of Khronos Group. You ma use this specification for implementing the functionalit therein, without altering or removing an trademark, copright or other notice from the specification, but the receipt or possession of this specification does not conve an rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anthing that it ma describe, in whole or in part. Khronos Group grants epress permission to an current Promoter, Contributor or Adopter member of Khronos to cop and redistribute UNMODIFIED versions of this specification in an fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for an version of the API is used whenever possible. Such distributed specification ma be reformatted AS LONG AS the contents of the specification are not changed in an wa. The specification ma be incorporated into a product that is sold as long as such product includes significant independent work developed b the seller. A link to the current version of this specification on the Khronos Group website should be included whenever possible with specification distributions. Khronos Group makes no, and epressl disclaims an, representations or warranties, epress or implied, regarding this specification, including, without limitation, an implied warranties of merchantabilit or fitness for a particular purpose or noninfringement of an intellectual propert. Khronos Group makes no, and epressl disclaims an, warranties, epress or implied, regarding the correctness, accurac, completeness, timeliness, and reliabilit of the specification. Under no circumstances will the Khronos Group, or an of its Promoters, Contributors or Members or their respective partners, officers, directors, emploees, agents, or representatives be liable for an damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these materials. Khronos, SYCL, SPIR, WebGL, EGL, COLLADA, StreamInput, OpenVX, OpenKCam, gltf, OpenKODE, OpenVG, OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL and OpenMAX DL are trademarks and WebCL is a certification mark of the Khronos Group Inc. OpenCL is a trademark of Apple Inc. and OpenGL and OpenML are registered trademarks and the OpenGL ES and OpenGL SC logos are trademarks of Silicon Graphics International used under license b Khronos. All other product names, trademarks, and/or compan names are used solel for identification and belong to their respective owners.

3 OpenCL 2.1 Etended Instruction Set Specification (Provisional) iii REVISION HISTORY NUMBER DATE DESCRIPTION NAME 1 Aug 2014 Created jk 29 Mar 2015 Provisional Release jk 30 2-Apr-2015 Provisional Release jk

4 OpenCL 2.1 Etended Instruction Set Specification (Provisional) iv Contents 1 Introduction 1 2 Binar Form Math Integer Common Geometric Relational Vector Data Load and Store Miscellaneous Vector Misc Image functions Image encoding Sampler encoding Image format encoding Image read functions Image write functions Image quer functions

5 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 1 / 80 Contributors and Acknowledgements Yaun Liu, AMD Brian Sumner, AMD Mart Johnson, AMD Mandana Baregheh, AMD Andrew Richards, Codepla Gu Benei, Intel Raun Krisch, Intel Yuan Lin, NVIDIA Lee Howes, Qulacomm Chihong Zang, Qualcomm Ben Gaster, Qualcomm Jack Liu, QUALCOMM 1 Introduction This is the specification of OpenCL.std.21 instruction set. The librar is imported into a SPIR-V module in the following manner: <et-inst-id> OpEtInstImport "OpenCL.std.21" The librar can onl be imported when Memor Model is set to OpenCL21 2 Binar Form This section contains the semantics and eact form of eecution of OpenCL 2.1 using the OpEtInst instruction. In this section we use the following naming conventions: void denote an OpTpeVoid. half, float and double denote an OpTpeFloat with a width of 16, 32 and 64 bits respectivel. i8, i16, i32 and i64 denote an OpTpeInt with a width of 8, 16, 32 and 64 bits respectivel. bool denotes an OpTpeBool. size_t denotes an i32 when the Addressing Model is Phsical32 and i64 when the Addressing Model is Phsical64.

6 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 2 / 80 vector(n) denotes an OpTpeVector where n indicates the component count. vector(n 1, n 2,..., n i ) abbreviates vector(n 1 ), vector(n 2 ),... or vector(n i ). integer denotes i8, i16, i32 or i64. floating-point denotes half, float, double. pointer(storage) denotes an OpTpePointer which points to storage Storage Class. pointer(constant) denotes an OpTpePointer with UniformConstant Storage Class. pointer(generic) denotes an OpTpePointer with Generic Storage Class. pointer(global) denotes an OpTpePointer with WorkgroupGlobal Storage Class. pointer(local) denotes an OpTpePointer with WorkgroupLocal Storage Class. pointer(private) denotes an OpTpePointer with Private Storage Class. pointer(s 1, s 2,..., s i ) abbreviates pointer(s 1 ), pointer(s 2 ),... or pointer(s i ). image defines all tpes of image memor objects (See image encoding section). sampler a SPIR-V sampler object (See sampler encoding section). 2.1 Math This section describes the list of eternal math. The eternal math are categorized into the following: A list of that have scalar or vector argument versions, and, A list of that onl take scalar float arguments. The vector versions of the math operate component-wise. The description is per-component. The math are not affected b the prevailing rounding mode in the calling environment, and alwas return the same value as the would if called with the round to nearest even rounding mode.

7 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 3 / 80 acos Compute the arc cosine of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 0 acosh Compute the inverse hperbolic cosine of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 1 acospi Compute acos() / π. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 2 asin Compute the arc sine of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 3

8 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 4 / 80 asinh Compute the inverse hperbolic sine of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 4 asinpi Compute asin() / π. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 5 atan Compute the arc tangent of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 6 atan2 Compute the arc tangent of /., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 7

9 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 5 / 80 atanh Compute the hperbolic arc tangent of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 8 atanpi Compute atan() / π. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 9 atan2pi Compute atan2(, ) / π., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 10 cbrt Compute the cube-root of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 11

10 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 6 / 80 ceil Round to integral value using the round to positive infinit rounding mode. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 12 copsign Returns with its sign changed to match the sign of., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 13 cos Compute the cosine of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 14 cosh Compute the hperbolic cosine of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 15

11 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 7 / 80 cospi Compute cos() / π. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 16 erfc Complementar error function of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 17 erf Error function of encountered in integrating the normal distribution. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 18 ep Compute the base-e eponential of. (i.e. e ) and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 19

12 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 8 / 80 ep2 Computes 2 raised to the power of. (i.e. 2 ) and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 20 ep10 Computes 10 raised to the power of. (i.e. 10 ) and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 21 epm1 Computes e and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 22 fabs Compute the absolute value of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 23

13 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 9 / 80 fdim Compute - if >, +0 if is less than or equal to., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 24 floor Round to the integral value using the round to negative infinit rounding mode. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 25 fma Compute the correctl rounded floating-point representation of the sum of c with the infinitel precise product of a and b.rounding of intermediate products shall not occur. Edge case behavior is per the IEEE standard.,a,b and c must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 26 a b c fma Returns if <, otherwise it returns. If one argument is a NaN, Fma returns the other argument. If both arguments are NaNs, Fma returns a NaN., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe. Note: fma behave as defined b C99 and ma not match the IEEE definition for manum with regard to signaling NaNs.Specificall, signaling NaNs ma behave as quiet NaNs 7 44 Result set 27

14 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 10 / 80 fmin Returns if <, otherwise it returns. If one argument is a NaN, Fmin returns the other argument. If both arguments are NaNs, Fmin returns a NaN., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe. Note: fmin behave as defined b C99 and ma not match the IEEE definition for minnum with regard to signaling NaNs.Specificall, signaling NaNs ma behave as quiet NaNs 7 44 Result set 28 fmod Modulus. Returns - * trunc (/)., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 29 fract Returns fmin( - floor(), 01.fffffep-1f. floor() is returned in ptr. and must be floating-point or vector(2,3,4,8,16) of floating-point values. ptr must be a pointer(generic) to floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe, or must be a pointer to the same tpe Result set 30 ptr

15 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 11 / 80 frep Etract the mantissa and eponent from. The holds the mantissa, and ep points to the eponent. For each component the mantissa returned is a floating-point with magnitude in the interval [1/2, 1) or 0. Each component of equals mantissa returned * 2 ep. and must be floating-point or vector(2,3,4,8,16) of floating-point values. ep must be a pointer(generic) to i32 or vector(2,3,4,8,16) of i32 values. and operands must be of the same tpe. ep operand must point to an i32 with the same component count as and operands Result set 31 ep hpot Compute the value of the square root of without undue overflow or underflow., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 32 ilogb Return the eponent of as an i32 value. must be i32 or vector(2,3,4,8,16) of i32 values. must be floating-point or vector(2,3,4,8,16) of floating-point values. and operands must have the same component count Result set 33

16 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 12 / 80 ldep Multipl b 2 to the power k. k must be i32 or vector(2,3,4,8,16) of i32 values. and must be floating-point or vector(2,3,4,8,16) of floating-point values. and operands must be of the same tpe. ep operand must have the same component count as Result Tpe and operands Result set 34 k lgamma Log gamma function of. Returns the natural logarithm of the absolute value of the gamma function. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 35 lgamma_r Log gamma function of. Returns the natural logarithm of the absolute value of the gamma function. The sign of the gamma function is returned in the signp operand and must be floating-point or vector(2,3,4,8,16) of floating-point values. singp must be a pointer(generic) to i32 or vector(2,3,4,8,16) of i32 values. and operands must be of the same tpe. singp operand must point to an i32 with the same component count as and operands Result set 36 singp log Compute natural logarithm of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe.

17 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 13 / Result set 37 log2 Compute a base 2 logarithm of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 38 log10 Compute a base 10 logarithm of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 39 log1p Compute log e (1.0 + ). and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 40 logb Compute the eponent of, which is the integral part of log r. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 41

18 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 14 / 80 mad mad approimates a * b + c. Whether or how the product of a * b is rounded and how supernormal or subnormal intermediate products are handled is not defined. mad is intended to be used where speed is preferred over accurac,a,b and c must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe. Note: For some usages, e.g.mad(a, b, -a*b), the definition of mad() is loose enough that almost an result is allowed from mad() for some values of a and b Result set 42 a b c mamag Returns if >, if >, otherwise fma(, )., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 43 minmag Returns if <, if <, otherwise fmin(, )., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 44 modf Decompose a floating-point number. The modf function breaks the argument into integral and fractional parts, each of which has the same sign as the argument. It stores the integral part in the object pointed to b iptr and must be floating-point or vector(2,3,4,8,16) of floating-point values. iptr must be a pointer(generic) to floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe, or must be a pointer to the same tpe.

19 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 15 / Result set 45 iptr nan Returns a quiet NaN. The nancode ma be placed in the significand of the resulting NaN. nancode must be i32 or vector(2,3,4,8,16) of i32 values. must be floating-point or vector(2,3,4,8,16) of floating-point values. and nancode operands must have the same component count Result set 46 nancode netafter Computes the net representable floating-point value following in the direction of. Thus, if is less than, netafter() returns the largest representable floating-point number less than., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 47 pow Compute to the power.,, and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 48

20 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 16 / 80 pown Compute to the power, where is an i32 integer. must be i32 or vector(2,3,4,8,16) of i32 values. must be floating-point or vector(2,3,4,8,16) of floating-point values. and operands must be of the same tpe. operand must have the same component count as and operands Result set 49 powr Compute to the power, where is an integer., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 50 remainder Compute the value r such that r = - n*, where n is the integer nearest the eact value of /. If there are two integers closest to /, n shall be the even one. If r is zero, it is given the same sign as., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 51

21 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 17 / 80 remquo The remquo function computes the value r such that r = - k*, where k is the integer nearest the eact value of /. If there are two integers closest to /, k shall be the even one. If r is zero, it is given the same sign as. This is the same value that is returned b the remainder function. remquo also calculates the lower seven bits of the integral quotient /, and gives that value the same sign as /. It stores this signed value in the object pointed to b quo., and must be floating-point or vector(2,3,4,8,16) of floating-point values. quo must be a pointer(generic) to i32 or vector(2,3,4,8,16) of i32 values., and operands must be of the same tpe. quo operand must point to an i32 with the same component count as, and operands Result set 52 quo rint Round to integral value (using round to nearest even rounding mode) in floating-point format. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 53 rootn Compute to the power 1/. must be i32 or vector(2,3,4,8,16) of i32 values. and must be floating-point or vector(2,3,4,8,16) of floating-point values. and operands must be of the same tpe. operand must have the same component count as and operands Result set 54

22 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 18 / 80 round Return the integral value nearest to rounding halfwa cases awa from zero, regardless of the current rounding direction. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 55 rsqrt Compute inverse square root of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 56 sin Compute sine of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 57 sincos Compute sine and cosine of. The computed sine is the return value and computed cosine is returned in cosval. and must be floating-point or vector(2,3,4,8,16) of floating-point values. cosval must be a pointer(generic) to floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe, or must be a pointer to the same tpe Result set 58 cosval

23 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 19 / 80 sinh Compute hperbolic sine of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 59 sinpi Compute sin (π ). and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 60 sqrt Compute square root of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 61 tan Compute tangent of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 62

24 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 20 / 80 tanh Compute hperbolic tangent of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 63 tanpi Compute tan (π ). and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 64 tgamma Compute the gamma function of. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 65 trunc Round to integral value using the round to zero rounding mode. and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 66

25 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 21 / 80 half_cos Compute cosine of, where must be in the range and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 67 half_divide Compute /., and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 68 half_ep Compute the base-e eponential of. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 69

26 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 22 / 80 half_ep2 Compute the base- 2 eponential of. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 70 half_ep10 Compute the base- 10 eponential of. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 71 half_log Compute natural logarithm of. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 72

27 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 23 / 80 half_log2 Compute a base 2 logarithm of. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 73 half_log10 Compute a base 10 logarithm of. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 74 half_powr Compute to the power, where is >= 0., and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 75

28 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 24 / 80 half_recip Compute reciprocal of. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 76 half_rsqrt Compute inverse square root of. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 77 half_sin Compute sine of, where must be in the range and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 78

29 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 25 / 80 half_sqrt Compute the square root of. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 79 half_tan Compute tangent value of, where must be in the range and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. This function is implemented with a minimum of 10-bits of accurac i.e. an ULP value 8192 ulp. The support for denormal values is optional and ma return an result allowed even when -cl-denormals-are-zero flag is not in force Result set 80 native_cos Compute cosine of over an implementation-defined range. The maimum error is implementation-defined. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 81

30 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 26 / 80 native_divide Compute / over an implementation-defined range. The maimum error is implementation-defined., and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 7 44 Result set 82 native_ep Compute the base-e eponential of over an implementation-defined range. The maimum error is implementation-defined. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 83 native_ep2 Compute the base- 2 eponential of over an implementation-defined range. The maimum error is implementation-defined.. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 84

31 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 27 / 80 native_ep10 Compute the base- 10 eponential of over an implementation-defined range. The maimum error is implementation-defined.. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 85 native_log Compute natural logarithm of over an implementation-defined range. The maimum error is implementation-defined. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 86 native_log2 Compute a base 2 logarithm of over an implementation-defined range. The maimum error is implementation-defined. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 87

32 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 28 / 80 native_log10 Compute a base 10 logarithm of over an implementation-defined range. The maimum error is implementation-defined. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 88 native_powr Compute to the power, where is >= 0., and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 7 44 Result set 89 native_recip Compute reciprocal of over an implementation-defined range. The range of and are implementation-defined. The maimum error is implementation-defined. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 90

33 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 29 / 80 native_rsqrt Compute inverse square root of over an implementation-defined range. The maimum error is implementation-defined. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 91 native_sin Compute sine of over an implementation-defined range. The maimum error is implementation-defined. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 92 native_sqrt Compute the square root of over an implementation-defined range. The maimum error is implementation-defined. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set 93

34 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 30 / 80 native_tan Compute tangent value of over an implementation-defined range. The maimum error is implementation-defined. and must be float or vector(2,3,4,8,16) of float values. All of the operands, including the operand, must be of the same tpe. The function ma map to one or more native device and will tpicall have better performance compared to the non native corresponding functions. Support for denormal values is implementation-defined for this function 6 44 Result set Integer This section describes the list of integer that take scalar or vector arguments. The vector versions of the integer functions operate component-wise. The description is per-component. s_abs Returns, where is treated as signed integer. and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 141 s_abs_diff Returns - without modulo overflow, where and are treated as signed integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 142

35 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 31 / 80 s_add_sat Returns the saturated value of +, where and are treated as signed integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 143 u_add_sat Returns the saturated value of +, where and are treated as unsigned integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 144 s_hadd Returns the value of ( + ) >> 1, where and are treated as signed integers. The intermediate sum does not modulo overflow., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 145 u_hadd Returns the value of ( + ) >> 1, where and are treated as unsigned integers. The intermediate sum does not modulo overflow., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 146

36 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 32 / 80 s_rhadd Returns the value of ( + + 1) >> 1, where and are treated as signed integers. The intermediate sum does not modulo overflow., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 147 u_rhadd Returns the value of ( + + 1) >> 1, where and are treated as unsigned integers. The intermediate sum does not modulo overflow., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 148 s_clamp Returns s_min(s_ma(,minval),maval). Results are undefined if minval > maval.,,minval and maval must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 149 minval maval u_clamp Returns u_min(u_ma(,minval),maval). Results are undefined if minval > maval.,,minval and maval must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 150 minval maval

37 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 33 / 80 clz Returns the number of leading 0-bits in, starting at the most significant bit position. If is 0, returns the size in bits of the tpe of or component tpe of, if is a vector. and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 151 ctz Returns the count of trailing 0-bits in. If is 0, returns the size in bits of the tpe of or component tpe of, if is a vector. and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 152 s_mad_hi Returns mul_hi(a, b) + c, where a,b and c are treated as signed integers.,a,b and c must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 153 a b c s_ma Returns if <, otherwise it returns, where and are treated as signed integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 156

38 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 34 / 80 u_ma Returns if <, otherwise it returns, where and are treated as unsigned integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 157 s_min Returns if <, otherwise it returns, where and are treated as signed integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 158 u_min Returns if <, otherwise it returns, where and are treated as unsigned integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 159 s_mul_hi Computes * and returns the high half of the product of and, where and are treated as signed integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 160

39 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 35 / 80 rotate For each element in v, the bits are shifted left b the number of bits given b the corresponding element in i. Bits shifted off the left side of the element are shifted back in from the right.,v and i must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 161 v i s_sub_sat Returns the saturated value of -, where and are treated as signed integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 162 u_sub_sat Returns the saturated value of -, where and are treated as unsigned integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 163

40 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 36 / 80 u_upsample When hi and lo component tpe is i8: Result = ((upcast... to i16)hi << 8) lo When hi and lo component tpe is i16: Result = ((upcast... to i32)hi << 8) lo When hi and lo component i32: Result = ((upcast... to i64)hi << 8) lo hi and lo are treated as unsigned integers. hi and lo must be i8, i16 or i32 or vector(2,3,4,8,16) of i8, i16 or i32 values. must be i16, i32 or i64 or vector(2,3,4,8,16) of i16, i32 or i64 values. hi and lo operands must be of the same tpe. When hi and lo component tpe is i8, the component tpe must be i16. When hi and lo component tpe is i16, the component tpe must be i32. When hi and lo component tpe is i32, the component tpe must be i64. must have the same component count as hi and lo operands Result set 164 hi lo s_upsample When hi and lo component tpe is i8: Result = ((upcast... to i16)hi << 8) lo When hi and lo component tpe is i16: Result = ((upcast... to i32)hi << 8) lo When hi and lo component i32: Result = ((upcast... to i64)hi << 8) lo hi and lo are treated as signed integers. hi and lo must be i8, i16 or i32 or vector(2,3,4,8,16) of i8, i16 or i32 values. must be i16, i32 or i64 or vector(2,3,4,8,16) of i16, i32 or i64 values. hi and lo operands must be of the same tpe. When hi and lo component tpe is i8, the component tpe must be i16. When hi and lo component tpe is i16, the component tpe must be i32. When hi and lo component tpe is i32, the component tpe must be i64. must have the same component count as hi and lo operands.

41 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 37 / Result set 165 hi lo popcount Returns the number of non-zero bits in. and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 166 s_mad24 Multip two 24-bit integer values and and add the 32-bit integer result to the 32-bit integer z. Refer to definition of s_mul24 to see how the 24-bit integer multiplication is performed.,, and z must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 167 z u_mad24 Multip two 24-bit integer values and and add the 32-bit integer result to the 32-bit integer z. Refer to definition of u_mul24 to see how the 24-bit integer multiplication is performed.,, and z must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 168 z s_mul24 Multipl two 24-bit integer values and, where and are treated as signed integers. and are 32-bit integers but onl the low 24-bits are used to perform the multiplication. s_mul24 should onl be used when values in and are in the range [-2 23, ]. If and are not in this range, the multiplication result is implementation-defined., and must be i32 or vector(2,3,4,8,16) of i32 values. All of the operands, including the operand, must be of the same tpe.

42 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 38 / Result set 169 u_mul24 Multipl two 24-bit integer values and, where and are treated as unsigned integers. and are 32-bit integers but onl the low 24-bits are used to perform the multiplication. u_mul24 should onl be used when values in and are in the range [0, ]. If and are not in this range, the multiplication result is implementation-defined., and must be i32 or vector(2,3,4,8,16) of i32 values. All of the operands, including the operand, must be of the same tpe Result set 170 u_abs Returns, where is treated as unsigned integer. and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 201 u_abs_diff Returns - without modulo overflow, where and are treated as unsigned integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 202 u_mul_hi Computes * and returns the high half of the product of and, where and are treated as unsigned integers., and must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 203

43 OpenCL 2.1 Etended Instruction Set Specification (Provisional) 39 / 80 u_mad_hi Returns mul_hi(a, b) + c, where a,b and c are treated as unsigned integers.,a,b and c must be integer or vector(2,3,4,8,16) of integer values. All of the operands, including the operand, must be of the same tpe Result set 204 a b c 2.3 Common This section describes the the list of common that take scalar or vector arguments. The vector versions of the integer functions operate component-wise. The description is per-component. The common are implemented using the round to nearest even rounding mode. fclamp Returns fmin(fma(, minval), maval). Results are undefined if minval > maval.,,minval and maval must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 95 minval maval degrees Converts radians to degrees, i.e. (180 / π) * radians. and radians must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe Result set 96 radians fma_common Returns if <, otherwise it returns. If or are infinite or NaN, the return values are undefined., and must be floating-point or vector(2,3,4,8,16) of floating-point values. All of the operands, including the operand, must be of the same tpe.

OpenCL Extended Instruction Set Specification

OpenCL Extended Instruction Set Specification OpenCL Etended Instruction Set Specification Boaz Ouriel, Intel Version 1., Revision 2 Ma 15, 217 OpenCL Etended Instruction Set Specification Copright 214-217 The Khronos Group Inc. All Rights Reserved.

More information

SPIR-V Extended Instructions for GLSL

SPIR-V Extended Instructions for GLSL SPIR-V Etended Instructions for GLSL John Kessenich, Google Version 1.00, Revision 7 August 8, 2018 SPIR-V Etended Instructions for GLSL Copyright 2014-2018 The Khronos Group Inc. All Rights Reserved.

More information

The OpenCL SPIR-V Environment Specification. Khronos OpenCL Working Group. Version 2.2-7, Sat, 12 May :21:

The OpenCL SPIR-V Environment Specification. Khronos OpenCL Working Group. Version 2.2-7, Sat, 12 May :21: The OpenCL SPIR-V Environment Specification Khronos OpenCL Working Group Version 2.2-7, Sat, 12 May 2018 13:21:25 +0000 Table of Contents 1. Introduction..............................................................................

More information

OpenCL ICD Installation Guidelines. Khronos OpenCL Working Group. Version 2.2-7, Sat, 12 May :21:

OpenCL ICD Installation Guidelines. Khronos OpenCL Working Group. Version 2.2-7, Sat, 12 May :21: OpenCL ICD Installation Guidelines Khronos OpenCL Working Group Version 2.2-7, Sat, 12 May 2018 13:21:25 +0000 Table of Contents 1. Introduction..............................................................................

More information

EGLStream DataLocator Extension Specification

EGLStream DataLocator Extension Specification 1 EGLStream DataLocator Extension Specification Version 1.0 Copyright 2011 The Khronos Group Inc. September 21, 2011 2 Copyright 2011 The Khronos Group Inc. All Rights Reserved. This specification is protected

More information

OpenCL Overview. Tim Mattson Intel Labs. Copyright Khronos Group, Page 1

OpenCL Overview. Tim Mattson Intel Labs. Copyright Khronos Group, Page 1 OpenCL Overview Tim Mattson Intel Labs Copyright Khronos Group, 2009 - Page 1 Programming Heterogeneous Platforms CPUs Multiple cores driving performance increases Emerging Intersection GPUs Increasingly

More information

Built-in Types of Data

Built-in Types of Data Built-in Types of Data Types A data type is set of values and a set of operations defined on those values Python supports several built-in data types: int (for integers), float (for floating-point numbers),

More information

The OpenVX Classifier Extension. The Khronos OpenVX Working Group, Editors: Tomer Schwartz, Radhakrishna Giduthuri

The OpenVX Classifier Extension. The Khronos OpenVX Working Group, Editors: Tomer Schwartz, Radhakrishna Giduthuri The OpenVX Classifier Extension The Khronos OpenVX Working Group, Editors: Tomer Schwartz, Radhakrishna Giduthuri Version 1.2.1 (provisional), Wed, 15 Aug 2018 06:03:09 +0000 Table of Contents 1. Classifiers

More information

Arithmetic and Logic Blocks

Arithmetic and Logic Blocks Arithmetic and Logic Blocks The Addition Block The block performs addition and subtractions on its inputs. This block can add or subtract scalar, vector, or matrix inputs. We can specify the operation

More information

The OpenVX User Data Object Extension

The OpenVX User Data Object Extension The OpenVX User Data Object Extension The Khronos OpenVX Working Group, Editor: Jesse Villarreal Version 1.0 (provisional), Wed, 13 Feb 2019 16:07:15 +0000 Table of Contents 1. Introduction.............................................................................................

More information

The OpenVX Buffer Aliasing Extension

The OpenVX Buffer Aliasing Extension The OpenVX Buffer Aliasing Extension The Khronos OpenVX Working Group, Editor: Jesse Villarreal Version 1.0 (provisional), Wed, 13 Feb 2019 16:07:12 +0000 Table of Contents 1. Introduction.............................................................................................

More information

Single row numeric functions

Single row numeric functions Single row numeric functions Oracle provides a lot of standard numeric functions for single rows. Here is a list of all the single row numeric functions (in version 10.2). Function Description ABS(n) ABS

More information

The OpenVX Export and Import Extension

The OpenVX Export and Import Extension The OpenVX Export and Import Extension The Khronos OpenVX Working Group, Editors: Steve Ramm, Radhakrishna Giduthuri Version 1.1.1, Wed, 15 Aug 2018 06:03:12 +0000 Table of Contents 1. Export and Import

More information

1001ICT Introduction To Programming Lecture Notes

1001ICT Introduction To Programming Lecture Notes 1001ICT Introduction To Programming Lecture Notes School of Information and Communication Technology Griffith University Semester 1, 2015 1 M Environment console M.1 Purpose This environment supports programming

More information

Script started on Thu 25 Aug :00:40 PM CDT

Script started on Thu 25 Aug :00:40 PM CDT Script started on Thu 25 Aug 2016 02:00:40 PM CDT < M A T L A B (R) > Copyright 1984-2014 The MathWorks, Inc. R2014a (8.3.0.532) 64-bit (glnxa64) February 11, 2014 To get started, type one of these: helpwin,

More information

Taipei Embedded Outreach OpenCL DSP Profile Proposals

Taipei Embedded Outreach OpenCL DSP Profile Proposals Copyright 2018 The Khronos Group Inc. Page 1 Taipei Embedded Outreach OpenCL DSP Profile Proposals Prof. Jenq-Kuen Lee, NTHU Taipei, January 2018 Copyright 2018 The Khronos Group Inc. Page 2 Outline Speaker

More information

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer Arithmetic ECE 666 Part 4-C Floating-Point Arithmetic - III Israel Koren ECE666/Koren Part.4c.1 Floating-Point Adders

More information

Floating-Point Arithmetic

Floating-Point Arithmetic ENEE446---Lectures-4/10-15/08 A. Yavuz Oruç Professor, UMD, College Park Copyright 2007 A. Yavuz Oruç. All rights reserved. Floating-Point Arithmetic Integer or fixed-point arithmetic provides a complete

More information

GPU Floating Point Features

GPU Floating Point Features CSE 591: GPU Programming Floating Point Considerations Klaus Mueller Computer Science Department Stony Brook University Objective To understand the fundamentals of floating-point representation To know

More information

Using the um-fpu with the Javelin Stamp

Using the um-fpu with the Javelin Stamp Using the um-fpu with the Javelin Stamp Introduction The um-fpu is a 32-bit floating point coprocessor that can be easily interfaced with the Javelin Stamp to provide support for 32-bit IEEE 754 floating

More information

C++, How to Program. Spring 2016 CISC1600 Yanjun Li 1

C++, How to Program. Spring 2016 CISC1600 Yanjun Li 1 Chapter 6 Function C++, How to Program Deitel & Deitel Spring 2016 CISC1600 Yanjun Li 1 Function A function is a collection of statements that performs a specific task - a single, well-defined task. Divide

More information

Functions. Systems Programming Concepts

Functions. Systems Programming Concepts Functions Systems Programming Concepts Functions Simple Function Example Function Prototype and Declaration Math Library Functions Function Definition Header Files Random Number Generator Call by Value

More information

Sum and Difference Identities. Cosine Sum and Difference Identities: cos A B. does NOT equal cos A. Cosine of a Sum or Difference. cos B.

Sum and Difference Identities. Cosine Sum and Difference Identities: cos A B. does NOT equal cos A. Cosine of a Sum or Difference. cos B. 7.3 Sum and Difference Identities 7-1 Cosine Sum and Difference Identities: cos A B Cosine of a Sum or Difference cos cos does NOT equal cos A cos B. AB AB EXAMPLE 1 Finding Eact Cosine Function Values

More information

How to Design Programs Languages

How to Design Programs Languages How to Design Programs Languages Version 4.1 August 12, 2008 The languages documented in this manual are provided by DrScheme to be used with the How to Design Programs book. 1 Contents 1 Beginning Student

More information

Macro Programming Reference Guide. Copyright 2005 Scott Martinez

Macro Programming Reference Guide. Copyright 2005 Scott Martinez Macro Programming Reference Guide Copyright 2005 Scott Martinez Section 1. Section 2. Section 3. Section 4. Section 5. Section 6. Section 7. What is macro programming What are Variables What are Expressions

More information

Unit 4 Trigonometry. Study Notes 1 Right Triangle Trigonometry (Section 8.1)

Unit 4 Trigonometry. Study Notes 1 Right Triangle Trigonometry (Section 8.1) Unit 4 Trigonometr Stud Notes 1 Right Triangle Trigonometr (Section 8.1) Objective: Evaluate trigonometric functions of acute angles. Use a calculator to evaluate trigonometric functions. Use trigonometric

More information

Introduction to GPGPUs and to CUDA programming model: CUDA Libraries

Introduction to GPGPUs and to CUDA programming model: CUDA Libraries Introduction to GPGPUs and to CUDA programming model: CUDA Libraries www.cineca.it Marzia Rivi m.rivi@cineca.it NVIDIA CUDA Libraries http://developer.nvidia.com/technologies/libraries CUDA Toolkit includes

More information

CUDA Toolkit 5.0 Performance Report. January 2013

CUDA Toolkit 5.0 Performance Report. January 2013 CUDA Toolkit 5.0 Performance Report January 2013 CUDA Math Libraries High performance math routines for your applications: cufft Fast Fourier Transforms Library cublas Complete BLAS Library cusparse Sparse

More information

Lecture 14. Daily Puzzle. Math in C. Rearrange the letters of eleven plus two to make this mathematical statement true. Eleven plus two =?

Lecture 14. Daily Puzzle. Math in C. Rearrange the letters of eleven plus two to make this mathematical statement true. Eleven plus two =? Lecture 14 Math in C Daily Puzzle Rearrange the letters of eleven plus two to make this mathematical statement true. Eleven plus two =? Daily Puzzle SOLUTION Eleven plus two = twelve plus one Announcements

More information

ALTERA_CORDIC IP Core User Guide

ALTERA_CORDIC IP Core User Guide UG-20017 2017.05.08 Subscribe Send Feedback Contents Contents 1... 3 1.1 ALTERA_CORDIC IP Core Features... 3 1.2 DSP IP Core Device Famil Support...3 1.3 ALTERA_CORDIC IP Core Functional Description...4

More information

INSIDE MACINTOSH. Addison-Wesley Publishing Company

INSIDE MACINTOSH. Addison-Wesley Publishing Company apple INSIDE MACINTOSH PowerPC Numerics Addison-Wesley Publishing Company Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario Wokingham, England Amsterdam Bonn Sydney Singapore Tokyo

More information

Floating Point Considerations

Floating Point Considerations Chapter 6 Floating Point Considerations In the early days of computing, floating point arithmetic capability was found only in mainframes and supercomputers. Although many microprocessors designed in the

More information

Maths Functions User Manual

Maths Functions User Manual Professional Electronics for Automotive and Motorsport 6 Repton Close Basildon Essex SS13 1LE United Kingdom +44 (0) 1268 904124 info@liferacing.com www.liferacing.com Maths Functions User Manual Document

More information

Mentor Graphics Predefined Packages

Mentor Graphics Predefined Packages Mentor Graphics Predefined Packages Mentor Graphics has created packages that define various types and subprograms that make it possible to write and simulate a VHDL model within the Mentor Graphics environment.

More information

C Functions. 5.2 Program Modules in C

C Functions. 5.2 Program Modules in C 1 5 C Functions 5.2 Program Modules in C 2 Functions Modules in C Programs combine user-defined functions with library functions - C standard library has a wide variety of functions Function calls Invoking

More information

Floating Point Puzzles The course that gives CMU its Zip! Floating Point Jan 22, IEEE Floating Point. Fractional Binary Numbers.

Floating Point Puzzles The course that gives CMU its Zip! Floating Point Jan 22, IEEE Floating Point. Fractional Binary Numbers. class04.ppt 15-213 The course that gives CMU its Zip! Topics Floating Point Jan 22, 2004 IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties Floating Point Puzzles For

More information

EE878 Special Topics in VLSI. Computer Arithmetic for Digital Signal Processing

EE878 Special Topics in VLSI. Computer Arithmetic for Digital Signal Processing EE878 Special Topics in VLSI Computer Arithmetic for Digital Signal Processing Part 4-B Floating-Point Arithmetic - II Spring 2017 Koren Part.4b.1 The IEEE Floating-Point Standard Four formats for floating-point

More information

CUDA Toolkit 4.0 Performance Report. June, 2011

CUDA Toolkit 4.0 Performance Report. June, 2011 CUDA Toolkit 4. Performance Report June, 211 CUDA Math Libraries High performance math routines for your applications: cufft Fast Fourier Transforms Library cublas Complete BLAS Library cusparse Sparse

More information

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer Arithmetic ECE 666 Part 4-B Floating-Point Arithmetic - II Israel Koren ECE666/Koren Part.4b.1 The IEEE Floating-Point

More information

Programming for Engineers in Python. Recitation 2

Programming for Engineers in Python. Recitation 2 Programming for Engineers in Python Recitation 2 Plan Range For loop While loop Lists Modules Operations Arithmetic Operations: + plus - minus * multiply / divide (int / float) % modulo (remainder) **

More information

Functions and Recursion

Functions and Recursion Functions and Recursion 1 Outline Introduction Program Components in C++ Math Library Functions Functions Function Definitions Function Prototypes Header Files Random Number Generation Example: A Game

More information

Dr Richard Greenaway

Dr Richard Greenaway SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 2 Basic MATLAB Operation Dr Richard Greenaway 2 Basic MATLAB Operation 2.1 Overview 2.1.1 The Command Line In this Workshop you will learn how

More information

MYSQL NUMERIC FUNCTIONS

MYSQL NUMERIC FUNCTIONS MYSQL NUMERIC FUNCTIONS http://www.tutorialspoint.com/mysql/mysql-numeric-functions.htm Copyright tutorialspoint.com MySQL numeric functions are used primarily for numeric manipulation and/or mathematical

More information

6-1 (Function). (Function) !*+!"#!, Function Description Example. natural logarithm of x (base e) rounds x to smallest integer not less than x

6-1 (Function). (Function) !*+!#!, Function Description Example. natural logarithm of x (base e) rounds x to smallest integer not less than x (Function) -1.1 Math Library Function!"#! $%&!'(#) preprocessor directive #include !*+!"#!, Function Description Example sqrt(x) square root of x sqrt(900.0) is 30.0 sqrt(9.0) is 3.0 exp(x) log(x)

More information

Secondary Math 3- Honors. 7-4 Inverse Trigonometric Functions

Secondary Math 3- Honors. 7-4 Inverse Trigonometric Functions Secondary Math 3- Honors 7-4 Inverse Trigonometric Functions Warm Up Fill in the Unit What You Will Learn How to restrict the domain of trigonometric functions so that the inverse can be constructed. How

More information

Outline. Introduction Intel Vector Math Library (VML) o Features and performance VML in Finance Useful links

Outline. Introduction Intel Vector Math Library (VML) o Features and performance VML in Finance Useful links Outline Introduction Intel Vector Math Library (VML) o Features and performance VML in Finance Useful links 2 Introduction VML is one component of Intel MKL Support HPC applications: o o Scientific & engineering

More information

Chapter 3 - Functions

Chapter 3 - Functions Chapter 3 - Functions 1 Outline 3.1 Introduction 3.2 Program Components in C++ 3.3 Math Library Functions 3.4 Functions 3.5 Function Definitions 3.6 Function Prototypes 3.7 Header Files 3.8 Random Number

More information

LogiCORE IP Floating-Point Operator v6.2

LogiCORE IP Floating-Point Operator v6.2 LogiCORE IP Floating-Point Operator v6.2 Product Guide Table of Contents SECTION I: SUMMARY IP Facts Chapter 1: Overview Unsupported Features..............................................................

More information

1. The Pythagorean Theorem

1. The Pythagorean Theorem . The Pythagorean Theorem The Pythagorean theorem states that in any right triangle, the sum of the squares of the side lengths is the square of the hypotenuse length. c 2 = a 2 b 2 This theorem can be

More information

Chap 6 Function Define a function, which can reuse a piece of code, just with a few different values.

Chap 6 Function Define a function, which can reuse a piece of code, just with a few different values. Chap 6 Function Define a function, which can reuse a piece of code, just with a few different values. def tax(bill): """Adds 8% tax to a restaurant bill.""" bill *= 1.08 print "With tax: %f" % bill return

More information

The OpenCL Extension Specification

The OpenCL Extension Specification The OpenCL Extension Specification Version: 2.0 Document Revision: 34 Khronos OpenCL Working Group Editor: Lee Howes and Aaftab Munshi Last Revision Date: February 13, 2018 Page 1 9. OPTIONAL EXTENSIONS...

More information

Highly Optimized Mathematical Functions for the Itanium Processor

Highly Optimized Mathematical Functions for the Itanium Processor Highly Optimized Mathematical Functions for the Itanium Processor! Speaker: Shane Story! Software Engineer! CSL Numerics Group! Corporation Copyright Copyright 2001 2001 Corporation. Agenda! Itanium Processor

More information

GRAPH 4.4. Megha K. Raman APRIL 22, 2015

GRAPH 4.4. Megha K. Raman APRIL 22, 2015 GRAPH 4.4 By Megha K. Raman APRIL 22, 2015 1. Preface... 4 2. Introduction:... 4 3. Plotting a function... 5 Sample funtions:... 9 List of Functions:... 10 Constants:... 10 Operators:... 11 Functions:...

More information

What is a Function? How to find the domain of a function (algebraically) Domain hiccups happen in 2 major cases (rational functions and radicals)

What is a Function? How to find the domain of a function (algebraically) Domain hiccups happen in 2 major cases (rational functions and radicals) What is a Function? Proving a Function Vertical Line Test Mapping Provide definition for function Provide sketch/rule for vertical line test Provide sketch/rule for mapping (notes #-3) How to find the

More information

Systems I. Floating Point. Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties

Systems I. Floating Point. Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties Systems I Floating Point Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties IEEE Floating Point IEEE Standard 754 Established in 1985 as uniform standard for

More information

The Sine and Cosine Functions

The Sine and Cosine Functions Lesson -5 Lesson -5 The Sine and Cosine Functions Vocabular BIG IDEA The values of cos and sin determine functions with equations = sin and = cos whose domain is the set of all real numbers. From the eact

More information

Floating-point representations

Floating-point representations Lecture 10 Floating-point representations Methods of representing real numbers (1) 1. Fixed-point number system limited range and/or limited precision results must be scaled 100101010 1111010 100101010.1111010

More information

Floating-point representations

Floating-point representations Lecture 10 Floating-point representations Methods of representing real numbers (1) 1. Fixed-point number system limited range and/or limited precision results must be scaled 100101010 1111010 100101010.1111010

More information

tag 220 tan[f l] struct { int i; double d; } sa, sb; struct { int i; double d; } s1, s2;

tag 220 tan[f l] struct { int i; double d; } sa, sb; struct { int i; double d; } s1, s2; tag 220 T tag The identifier that may optionally follow the keyword struct, union, or enum in a structure, union, or enumerated type definition, respectively. The tag is used later to refer to that particular

More information

LAB 1 General MATLAB Information 1

LAB 1 General MATLAB Information 1 LAB 1 General MATLAB Information 1 General: To enter a matrix: > type the entries between square brackets, [...] > enter it by rows with elements separated by a space or comma > rows are terminated by

More information

ECET 264 C Programming Language with Applications

ECET 264 C Programming Language with Applications ECET 264 C Programming Language with Applications Lecture 10 C Standard Library Functions Paul I. Lin Professor of Electrical & Computer Engineering Technology http://www.etcs.ipfw.edu/~lin Lecture 10

More information

OpenGL R SC Version (Full Specification) (April 19, 2016) Editors (version 2.0): Aidan Fabius, Steve Viggers

OpenGL R SC Version (Full Specification) (April 19, 2016) Editors (version 2.0): Aidan Fabius, Steve Viggers OpenGL R SC Version 2.0.0 (Full Specification) (April 19, 2016) Editors (version 2.0): Aidan Fabius, Steve Viggers Copyright c 2016 The Khronos Group Inc. All Rights Reserved. This specification is protected

More information

Floating Point Puzzles. Lecture 3B Floating Point. IEEE Floating Point. Fractional Binary Numbers. Topics. IEEE Standard 754

Floating Point Puzzles. Lecture 3B Floating Point. IEEE Floating Point. Fractional Binary Numbers. Topics. IEEE Standard 754 Floating Point Puzzles Topics Lecture 3B Floating Point IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties For each of the following C expressions, either: Argue that

More information

Floating Point Puzzles. Lecture 3B Floating Point. IEEE Floating Point. Fractional Binary Numbers. Topics. IEEE Standard 754

Floating Point Puzzles. Lecture 3B Floating Point. IEEE Floating Point. Fractional Binary Numbers. Topics. IEEE Standard 754 Floating Point Puzzles Topics Lecture 3B Floating Point IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties For each of the following C expressions, either: Argue that

More information

Floating point. Today! IEEE Floating Point Standard! Rounding! Floating Point Operations! Mathematical properties. Next time. !

Floating point. Today! IEEE Floating Point Standard! Rounding! Floating Point Operations! Mathematical properties. Next time. ! Floating point Today! IEEE Floating Point Standard! Rounding! Floating Point Operations! Mathematical properties Next time! The machine model Chris Riesbeck, Fall 2011 Checkpoint IEEE Floating point Floating

More information

Basic types and definitions. Chapter 3 of Thompson

Basic types and definitions. Chapter 3 of Thompson Basic types and definitions Chapter 3 of Thompson Booleans [named after logician George Boole] Boolean values True and False are the result of tests are two numbers equal is one smaller than the other

More information

Introduction to Programming

Introduction to Programming Introduction to Programming session 9 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2010 These slides are created using Deitel s slides Sahrif University of Technology Outlines

More information

Package cgraph. March 11, 2019

Package cgraph. March 11, 2019 Type Package Title Computational Graphs Version 4.0.1 Author Maintainer URL https://cgraph.org/ Package cgraph March 11, 2019 BugReports https://github.com/triepels/cgraph/issues Allows

More information

IB SL REVIEW and PRACTICE

IB SL REVIEW and PRACTICE IB SL REVIEW and PRACTICE Topic: CALCULUS Here are sample problems that deal with calculus. You ma use the formula sheet for all problems. Chapters 16 in our Tet can help ou review. NO CALCULATOR Problems

More information

Module 12 Floating-Point Considerations

Module 12 Floating-Point Considerations GPU Teaching Kit Accelerated Computing Module 12 Floating-Point Considerations Lecture 12.1 - Floating-Point Precision and Accuracy Objective To understand the fundamentals of floating-point representation

More information

TABLE OF CONTENTS CHAPTER 1 LIMIT AND CONTINUITY... 26

TABLE OF CONTENTS CHAPTER 1 LIMIT AND CONTINUITY... 26 TABLE OF CONTENTS CHAPTER LIMIT AND CONTINUITY... LECTURE 0- BASIC ALGEBRAIC EXPRESSIONS AND SOLVING EQUATIONS... LECTURE 0- INTRODUCTION TO FUNCTIONS... 9 LECTURE 0- EXPONENTIAL AND LOGARITHMIC FUNCTIONS...

More information

GREENWOOD PUBLIC SCHOOL DISTRICT Algebra III Pacing Guide FIRST NINE WEEKS

GREENWOOD PUBLIC SCHOOL DISTRICT Algebra III Pacing Guide FIRST NINE WEEKS GREENWOOD PUBLIC SCHOOL DISTRICT Algebra III FIRST NINE WEEKS Framework/ 1 Aug. 6 10 5 1 Sequences Express sequences and series using recursive and explicit formulas. 2 Aug. 13 17 5 1 Sequences Express

More information

3.9 Differentials. Tangent Line Approximations. Exploration. Using a Tangent Line Approximation

3.9 Differentials. Tangent Line Approximations. Exploration. Using a Tangent Line Approximation 3.9 Differentials 3 3.9 Differentials Understand the concept of a tangent line approimation. Compare the value of the differential, d, with the actual change in,. Estimate a propagated error using a differential.

More information

System Programming CISC 360. Floating Point September 16, 2008

System Programming CISC 360. Floating Point September 16, 2008 System Programming CISC 360 Floating Point September 16, 2008 Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties Powerpoint Lecture Notes for Computer Systems:

More information

Lesson #3. Variables, Operators, and Expressions. 3. Variables, Operators and Expressions - Copyright Denis Hamelin - Ryerson University

Lesson #3. Variables, Operators, and Expressions. 3. Variables, Operators and Expressions - Copyright Denis Hamelin - Ryerson University Lesson #3 Variables, Operators, and Expressions Variables We already know the three main types of variables in C: int, char, and double. There is also the float type which is similar to double with only

More information

NAN propagation versus fault trapping in floating point code

NAN propagation versus fault trapping in floating point code NAN propagation versus fault trapping in floating point code By Agner Fog. Technical University of Denmark. Copyright 2018. Last updated 2018-05-24. Contents 1 Introduction... 1 2 Fault trapping... 1 3

More information

A. Matrix-wise and element-wise operations

A. Matrix-wise and element-wise operations USC GSBME MATLAB CLASS Reviewing previous session Second session A. Matrix-wise and element-wise operations A.1. Matrix-wise operations So far we learned how to define variables and how to extract data

More information

Function Example. Function Definition. C Programming. Syntax. A small program(subroutine) that performs a particular task. Modular programming design

Function Example. Function Definition. C Programming. Syntax. A small program(subroutine) that performs a particular task. Modular programming design What is a Function? C Programming Lecture 8-1 : Function (Basic) A small program(subroutine) that performs a particular task Input : parameter / argument Perform what? : function body Output t : return

More information

Chapter 2 Float Point Arithmetic. Real Numbers in Decimal Notation. Real Numbers in Decimal Notation

Chapter 2 Float Point Arithmetic. Real Numbers in Decimal Notation. Real Numbers in Decimal Notation Chapter 2 Float Point Arithmetic Topics IEEE Floating Point Standard Fractional Binary Numbers Rounding Floating Point Operations Mathematical properties Real Numbers in Decimal Notation Representation

More information

Julia Calculator ( Introduction)

Julia Calculator ( Introduction) Julia Calculator ( Introduction) Julia can replicate the basics of a calculator with the standard notations. Binary operators Symbol Example Addition + 2+2 = 4 Substraction 2*3 = 6 Multify * 3*3 = 9 Division

More information

SPIR-V Specification. John Kessenich, Google and Boaz Ouriel, Intel. Version 1.00, Revision 12

SPIR-V Specification. John Kessenich, Google and Boaz Ouriel, Intel. Version 1.00, Revision 12 John Kessenich, Google and Boaz Ouriel, Intel Version 1.00, Revision 12 January 16, 2018 Copyright 2014-2017 The Khronos Group Inc. All Rights Reserved. This specification is protected by copyright laws

More information

C NUMERIC FORMATS. Overview. IEEE Single-Precision Floating-point Data Format. Figure C-0. Table C-0. Listing C-0.

C NUMERIC FORMATS. Overview. IEEE Single-Precision Floating-point Data Format. Figure C-0. Table C-0. Listing C-0. C NUMERIC FORMATS Figure C-. Table C-. Listing C-. Overview The DSP supports the 32-bit single-precision floating-point data format defined in the IEEE Standard 754/854. In addition, the DSP supports an

More information

MATLAB Constants, Variables & Expression. 9/12/2015 By: Nafees Ahmed

MATLAB Constants, Variables & Expression. 9/12/2015 By: Nafees Ahmed MATLAB Constants, Variables & Expression Introduction MATLAB can be used as a powerful programming language. It do have IF, WHILE, FOR lops similar to other programming languages. It has its own vocabulary

More information

Floating Point January 24, 2008

Floating Point January 24, 2008 15-213 The course that gives CMU its Zip! Floating Point January 24, 2008 Topics IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties class04.ppt 15-213, S 08 Floating

More information

ISO/IEC TS OVERVIEW

ISO/IEC TS OVERVIEW ISO/IEC TS 18661 OVERVIEW 23 rd IEEE Symposium on Computer Arithmetic ARITH23 July 13, 2016 Jim Thomas jaswthomas@sbcglobal.net Davis, CA USA ISO/IEC Technical Specification 18661 C extensions to support

More information

CUDA 6.0 Performance Report. April 2014

CUDA 6.0 Performance Report. April 2014 CUDA 6. Performance Report April 214 1 CUDA 6 Performance Report CUDART CUDA Runtime Library cufft Fast Fourier Transforms Library cublas Complete BLAS Library cusparse Sparse Matrix Library curand Random

More information

Request for Quotations

Request for Quotations Request for Quotations OpenCL 2.2 CTS September 2016 Notice ALL KHRONOS SPECIFICATIONS AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, MATERIALS ) ARE BEING PROVIDED AS IS. KHRONOS MAKES NO WARRANTIES, EXPRESSED,

More information

Section 1.4 Limits involving infinity

Section 1.4 Limits involving infinity Section. Limits involving infinit (/3/08) Overview: In later chapters we will need notation and terminolog to describe the behavior of functions in cases where the variable or the value of the function

More information

Finite arithmetic and error analysis

Finite arithmetic and error analysis Finite arithmetic and error analysis Escuela de Ingeniería Informática de Oviedo (Dpto de Matemáticas-UniOvi) Numerical Computation Finite arithmetic and error analysis 1 / 45 Outline 1 Number representation:

More information

Giving credit where credit is due

Giving credit where credit is due CSCE 230J Computer Organization Floating Point Dr. Steve Goddard goddard@cse.unl.edu http://cse.unl.edu/~goddard/courses/csce230j Giving credit where credit is due Most of slides for this lecture are based

More information

Computational Physics

Computational Physics Computational Physics Python Programming Basics Prof. Paul Eugenio Department of Physics Florida State University Jan 17, 2019 http://hadron.physics.fsu.edu/~eugenio/comphy/ Announcements Exercise 0 due

More information

2.2 Absolute Value Functions

2.2 Absolute Value Functions . Absolute Value Functions 7. Absolute Value Functions There are a few was to describe what is meant b the absolute value of a real number. You ma have been taught that is the distance from the real number

More information

CSCI 402: Computer Architectures. Arithmetic for Computers (3) Fengguang Song Department of Computer & Information Science IUPUI.

CSCI 402: Computer Architectures. Arithmetic for Computers (3) Fengguang Song Department of Computer & Information Science IUPUI. CSCI 402: Computer Architectures Arithmetic for Computers (3) Fengguang Song Department of Computer & Information Science IUPUI 3.5 Today s Contents Floating point numbers: 2.5, 10.1, 100.2, etc.. How

More information

Giving credit where credit is due

Giving credit where credit is due JDEP 284H Foundations of Computer Systems Floating Point Dr. Steve Goddard goddard@cse.unl.edu Giving credit where credit is due Most of slides for this lecture are based on slides created by Drs. Bryant

More information

Floating-Point Mathematical Co-Processor for a Single-Chip On-Board Computer

Floating-Point Mathematical Co-Processor for a Single-Chip On-Board Computer Floating-Point Mathematical Co-Processor for a Single-Chip On-Board Computer Tana Vladimirova, David Eame, Sven Keller and Prof Sir Martin Sweeting Surre Space Centre School of Electronics and Phsical

More information

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for 1 Logistics Notes for 2016-09-07 1. We are still at 50. If you are still waiting and are not interested in knowing if a slot frees up, let me know. 2. There is a correction to HW 1, problem 4; the condition

More information

Introduction to Scientific and Engineering Computing, BIL108E. Karaman

Introduction to Scientific and Engineering Computing, BIL108E. Karaman USING MATLAB INTRODUCTION TO SCIENTIFIC & ENGINEERING COMPUTING BIL 108E, CRN24023 To start from Windows, Double click the Matlab icon. To start from UNIX, Dr. S. Gökhan type matlab at the shell prompt.

More information

Computing Fundamentals

Computing Fundamentals Computing Fundamentals Salvatore Filippone salvatore.filippone@uniroma2.it 2012 2013 (salvatore.filippone@uniroma2.it) Computing Fundamentals 2012 2013 1 / 18 Octave basics Octave/Matlab: f p r i n t f

More information

POLYMATH POLYMATH. for IBM and Compatible Personal Computers. for IBM and Compatible Personal Computers

POLYMATH POLYMATH. for IBM and Compatible Personal Computers. for IBM and Compatible Personal Computers POLYMATH VERSION 4.1 Provides System Printing from Windows 3.X, 95, 98 and NT USER-FRIENDLY NUMERICAL ANALYSIS PROGRAMS - SIMULTANEOUS DIFFERENTIAL EQUATIONS - SIMULTANEOUS ALGEBRAIC EQUATIONS - SIMULTANEOUS

More information

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer Arithmetic ECE 666 Part 4-A Floating-Point Arithmetic Israel Koren ECE666/Koren Part.4a.1 Preliminaries - Representation

More information