当前位置:网站首页>Double.doubleToLongBits() method uses
Double.doubleToLongBits() method uses
2022-08-10 11:08:00 【zhangjianming2018】
This method can convert double type data into long type data, so that the double type data can be judged according to the long method (<,>, ==).
Example:
Double.doubleToLongBits(10.00) == Double.doubleToLongBits(10.00)Double.doubleToLongBits(20.00) > Double.doubleToLongBits(10.00)Double.doubleToLongBits(10.00) < Double.doubleToLongBits(20.00)
Double class longBitsToDouble() method (Double class longBitsToDouble() method)
longBitsToDouble() method is available in java.lang package.
longBitsToDouble() method is available in java.lang package.
longBitsToDouble() method is used to return the double value corresponding to the given long bit denotation followed by IEEE 754 double floating-point standards.
longBitsToDouble() method returns the double precision value corresponding to the given long bit symbol, followed by the IEEE 754 double floating point standard. longBitsToDouble() method is a static method, it is accessible with the class name too and if we try to access the method with the class object then also we will not get an error.
The longBitsToDouble() method is a static method and can also be accessed using the class name, and if you try to access the method using the class object, you will not get an error.
longBitsToDouble() method does not throw an exception at the time of representing bits.
longBitsToDouble() method does not throw an exception at the time of representing bits.
longBitsToDouble() methoddoes not throw an exception.
Syntax:
Syntax
public static double longBitsToDouble(long bits_rep);Parameter(s):
Parameters:
long bits_rep – represents the long integer value.
long bits_rep – represents the long integer value.
Return value:
Return value:
The return type of this method is double, it returns the bits that represent the long integer value.
The return type of this method is double, which returns the bits representing the long value.
Note:
Note:
If we pass "0x7ff0000000000000L", it returns the value "positive infinity".
If we pass "0x7ff0000000000000L" which will return the value "positive infinity".
If we pass "0xfff0000000000000L", it returns the value "negative infinity".
If we pass "0xfff0000000000000L" which will return the value "negative infinity".
// Java program to demonstrate the example// of longBitsToDouble(long bits_rep)// method of Double classpublic class LongBitsToDoubleOfDoubleClass {public static void main(String[] args) {// Variables initializationdouble d1 = 18.20;double d2 = 19.20;// Display value1,value2 valuesSystem.out.println("d1: " + d1);System.out.println("d2: " + d2);// Double instance creationDouble value1 = new Double(d1);Double value2 = new Double(d2);// It returns the double value denoted by the given bit denotation//by calling value1.longBitsToDouble(124568)double result1 = value1.longBitsToDouble(124568);// It returns the double value denoted by the given bit denotation//by calling value1.longBitsToDouble(124568)double result2 = value2.longBitsToDouble(0xfff0000000000000L);// Display result1,result2 valuesSystem.out.println("value1.longBitsToDouble(124568): " + result1);System.out.println("value2.longBitsToDouble(0xfff0000000000000L): " + result2);}}d1: 18.2d2: 19.2value1.longBitsToDouble(124568): 6.1545E-319value2.longBitsToDouble(0xfff0000000000000L): -Infinity边栏推荐
- Techches Transformer the join wisdom source the author cao, visual basic model study
- EasyCVR级联时,修改下级平台名称将不同步至上级平台
- 关于json转换器缺失的问题,报错内容:No converter found for return value of type
- 是什么影响了MySQL性能?
- "Scalability" extensibility best practices: lessons from eBay
- [Concept of Theory of Knowledge] "Progress in the Theory of Reason" University of Leuven 2022 latest 220-page doctoral dissertation
- [Azure Cloud] What is the difference between a service endpoint and a private link?point of view (1)
- 【勇敢饭饭,不怕刷题之链表】链表倒数节点问题
- 2022.8.7-----leetcode.636
- C#实战:基于ItextSharp技术标签生成小工具
猜你喜欢

第2章-矩阵及其运算-矩阵运算(2)

Dialogue with Chen Ciliang: Nezha wants to popularize high-end products

Introduction to cross-end development of Taro applet

Redis (six) - transaction and lock mechanism of Redis6 (unfinished, to be supplemented)

owl.carousel poster card Slider carousel switch

蔚来-软件开发工程师一面记录

ISO9001在讲什么?过程方法和风险思维

Memory problems difficult to locate, it is because you do not use ASAN

Dry goods!ASSANet: Making PointNet++ faster and stronger

第2章-矩阵及其运算-矩阵创建(1)
随机推荐
OSSCore 开源解决方案介绍
Redis(六)——Redis6的事务和锁机制(未完成,待补)
一文带你搞懂中断按键驱动程序之poll机制
突破次元壁垒,让身边的玩偶手办在屏幕上动起来!
「业务架构」介绍BPMN第二部分-泳道
runtime-core.esm-bundler.js?d2dd:218 Uncaught TypeError: formRef.value?.validate is not a function
内存问题难定位,那是因为你没用ASAN
C语言空白符、空格符 与转义字符题点总结
【Azure云】服务端点和私有链接有什么区别?观点(1)
ESP8266 Tutorial 1 - Introduction to ESP8266 Hardware Platform
OneFlow source code parsing: operator instructions executed in a virtual machine
阻塞 非阻塞 poll机制 异步
ZZULIOJ 1124: 两个有序数组合并
谷歌数据中心发生“电力事故”造成 3 人受伤
这些年我开源的几个小项目
Regarding the missing json converter, the error message is: No converter found for return value of type
What is an abstract class
组合模式:Swift 实现
Introduction to cross-end development of Taro applet
快速上手,征服三种不同分布式架构调用方案