সব বই

পেশাদার

1 Markets I: The Ecosystem and Exchange-Traded Marketsবাজার অনলাইন 2 Markets II: Rates, FX and Creditবাজার অনলাইন 3 Markets III: Commodities, Energy and Cryptoবাজার অনলাইন 4 Quantitative Methodsপদ্ধতি অনলাইন 5 Derivatives and Volatilityডেরিভেটিভস অনলাইন 6 Rates, Credit, XVA and Riskসুদহার, ঋণ ও ঝুঁকি অনলাইন 7 Research Craft: Predictors, Backtests, Measurement, Portfoliosগবেষণা অনলাইন 8 Strategies I: Equities and Futuresকৌশল অনলাইন 9 Strategies II: Volatility, Relative Value, Macro and the Bank Desksকৌশল অনলাইন 10 Microstructure and Executionএক্সিকিউশন অনলাইন 11 Market Making and High-Frequency Tradingমার্কেট মেকিং অনলাইন 12 Machine Learning for Marketsমেশিন লার্নিং অনলাইন 13 Low-Latency Softwareপ্রযুক্তি অনলাইন 14 Networks, Hardware and Trading Infrastructureপ্রযুক্তি অনলাইন 15 Research, Data and Risk Platformsপ্রযুক্তি অনলাইন 16 The Desk and the Firmপ্রতিষ্ঠান অনলাইন 17 The Industry: Firms, Roles and Careersক্যারিয়ার অনলাইন 18 Interviews I: Maths, Probability and Speedক্যারিয়ার অনলাইন 19 Interviews II: Markets, Trading Games and the Final Roundক্যারিয়ার অনলাইন 20 Interviews III: Codeক্যারিয়ার অনলাইন
অ্যাপ পরিচিতি Coach সাইন ইন পড়া শুরু করো

বইগুলো এখনো বাংলা ভাষায় পাওয়া যায় না — ইংরেজি সংস্করণ দেখানো হচ্ছে।

Computer Science · পরিভাষা

Cast কী?

Definition 2.4 University Computer Science — Year 1 · অধ্যায় 2 — C: Types, Operators and Control Flow

A cast is an explicit conversion, written (type)expression. Converting a floating value to an integer type drops the fractional part (it truncates toward zero); converting an integer to a narrower unsigned type keeps it modulo 2N2^N.

Where the usual arithmetic conversions lead two operands. Narrow types are first promoted to int. Two signed or two unsigned operands meet at the greater rank, up their column (i). A signed operand goes to the unsigned operand’s type when that rank is equal or greater: right at the same rank, then up (ii). When the signed operand has the greater rank, the unsigned one moves to it along a dashed arrow if that type holds all its values, as unsigned into a 64-bit long; if not, both go to the unsigned type of the greater rank (iii). A floating operand makes the whole operation floating.
Where the usual arithmetic conversions lead two operands. Narrow types are first promoted to int. Two signed or two unsigned operands meet at the greater rank, up their column (i). A signed operand goes to the unsigned operand’s type when that rank is equal or greater: right at the same rank, then up (ii). When the signed operand has the greater rank, the unsigned one moves to it along a dashed arrow if that type holds all its values, as unsigned into a 64-bit long; if not, both go to the unsigned type of the greater rank (iii). A floating operand makes the whole operation floating.

উদাহরণ

Example 2.5 (Why -1 < 1u is false)

In minus_one < one, both operands have rank int and one is unsigned, so by case (ii) minus_one is converted to unsigned: −1 mod 232=4294967295-1 \bmod 2^{32} = 4294967295, which is not less than 1. In big < one, big is a long, of greater rank, and on this machine long can hold every unsigned value: by case (iii) one is converted to long, and −1<1-1 < 1 is true. The same expression gives the opposite answer on a system where long has 32 bits: long then cannot hold 4294967295, so case (iii) sends both operands to unsigned long, and big becomes 4294967295 again.

প্রসঙ্গসহ পড়ো →