Вообще float является крайне интересным типом данных и не перестает удивлять своими особенностями. Про значение Not a Number мы уже писали, а вот сегодня поговорим про infinity.
Строковые литералы 'inf' и 'infinity' можно конвертировать в float, и в результате получается значение бесконечности. Для отрицательной "бесконечности" нужно поставить знак минуса перед словом.
Такой прием может быть полезен в коде, где требуется хранить в переменной самое большое или самое маленькое числовое значение для дальнейшего сравнения.
Вообще float является крайне интересным типом данных и не перестает удивлять своими особенностями. Про значение Not a Number мы уже писали, а вот сегодня поговорим про infinity.
Строковые литералы 'inf' и 'infinity' можно конвертировать в float, и в результате получается значение бесконечности. Для отрицательной "бесконечности" нужно поставить знак минуса перед словом.
Такой прием может быть полезен в коде, где требуется хранить в переменной самое большое или самое маленькое числовое значение для дальнейшего сравнения.
The lead from Wall Street offers little clarity as the major averages opened lower on Friday and then bounced back and forth across the unchanged line, finally finishing mixed and little changed.The Dow added 33.18 points or 0.10 percent to finish at 34,798.00, while the NASDAQ eased 4.54 points or 0.03 percent to close at 15,047.70 and the S&P 500 rose 6.50 points or 0.15 percent to end at 4,455.48. For the week, the Dow rose 0.6 percent, the NASDAQ added 0.1 percent and the S&P gained 0.5 percent.The lackluster performance on Wall Street came on uncertainty about the outlook for the markets following recent volatility.
Telegram Gives Up On Crypto Blockchain Project
Durov said on his Telegram channel today that the two and a half year blockchain and crypto project has been put to sleep. Ironically, after leaving Russia because the government wanted his encryption keys to his social media firm, Durov’s cryptocurrency idea lost steam because of a U.S. court. “The technology we created allowed for an open, free, decentralized exchange of value and ideas. TON had the potential to revolutionize how people store and transfer funds and information,” he wrote on his channel. “Unfortunately, a U.S. court stopped TON from happening.”