How do you get the ULP a number with a maximum mantissa value?

The way I understand ULP is that it is the gap between two consecutive floating point numbers. The book I’m reading says that ULP = machine epsilon times two to the exponent. This seems correct to me only if the two numbers have the same exponent.

For instance, say you have a 5 bit mantissa and a 3 bit exponent, and you have the floating point number 11111 100. In order to find the next largest floating point, you can’t simply add 1/32 to the mantissa, because you would overflow. So, can you even say a number like 11111 100 has a ULP?

2

“ULP” stands for “Unit of Least Precision.” So, going by name, it is the position value of the lowest digit in the significand1. With this, the ULP of the largest representable finite number is the so-called epsilon scaled by the exponent.

As njuffa notes, there are multiple definitions of an ULP or similar concepts, so which definition you use depends on what purpose you want to serve. It is useful for discussing or reasoning about the spacing between floating-point numbers, but there are various features that have to be taken into account.

For example, it is incorrect to state an ULP is the distance to the next representable value. One reason is, as you have noted, that fails at the largest representable finite number. Another is it fails for negative numbers at each point where the exponent changes. The distance from −1 to the next greater representable number is, in a base-two format, half an ULP of −1, not a full ULP, due to the exponent decrease.

Rounding in floating-point arithmetic operations behaves as if there were another representable value one ULP greater than the largest representable finite value. If rounding would produce that next number, ∞ is produced instead. So, in a certain way, the ULP is the step size to the “next” number.

Another issue with ULP arises when you want to discuss the spacing between floating-point numbers at a certain number, but that number is not representable in the floating-point format; it is between two representable numbers. Since it is not representable in the format, it does not have a significand in the format, so it does not have a lowest digit in its significand. You need a measurement other than a nominal ULP.

Mostly I prefer to use ULP to mean the spacing of representable numbers in the exponent interval containing the absolute value of the number, [be, be+1), and then discuss/prove whatever error, precision, or rounding property I need in terms of that unit. But that definition still needs to be completed for an interval around zero and for beyond the largest representable finite value.

Footnote

1 “Significand” is the preferred term for the fraction part of a floating-point number. “Mantissa” is an old term for the fraction part of a logarithm. Mantissas are logarithmic; adding to the mantissa multiplies the number. Significands are linear; adding to the significand adds to the number (as scaled by the exponent).

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật