pow2函数

pow2函数

Base 2 power and scale floating-point numbers

2为基底的幂函数。

Syntax

语法

X = pow2(Y)

X = pow2(F,E)

Description

描述

X = pow2(Y) returns an array X whose elements are 2 raised to the power Y.

X=pow2(Y)返回一个X阵列其元素是以2为基底Y次幂。

X = pow2(F,E) computes  for corresponding elements of F and E. The result is computed quickly by simply adding E to the floating-point exponent of F. Arguments F and E are real and integer arrays, respectively.

X=pow2(F,E)计算FE的相应元素。结果计算很快,添加简单的E用来计算幂指数,再乘F。变量FE分别是实数并是整数阵列。

Remarks

备注

This function corresponds to the ANSI C function ldexp() and the IEEE floating-point standard function scalbn().

这个函数对应的ANSI C函数 1dexp()IEEE浮点标准函数scalbn()

Examples

例如:

For IEEE arithmetic, the statement X = pow2(F,E) yields the values:

IEEE运算,语句X=pow2(F,E)服从于值:

    F         E        X

    1/2       1        1

    pi/4      2        pi

    -3/4      2        -3

    1/2       -51      eps

    1-eps/2   1024     realmax

    1/2       -1021    realmin 

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值