[00:00:01] [music] [00:00:06] >> Not not .NET Aspire here, but .NET 11 [00:00:08] Numerics. Uh, [00:00:10] so I'm a principal engineer on the .NET [00:00:13] Libraries team here at Microsoft and [00:00:16] I'm the owner for Numerics, Hardware [00:00:18] Intrinsics, and a lot of the low-level [00:00:21] perf and math areas. And so today we're [00:00:23] going to dive into some of the [00:00:25] new representations, performance [00:00:27] improvements, and stronger guarantees [00:00:30] that we've enabled in .NET 11. [00:00:33] So [00:00:35] to start with that, [00:00:38] there's kind of three main areas we're [00:00:40] going to cover. [00:00:41] One is representation. So we have new [00:00:44] IEEE based [00:00:46] decimal formats. [00:00:48] So that's base 10 instead of the [00:00:50] standard base two like float and double [00:00:52] R. [00:00:53] We will also be covering the the [00:00:55] Bfloat16 support which is a type that [00:00:58] helps in various AI scenarios. [00:01:02] We will also be covering how you can [00:01:04] compose various algorithms [00:01:08] using generic math so that you can [00:01:11] really focus on writing your code once [00:01:13] and allowing it to be reused across [00:01:15] different types. So maybe you have a [00:01:18] general mathematical algorithm and you [00:01:21] want to support it for double, [00:01:23] but you also want it to work with [00:01:26] half or float or decimal types. You just [00:01:29] want it to work without having to [00:01:30] maintain multiple similar copies of the [00:01:33] same code. [00:01:34] We'll also be talking about the [00:01:36] execution performance. So [00:01:39] many of the improvements we've added to [00:01:41] the tensor types for performance and [00:01:43] correctness as well as ensuring that the [00:01:45] layouts are good. [00:01:48] We'll also be covering under that a lot [00:01:50] of the various support for [00:01:54] improved random number generation, [00:01:57] numeric text rounding support, uh and [00:01:59] practical API usage. at the very end if [00:02:02] we have time we'll cover some of the [00:02:03] improvements we've already landed uh [00:02:07] for .NET 12 uh and which you can expect [00:02:09] next year at next uh .NET conf. [00:02:13] So [00:02:14] for [00:02:15] floating point uh you know most people [00:02:18] are familiar with float and double uh [00:02:20] they are also familiar with [00:02:21] system.decimal the main difference [00:02:23] between those is float and double are uh [00:02:27] IEEE 754 which is the formal [00:02:30] specification defining floating points [00:02:33] um [00:02:34] uh types for that spec and they are base [00:02:37] two so every value they can represent is [00:02:40] a multiple of some power of two and this [00:02:43] is where you get into some of the [00:02:45] nuances that you may have seen before [00:02:48] like 0 + 1 [00:02:50] uh 0.1 + 0.2 does not equal 0.3 [00:02:56] that is in contrast to something like [00:02:58] decimal which is base 10 uh however the [00:03:01] system decimal type is a [00:03:04] uh Microsoft base type it's actually [00:03:07] based on the the corresponding decimal [00:03:10] type that's defined in win32 [00:03:13] uh and it is primarily oriented around [00:03:15] concur uh around currency [00:03:18] uh it doesn't have support for many of [00:03:21] the concepts that are necessary for [00:03:23] higher level mathematics and so you [00:03:24] can't actually represent [00:03:26] signs cosines uh square roots or many [00:03:30] other operations very cleanly uh with [00:03:33] that space. [00:03:34] The IEEE decimal types on the other hand [00:03:38] uh are base 10 but they are also [00:03:40] designed around those other domains [00:03:42] they're designed for scientific [00:03:44] computing. [00:03:46] Uh and so we have gone and exposed [00:03:49] decimal 32 decimal 64 and decimal 128. [00:03:53] They give you those semantics they give [00:03:55] you the full breadth of operations that [00:03:58] uh [00:03:59] you get for double and float but in a [00:04:01] base 10 representation. [00:04:04] And you get your choice of how much [00:04:07] precision you want, whether you want to [00:04:08] focus more on storage and maybe you need [00:04:10] a little bit less precision [00:04:12] or whether you want to get more [00:04:14] precision. Um system.decimal [00:04:17] is notably 128 bits as well [00:04:20] and it only gives you 28 to 29 [00:04:22] significant digits instead and that's [00:04:24] largely just due to that representation [00:04:26] difference, some of the trade-offs that [00:04:29] it's made uh in being a currency uh [00:04:32] focused type. [00:04:35] Uh [00:04:37] with that [00:04:40] they aren't just bigger decimals. They [00:04:43] give you all of that additional [00:04:44] functionality. [00:04:46] Uh they give you [00:04:48] the support for NaNs, for infinities. [00:04:50] They give you explicit support for sign [00:04:53] zero, which is very important when you [00:04:56] are doing mathematical operations [00:04:58] and you need to track the fact that you [00:05:00] have done a computation [00:05:02] that has an infinitely precise result [00:05:05] that cannot be represented and it has to [00:05:07] round towards zero. [00:05:09] So that sign zero support existing and [00:05:11] being explicitly tracked and represented [00:05:13] across the type is is actually fairly [00:05:15] key to various scientific domains and [00:05:18] support for things like complex numbers. [00:05:22] Um they do not have the same contract [00:05:24] between them even though they're base 10 [00:05:26] and so there are the nuances you have to [00:05:28] consider there [00:05:30] uh and keep track of. [00:05:33] So [cough and clears throat] [00:05:35] one example is that [00:05:37] the system.decimal type does provide [00:05:40] support for [00:05:41] uh significant trailing zeros. So you [00:05:44] with system.decimal you can have 1.0 and [00:05:47] you can have 1.00 and they compare [00:05:50] equal, but they are distinct values. [00:05:53] But that nuance is lost in some places. [00:05:55] It's not it's not tracked cleanly and [00:05:57] there isn't necessarily a formal [00:05:59] specification for [00:06:01] how that applies in the mathematical [00:06:03] sense, [00:06:04] whereas the IEEE decimal types uh do [00:06:07] keep track of all that data. They do [00:06:10] uh follow a a general mathematical [00:06:12] algorithm uh and even an ability to do [00:06:15] specific targeted rounding to track how [00:06:18] much of it. So in this example [00:06:21] 1.0 [00:06:23] means that you have a value that is at [00:06:25] least one [00:06:27] with [00:06:28] a single [00:06:29] significant significant trailing zero [00:06:32] piece of data. So you could have [00:06:34] theoretically done an operation that [00:06:37] computed something like 1.0 [00:06:40] one and then you rounded it. [00:06:43] And you want to keep track of the fact [00:06:44] that you have at least a guaranteed [00:06:48] zero digit [00:06:49] which is very different from if you did [00:06:52] a computation and you had no guaranteed [00:06:55] significant zero digits. This comes up [00:06:57] in various mechanical engineering uh [00:06:59] premises when you have to worry about [00:07:02] precision and tolerances. Uh and this is [00:07:05] actually why [00:07:07] uh significant zeros come up and why [00:07:09] they're represented in these types is [00:07:11] because you need to have the nuance and [00:07:12] consideration of one and 1.0 while being [00:07:16] the same value are they they provide [00:07:18] different guarantees and different [00:07:19] semantics. [00:07:22] Uh and so [00:07:23] the simple example here [00:07:26] is [00:07:28] uh [00:07:29] showcasing some of the nuances here is [00:07:32] we have a simple bit of text uh you know [00:07:35] parsing out two decimal 64s [00:07:38] uh showing the sum differences between [00:07:41] double and decimal 64. [00:07:44] We also have uh a different showing the [00:07:46] difference between the 1.0 and 1.00 so [00:07:49] showing those tolerance differences and [00:07:51] having [00:07:53] quantums. [00:07:55] Uh [00:07:56] we also have some examples going over [00:07:59] different semantics like how division by [00:08:01] zero works uh and how various [00:08:04] trigonometric functions work. So if we [00:08:06] run this first demo, uh we'll see [00:08:10] the sum difference. So here's the [00:08:12] traditional [00:08:13] you know, if you add 0.1 versus 0.2 in [00:08:17] double, you get 0.3 and a lot of [00:08:20] trailing zeros and then a four. The [00:08:22] reason for that is actually because uh [00:08:27] it is a multiple of a power of two. And [00:08:29] if we [00:08:30] do the full computation for that result, [00:08:34] we'll see that the actual value has all [00:08:37] the way up to the four and then there's [00:08:39] a lot of additional trailing values [00:08:41] here. [00:08:41] So that's the full multiple of a power [00:08:43] of two represented and that's because [00:08:45] all doubles are multiples of power of [00:08:47] two. [00:08:49] Whereas for decimal 64, [00:08:51] 0.3 is a multiple of a power of 10. So [00:08:55] it's a multiple of 10 to the power of [00:08:57] -1. [00:08:59] Uh and so we can actually exactly [00:09:01] represent 0.3. We don't have that [00:09:04] additional trailing data. [00:09:06] Um in both cases they compare uh [00:09:09] uh [00:09:10] they they compare differently and so you [00:09:12] you have that nuance of result. [00:09:15] Uh [00:09:17] with the decimal for the quantum [00:09:19] example, you have the same value. So 0.1 [00:09:23] and zero 1.0 and 1.00 compare as equal, [00:09:27] but they have [00:09:28] very different quantums. So we have a [00:09:31] function that compares them and tells [00:09:33] you they have a different quantum. They [00:09:35] tell you the quantum of the value which [00:09:37] is how much uh effectively how much [00:09:39] tolerance they're guaranteeing. [00:09:42] Um and we have the ability to do [00:09:43] quantization, rounding and and actually [00:09:47] giving those precision guarantees across [00:09:49] the values. [00:09:50] We have division by zero giving you [00:09:53] infinity uh which again comes from the [00:09:55] premise of in a mathematical sense, even [00:09:59] if you have zero, you don't quite know [00:10:01] if it's zero or a value that was very [00:10:04] small that happened around towards zero. [00:10:06] And in the traditional mathematical [00:10:08] sense, [00:10:09] as the divisor approaches zero, the [00:10:12] result approaches infinity. [00:10:14] Uh and so that is why IEEE has the [00:10:17] premise of division by zero becomes [00:10:19] infinity is because it makes the most [00:10:21] mathematical sense from a scientific [00:10:23] perspective [00:10:25] when you are working with values that [00:10:27] you know are being rounded and [00:10:29] potentially losing precision due to [00:10:32] finite constraints. [00:10:34] Um you have the examples of being able [00:10:37] to represent additional data, additional [00:10:39] storage, and even [00:10:41] uh [00:10:42] produce more exact results for things [00:10:44] like uh [00:10:45] ACOs. [00:10:47] Then we get into bfloat16. Um [00:10:51] unlike the decimal types, this one is [00:10:53] not an IEEE type. It is a [00:10:56] uh it's actually type designed by [00:10:58] Google. Uh it it's formal name is the [00:11:01] brain float 16-bit. [00:11:04] And it is a little bit special in that [00:11:07] the way it works is it it essentially [00:11:09] takes single, which is float [00:11:12] uh float 32, and it [00:11:15] truncates it it basically chops off the [00:11:17] lower 16 bits. And so it has the same [00:11:20] exponent range [00:11:22] and it [clears throat] has fewer [00:11:23] fractional bits as compared to [00:11:27] uh single. [00:11:28] And so [00:11:29] it provides the same range as single [00:11:32] just with less precision. This makes it [00:11:34] very efficient for doing conversions, [00:11:36] truncations, and conserving the amount [00:11:39] of space that the data takes. [00:11:42] It it it's it's actually very important [00:11:44] for AI scenarios where you're trying to [00:11:46] preserve the space uh where you're [00:11:48] trying to preserve the values [00:11:50] and the overall precision without taking [00:11:52] as much space. [00:11:56] We also then have [00:11:58] uh the new complex of T types. So system [00:12:02] numerics traditionally has [00:12:05] uh [00:12:06] has had system numerics complex, and [00:12:08] that's only supported double. And people [00:12:10] have been asking for a while of can you [00:12:12] give support for float? Can you give [00:12:14] support for other other types? And with [00:12:18] the support for [00:12:19] generic math, we've actually been able [00:12:21] to enable that. So we were finally able [00:12:23] to go and expose a complex of T [00:12:27] uh where the user gets to decide what [00:12:28] that T is. So they can decide if it is [00:12:31] double, if it is float, if it is decimal [00:12:33] 128. So they get all the support for [00:12:35] complex numbers [00:12:38] while getting to also choose the [00:12:39] underlying precision, the underlying [00:12:41] performance and acceleration provided. [00:12:44] Um and we were able to go and clean up [00:12:46] and improve a lot of the behavior to be [00:12:50] uh [00:12:50] compliant with the standard [00:12:52] specification for complex number [00:12:54] handling. [00:12:57] Uh and so with that, we have another [00:12:59] example here [00:13:01] uh [00:13:02] where we're showing, you know, you can [00:13:04] just take complex, you can support it [00:13:06] for floats same as you would for [00:13:08] doubles. You can perform your algorithm. [00:13:11] So square, this just operates over T. [00:13:15] So this same square function operates [00:13:17] regardless of whether we have [00:13:19] uh float or decimal 128 or complex of [00:13:24] either of those types. [00:13:27] And so it gives us a very simple example [00:13:31] where you can have a small amount of [00:13:33] code that supports any number of types [00:13:35] and allows you to keep your algorithms [00:13:37] working. [00:13:38] It allows you to effectively, like I [00:13:41] said, write once [00:13:43] and work for any number of types. We've [00:13:46] actually used this quite extensively [00:13:48] throughout the core libraries to enable [00:13:50] things like text parsing, text [00:13:53] processing, um [00:13:55] [clears throat] sharing of code across [00:13:58] the various scalar, vector, tensor and [00:14:02] other types [00:14:04] uh and even uh allowed us to go and [00:14:07] write many algorithms uh com uh [00:14:10] compressing the amount of code we have [00:14:11] to maintain to a few hundred lines [00:14:14] instead of several thousand lines, [00:14:16] because the whenever we go and support [00:14:19] functionality, we often have to go and [00:14:21] support it for all of the types that are [00:14:23] built in. So byte, sbyte, short, ushort, [00:14:26] int, uint, long, ulong, int, nuint, [00:14:30] float, double, decimal, decimal 128, 64, [00:14:34] 32, complex, complex of all those types, [00:14:37] etc. [00:14:38] So it you know, it starts out as as 10 [00:14:41] to 12 primitive types and it quickly [00:14:43] expands out to [00:14:46] many times more than that. And you don't [00:14:48] want to have to maintain all of that [00:14:49] code. [00:14:50] You can use the generic math [00:14:52] to enable that and then that that [00:14:55] integrates with the generic types we [00:14:57] have so that you can even expand out to [00:14:59] more composed types as well. [00:15:06] Then we start getting into some of the [00:15:07] more interesting topics, at least in my [00:15:10] opinion. [00:15:12] We we get out of the realm of the scalar [00:15:14] types and the the individual building [00:15:16] blocks and we get into this higher level [00:15:18] concept of working with data. [00:15:21] And that's kind of what tensors are. [00:15:24] You you have your scalar types like [00:15:26] float and double. You have your higher [00:15:29] level [00:15:31] sequences of that data, which is things [00:15:34] like span of float or span of double. [00:15:37] You have arrays [00:15:39] which are all just linear sequences of [00:15:41] the data. [00:15:42] And tensors kind of build up on top of [00:15:44] that and then that in that they are an [00:15:46] abstraction [00:15:48] over [00:15:50] your data. [00:15:52] They they describe not just the data, [00:15:54] but a shape to that data. And so they [00:15:56] allow you to have multiple dimensions [00:16:00] or even gaps between the data. You can [00:16:02] have nonlinear slices of the data. [00:16:06] This is very useful for image [00:16:08] processing. It is very it is heavily [00:16:10] used in AI and machine learning as well. [00:16:16] It's not something new or unique to [00:16:18] LLMs. It's something that's existed and [00:16:20] been a core part of working with data [00:16:21] for [00:16:22] um the past 40 years. Some of the [00:16:25] earliest libraries operating on tensors [00:16:28] um being closer to 40 years old, [00:16:30] although not all of them called them [00:16:32] tensors at that time. [00:16:35] Uh and so tensors provide that [00:16:36] abstraction over the data. They describe [00:16:39] dimensions to the data. They they [00:16:41] describe the gaps between the data, [00:16:44] which is the strides and in between [00:16:47] dimensions. And [00:16:49] with that, you are able to operate on [00:16:52] the data efficiently in the longest [00:16:55] linear sequences [00:16:56] without worrying too much about [00:16:58] the nitty-gritty of [00:17:01] um indexing memory manually. [00:17:05] And [00:17:06] one of the we we shipped the support for [00:17:08] tensors back in .NET [00:17:12] eight. Uh we improved it a bit in .NET [00:17:14] nine, .NET 10. [00:17:16] Um [00:17:17] we officially shipped the final support, [00:17:19] I believe, in .NET 10. Uh and we've [00:17:21] continued improving on it since then. [00:17:24] Um and we particularly done that by [00:17:27] going back and improving some of the [00:17:29] algorithms that allow you to operate [00:17:31] over that allow you to operate on and [00:17:33] walk over the data [00:17:34] uh in memory efficiently. [00:17:37] Uh we went and uh [00:17:39] provided [00:17:41] uh we we went and fixed a few key [00:17:43] functions that then effectively went and [00:17:45] provided that performance light up [00:17:47] everywhere using generic math. And so [00:17:51] uh one of the examples here is, you [00:17:54] know, given [00:17:55] an array of 64 by 16 floats, [00:17:59] uh previously it would take around 16 [00:18:01] microseconds to process that entire set [00:18:03] of data. [00:18:04] Uh and in .NET 11 uh [00:18:08] the back port of that performance [00:18:10] improvement it now uh [00:18:12] takes only 0.1 microseconds to go and [00:18:15] complete. [00:18:16] Um and similar for the Flatten two API, [00:18:19] we went from seven uh 0.9 microseconds [00:18:22] down to 0.875 [00:18:23] microseconds. [00:18:26] And [00:18:29] when talking about performance, it's [00:18:30] it's important to note that, you know, [00:18:33] perf is great, but perf is only good [00:18:36] when it's correct. [00:18:38] And one of the things that we had found [00:18:40] was there was a few places where we were [00:18:43] trying to provide these performance [00:18:44] improvements, and there were some [00:18:47] nuances in certain types of data being [00:18:50] passed around where we had missed [00:18:52] certain checks, and so we had to go and [00:18:53] fix those. [00:18:55] Places where if the destination and [00:18:58] input were the same buffer, [00:19:01] but they weren't directly the same, they [00:19:04] were offset from each other, so they [00:19:05] overlapped in in some in some fashion, [00:19:08] we were accidentally doing the wrong [00:19:10] handling. So we had to be very careful [00:19:12] with some of the .NET 11 fixes and [00:19:14] ensuring that [00:19:16] when [00:19:17] we're providing these perf improvements, [00:19:19] we actually are ensuring all the correct [00:19:21] handling is there, [00:19:24] all the data is being handled, all the [00:19:26] overlapping is being handled, [00:19:28] and that we're giving you the correct [00:19:30] result as fast as possible. [00:19:34] With the [00:19:36] added consideration that, you know, it's [00:19:38] not just about being correct [00:19:41] and defining what correct is ourselves, [00:19:43] it's also about being accurate with our [00:19:46] correctness and ensuring that regardless [00:19:48] of what hardware you're running on, [00:19:50] whether you're running on the latest [00:19:52] hardware or older hardware, [00:19:54] that you get the correct results. [00:19:59] And so we had to go and make sure that [00:20:01] we were carefully tuning for things like [00:20:03] fused [00:20:04] fused multiply add, which is a feature [00:20:07] that [00:20:08] most hardware in the past 15 years [00:20:10] provides, but some people are still on [00:20:13] slightly older hardware. [00:20:15] And you have to make sure that even when [00:20:16] they're on the older hardware, we are [00:20:18] still giving the correct and accurate [00:20:21] results. [00:20:23] And with we also have another example of [00:20:26] that for tensors [00:20:28] showing some of this functionality. So [00:20:31] in this example, we have a regular [00:20:34] storage buffer. So this is just a [00:20:36] standard linear array [00:20:38] with six values. [00:20:41] We then want to create a tensor [00:20:43] over that storage. [00:20:45] And in this case, we are providing the [00:20:48] storage. We are providing the lengths [00:20:51] and then the strides. So in this case, [00:20:54] storage is this. It's 1 2 -99 3 4 -99. [00:20:59] We have the lengths. So we want to from [00:21:02] this [00:21:03] create a 2 x 2 matrix which is going to [00:21:07] be four values. So we're extracting four [00:21:09] values out of this entire uh storage. [00:21:13] [clears throat] And we're saying that [00:21:15] the distance between everything in the [00:21:18] uh non-major column [00:21:20] is one. So values are one apart. And the [00:21:23] distance between them in the other [00:21:24] dimension is three. So they're going to [00:21:26] be three apart. So this is going to be [00:21:29] the values taken from for the first row [00:21:33] and three four is going to be the values [00:21:34] taken for the second row. [00:21:38] And so we can [00:21:41] see running that code [00:21:46] that [00:21:48] we can print out all the values. [00:21:50] We can see that the storage is not [00:21:53] dense. [00:21:54] Dense meaning that the values are both [00:21:56] linear and contiguous in memory. So by [00:21:59] by it saying it's non-dense, it's saying [00:22:01] that there is a gap between the two [00:22:03] rows. So in this case, the gap is -99. [00:22:08] We can see that the flattened view is [00:22:09] exactly what I described. We get 1 2 3 [00:22:12] 4. [00:22:14] We can see that we can resize [00:22:17] to a new shape. [00:22:19] So in this case, we're saying resize 1 2 [00:22:23] into a new tensor [00:22:26] that is the size of [00:22:28] the other tensor. [00:22:30] So we're saying resize from two [00:22:33] dimension from a length two into a [00:22:36] length [00:22:37] five. [00:22:39] And we can see that that gives us one [00:22:41] two and then it gives us the zeros for [00:22:43] the [00:22:45] the parts that we haven't filled in yet. [00:22:48] We can see that we can do dense copies [00:22:50] with overlapping and we handle that [00:22:51] correctly. So we can say from one two [00:22:54] three four five [00:22:55] and we're going to take out the the [00:22:57] entire set and we can overlap it so that [00:22:59] it copies [00:23:00] part of it [00:23:01] into the next into the remaining [00:23:04] sequence and we can see we get one one [00:23:05] two three four. [00:23:07] We can see that there is strided overlap [00:23:11] which essentially means that there is [00:23:14] they are overlapping. They are non-dense [00:23:17] and there is gaps between the rows and [00:23:20] in that case we actually don't handle [00:23:21] that today [00:23:23] because it effectively requires an [00:23:25] explicit copy to ensure it's safe. So [00:23:28] with that you'll see we catch an [00:23:29] argument exception and we say that the [00:23:31] buffer was unchanged because we don't [00:23:32] make any modifications there. [00:23:36] And you get all of the nice operations [00:23:38] that things like span already provide. [00:23:40] So you can do span dot index of. You can [00:23:42] also do tensor dot index of and you can [00:23:45] say index of the max value and it will [00:23:47] go and identify well what is the max [00:23:49] value for [00:23:52] when when Nans exist and the default [00:23:54] behavior for Nax for Max is it [00:23:56] propagates back Nans. So it finds that [00:23:59] Nan. Same thing with ties. [00:24:01] It will tell you the index is in this [00:24:04] case [00:24:05] the first one. [00:24:06] So you get index of the Nan is two index [00:24:09] of the tie is one. [00:24:11] And you get the same functions for min. [00:24:13] You get it for min magnitude. You get it [00:24:16] for [00:24:17] contains for searching for for binary [00:24:20] searching. You get all the same [00:24:22] operations that span provides for you [00:24:24] just with shaped in dimension data. [00:24:30] Beyond tensors, [00:24:32] uh we've also gone and expanded [00:24:34] System.Random. Uh people have uh [00:24:37] historically only had access to a few [00:24:39] key APIs like [00:24:41] getting the next int 32 or the next int [00:24:44] 64 or the next double. [00:24:46] Uh and you were very limited uh beyond [00:24:49] that. You couldn't get it for custom [00:24:50] numeric types. You couldn't get it for [00:24:52] custom integers. You couldn't get it for [00:24:54] any other floating point type like half. [00:24:57] Uh you were limited to the built-in [00:24:59] types we directly exposed. So we went [00:25:01] and exposed some new APIs in .NET 11 [00:25:05] that allow you to explicitly request the [00:25:07] next integer given a particular type [00:25:10] and [00:25:11] uh the same thing for the next binary [00:25:13] floating point value given the specified [00:25:15] type. Um and so next integer works just [00:25:19] like next int 32 does uh but using the [00:25:22] target type where zero is the lower [00:25:24] bound is inclusive, the upper bound is [00:25:26] exclusive. [00:25:28] So in this case you can request generate [00:25:30] a random number between zero and [00:25:32] whatever the limit is. [00:25:34] Um binary floating points due to their [00:25:36] distribution uh are between zero [00:25:38] inclusive and one exclusive. [00:25:42] But you still are able to specify the [00:25:43] type and specify I want a half or I want [00:25:46] a B float 16 single double. So you get [00:25:50] all that same support, uh all the [00:25:53] niceties there. [00:25:57] Uh and it's it's very simple to do. So [00:26:00] you know you can specify the limit is [00:26:02] requiring 80 bits here. [00:26:04] Uh you can get the four integers. [00:26:07] You can compare the values. [00:26:09] Uh and in this case you get [00:26:12] all the values that you requested very [00:26:14] trivially. Uh [00:26:16] they are not cryptographic APIs. They [00:26:18] are not from the system security [00:26:20] namespace. [00:26:22] Uh [00:26:22] they are just the standard guarantees [00:26:24] that the regular random RNG gives, the [00:26:27] pseudo random RNG. [00:26:29] Finally uh the last the last is you [00:26:32] really want to [00:26:33] uh often [00:26:35] take the textual data you're operating [00:26:38] on [00:26:39] uh and do parsing, do formatting, and [00:26:42] potentially even work with things like [00:26:44] CSV data. [00:26:46] Uh so in that case [00:26:48] you really want to [00:26:50] uh take some text, parse it out. You [00:26:53] might want to say, well, I've got 12.5 [00:26:55] milliseconds. I want to parse out just [00:26:57] the number. We have new API try parse [00:26:59] partial, which allows you to do just [00:27:01] that. It will actually work. It will [00:27:02] operate. It will parse up to the first [00:27:04] invalid character [00:27:06] and it will then give you back how much [00:27:08] it consumed. So you can see 12.5 [00:27:11] consumed four. [00:27:12] Then you can process from there and say [00:27:14] the unit is as expected milliseconds and [00:27:17] you can manually continue from there. So [00:27:19] it's very useful for JSON, for CSV [00:27:21] parsing, various other scenarios where [00:27:23] you have those delimiters in your text [00:27:25] and you don't want to do the [00:27:26] pre-traversal to find it. [00:27:28] Uh and it looks like I've run a little [00:27:29] bit over time here, uh but I am now done [00:27:32] with my slides. [00:27:35] Um [00:27:36] so uh I guess back to the studio.