org.bson.types.Decimal128.fromIEEE754BIDEncoding()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.0k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.bson.types.Decimal128.fromIEEE754BIDEncoding()方法的一些代码示例,展示了Decimal128.fromIEEE754BIDEncoding()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Decimal128.fromIEEE754BIDEncoding()方法的具体详情如下:
包路径:org.bson.types.Decimal128
类名称:Decimal128
方法名:fromIEEE754BIDEncoding

Decimal128.fromIEEE754BIDEncoding介绍

[英]Create an instance with the given high and low order bits representing this Decimal128 as an IEEE 754-2008 128-bit decimal floating point using the BID encoding scheme.
[中]使用BID编码方案创建一个实例,使用给定的高阶和低阶位将该小数128表示为IEEE 754-2008 128位十进制浮点。

代码示例

代码示例来源:origin: org.mongodb/mongo-java-driver

@Override
public Decimal128 doReadDecimal128() {
  long low = bsonInput.readInt64();
  long high = bsonInput.readInt64();
  return Decimal128.fromIEEE754BIDEncoding(high, low);
}

代码示例来源:origin: com.torodb.mongowp.bson/org-bson-utils

(com.torodb.mongowp.bson.BsonDecimal128) value;
return new org.bson.BsonDecimal128(
    Decimal128.fromIEEE754BIDEncoding(casted.getHigh(), casted.getLow()));

相关文章