Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Double.cs
Go to the documentation of this file.
6
7namespace System;
8
10[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
11public readonly struct Double : IComparable, IConvertible, ISpanFormattable, IFormattable, IComparable<double>, IEquatable<double>, IBinaryFloatingPoint<double>, IBinaryNumber<double>, IBitwiseOperators<double, double, double>, INumber<double>, IAdditionOperators<double, double, double>, IAdditiveIdentity<double, double>, IComparisonOperators<double, double>, IEqualityOperators<double, double>, IDecrementOperators<double>, IDivisionOperators<double, double, double>, IIncrementOperators<double>, IModulusOperators<double, double, double>, IMultiplicativeIdentity<double, double>, IMultiplyOperators<double, double, double>, ISpanParseable<double>, IParseable<double>, ISubtractionOperators<double, double, double>, IUnaryNegationOperators<double, double>, IUnaryPlusOperators<double, double>, IFloatingPoint<double>, ISignedNumber<double>, IMinMaxValue<double>
12{
13 private readonly double m_value;
14
15 public const double MinValue = -1.7976931348623157E+308;
16
17 public const double MaxValue = 1.7976931348623157E+308;
18
19 public const double Epsilon = 5E-324;
20
21 public const double NegativeInfinity = -1.0 / 0.0;
22
23 public const double PositiveInfinity = 1.0 / 0.0;
24
25 public const double NaN = 0.0 / 0.0;
26
27 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
29
30 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
31 static double IFloatingPoint<double>.E => Math.E;
32
33 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
34 static double IFloatingPoint<double>.Epsilon => double.Epsilon;
35
36 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
37 static double IFloatingPoint<double>.NaN => double.NaN;
38
39 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
40 static double IFloatingPoint<double>.NegativeInfinity => double.NegativeInfinity;
41
42 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
43 static double IFloatingPoint<double>.NegativeZero => -0.0;
44
45 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
46 static double IFloatingPoint<double>.Pi => Math.PI;
47
48 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
49 static double IFloatingPoint<double>.PositiveInfinity => double.PositiveInfinity;
50
51 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
52 static double IFloatingPoint<double>.Tau => Math.PI * 2.0;
53
54 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
55 static double IMinMaxValue<double>.MinValue => double.MinValue;
56
57 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
58 static double IMinMaxValue<double>.MaxValue => double.MaxValue;
59
60 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
62
63 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
64 static double INumber<double>.One => 1.0;
65
66 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
67 static double INumber<double>.Zero => 0.0;
68
69 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
70 static double ISignedNumber<double>.NegativeOne => -1.0;
71
72 [MethodImpl(MethodImplOptions.AggressiveInlining)]
73 [NonVersionable]
74 public static bool IsFinite(double d)
75 {
76 long num = BitConverter.DoubleToInt64Bits(d);
77 return (num & 0x7FFFFFFFFFFFFFFFL) < 9218868437227405312L;
78 }
79
80 [MethodImpl(MethodImplOptions.AggressiveInlining)]
81 [NonVersionable]
82 public static bool IsInfinity(double d)
83 {
84 long num = BitConverter.DoubleToInt64Bits(d);
85 return (num & 0x7FFFFFFFFFFFFFFFL) == 9218868437227405312L;
86 }
87
88 [MethodImpl(MethodImplOptions.AggressiveInlining)]
89 [NonVersionable]
90 public static bool IsNaN(double d)
91 {
92 return d != d;
93 }
94
95 [MethodImpl(MethodImplOptions.AggressiveInlining)]
96 [NonVersionable]
97 public static bool IsNegative(double d)
98 {
99 return BitConverter.DoubleToInt64Bits(d) < 0;
100 }
101
102 [MethodImpl(MethodImplOptions.AggressiveInlining)]
103 [NonVersionable]
104 public static bool IsNegativeInfinity(double d)
105 {
106 return d == double.NegativeInfinity;
107 }
108
109 [NonVersionable]
110 public static bool IsNormal(double d)
111 {
112 long num = BitConverter.DoubleToInt64Bits(d);
113 num &= 0x7FFFFFFFFFFFFFFFL;
114 if (num < 9218868437227405312L && num != 0L)
115 {
116 return (num & 0x7FF0000000000000L) != 0;
117 }
118 return false;
119 }
120
121 [MethodImpl(MethodImplOptions.AggressiveInlining)]
122 [NonVersionable]
123 public static bool IsPositiveInfinity(double d)
124 {
125 return d == double.PositiveInfinity;
126 }
127
128 [NonVersionable]
129 public static bool IsSubnormal(double d)
130 {
131 long num = BitConverter.DoubleToInt64Bits(d);
132 num &= 0x7FFFFFFFFFFFFFFFL;
133 if (num < 9218868437227405312L && num != 0L)
134 {
135 return (num & 0x7FF0000000000000L) == 0;
136 }
137 return false;
138 }
139
140 internal static int ExtractExponentFromBits(ulong bits)
141 {
142 return (int)(bits >> 52) & 0x7FF;
143 }
144
145 internal static ulong ExtractSignificandFromBits(ulong bits)
146 {
147 return bits & 0xFFFFFFFFFFFFFuL;
148 }
149
150 public int CompareTo(object? value)
151 {
152 if (value == null)
153 {
154 return 1;
155 }
156 if (value is double num)
157 {
158 if (this < num)
159 {
160 return -1;
161 }
162 if (this > num)
163 {
164 return 1;
165 }
166 if (this == num)
167 {
168 return 0;
169 }
170 if (IsNaN(this))
171 {
172 if (!IsNaN(num))
173 {
174 return -1;
175 }
176 return 0;
177 }
178 return 1;
179 }
181 }
182
183 public int CompareTo(double value)
184 {
185 if (this < value)
186 {
187 return -1;
188 }
189 if (this > value)
190 {
191 return 1;
192 }
193 if (this == value)
194 {
195 return 0;
196 }
197 if (IsNaN(this))
198 {
199 if (!IsNaN(value))
200 {
201 return -1;
202 }
203 return 0;
204 }
205 return 1;
206 }
207
208 public override bool Equals([NotNullWhen(true)] object? obj)
209 {
210 if (!(obj is double num))
211 {
212 return false;
213 }
214 if (num == this)
215 {
216 return true;
217 }
218 if (IsNaN(num))
219 {
220 return IsNaN(this);
221 }
222 return false;
223 }
224
225 [NonVersionable]
226 public static bool operator ==(double left, double right)
227 {
228 return left == right;
229 }
230
231 [NonVersionable]
232 public static bool operator !=(double left, double right)
233 {
234 return left != right;
235 }
236
237 [NonVersionable]
238 public static bool operator <(double left, double right)
239 {
240 return left < right;
241 }
242
243 [NonVersionable]
244 public static bool operator >(double left, double right)
245 {
246 return left > right;
247 }
248
249 [NonVersionable]
250 public static bool operator <=(double left, double right)
251 {
252 return left <= right;
253 }
254
255 [NonVersionable]
256 public static bool operator >=(double left, double right)
257 {
258 return left >= right;
259 }
260
261 public bool Equals(double obj)
262 {
263 if (obj == this)
264 {
265 return true;
266 }
267 if (IsNaN(obj))
268 {
269 return IsNaN(this);
270 }
271 return false;
272 }
273
274 [MethodImpl(MethodImplOptions.AggressiveInlining)]
275 public override int GetHashCode()
276 {
277 long num = Unsafe.As<double, long>(ref Unsafe.AsRef(in m_value));
278 if (((num - 1) & 0x7FFFFFFFFFFFFFFFL) >= 9218868437227405312L)
279 {
280 num &= 0x7FF0000000000000L;
281 }
282 return (int)num ^ (int)(num >> 32);
283 }
284
285 public override string ToString()
286 {
288 }
289
290 public string ToString(string? format)
291 {
293 }
294
295 public string ToString(IFormatProvider? provider)
296 {
297 return Number.FormatDouble(this, null, NumberFormatInfo.GetInstance(provider));
298 }
299
300 public string ToString(string? format, IFormatProvider? provider)
301 {
302 return Number.FormatDouble(this, format, NumberFormatInfo.GetInstance(provider));
303 }
304
305 public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default(ReadOnlySpan<char>), IFormatProvider? provider = null)
306 {
307 return Number.TryFormatDouble(this, format, NumberFormatInfo.GetInstance(provider), destination, out charsWritten);
308 }
309
310 public static double Parse(string s)
311 {
312 if (s == null)
313 {
315 }
317 }
318
319 public static double Parse(string s, NumberStyles style)
320 {
322 if (s == null)
323 {
325 }
327 }
328
329 public static double Parse(string s, IFormatProvider? provider)
330 {
331 if (s == null)
332 {
334 }
335 return Number.ParseDouble(s, NumberStyles.Float | NumberStyles.AllowThousands, NumberFormatInfo.GetInstance(provider));
336 }
337
338 public static double Parse(string s, NumberStyles style, IFormatProvider? provider)
339 {
341 if (s == null)
342 {
344 }
345 return Number.ParseDouble(s, style, NumberFormatInfo.GetInstance(provider));
346 }
347
348 public static double Parse(ReadOnlySpan<char> s, NumberStyles style = NumberStyles.Float | NumberStyles.AllowThousands, IFormatProvider? provider = null)
349 {
351 return Number.ParseDouble(s, style, NumberFormatInfo.GetInstance(provider));
352 }
353
354 public static bool TryParse([NotNullWhen(true)] string? s, out double result)
355 {
356 if (s == null)
357 {
358 result = 0.0;
359 return false;
360 }
361 return TryParse((ReadOnlySpan<char>)s, NumberStyles.Float | NumberStyles.AllowThousands, NumberFormatInfo.CurrentInfo, out result);
362 }
363
364 public static bool TryParse(ReadOnlySpan<char> s, out double result)
365 {
366 return TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, NumberFormatInfo.CurrentInfo, out result);
367 }
368
369 public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out double result)
370 {
372 if (s == null)
373 {
374 result = 0.0;
375 return false;
376 }
377 return TryParse((ReadOnlySpan<char>)s, style, NumberFormatInfo.GetInstance(provider), out result);
378 }
379
380 public static bool TryParse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider? provider, out double result)
381 {
383 return TryParse(s, style, NumberFormatInfo.GetInstance(provider), out result);
384 }
385
386 private static bool TryParse(ReadOnlySpan<char> s, NumberStyles style, NumberFormatInfo info, out double result)
387 {
388 return Number.TryParseDouble(s, style, info, out result);
389 }
390
392 {
393 return TypeCode.Double;
394 }
395
397 {
398 return Convert.ToBoolean(this);
399 }
400
402 {
403 throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Double", "Char"));
404 }
405
407 {
408 return Convert.ToSByte(this);
409 }
410
412 {
413 return Convert.ToByte(this);
414 }
415
417 {
418 return Convert.ToInt16(this);
419 }
420
422 {
423 return Convert.ToUInt16(this);
424 }
425
427 {
428 return Convert.ToInt32(this);
429 }
430
432 {
433 return Convert.ToUInt32(this);
434 }
435
437 {
438 return Convert.ToInt64(this);
439 }
440
442 {
443 return Convert.ToUInt64(this);
444 }
445
447 {
448 return Convert.ToSingle(this);
449 }
450
452 {
453 return this;
454 }
455
457 {
458 return Convert.ToDecimal(this);
459 }
460
462 {
463 throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "Double", "DateTime"));
464 }
465
467 {
468 return Convert.DefaultToType(this, type, provider);
469 }
470
471 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
472 static double IAdditionOperators<double, double, double>.operator +(double left, double right)
473 {
474 return left + right;
475 }
476
477 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
479 {
481 uint num2 = (uint)(int)(num >> 52) & 0x7FFu;
482 ulong num3 = num & 0xFFFFFFFFFFFFFuL;
483 if (value > 0.0 && num2 != 0 && num2 != 2047)
484 {
485 return num3 == 0;
486 }
487 return false;
488 }
489
490 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
491 static double IBinaryNumber<double>.Log2(double value)
492 {
493 return Math.Log2(value);
494 }
495
496 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
497 static double IBitwiseOperators<double, double, double>.operator &(double left, double right)
498 {
501 }
502
503 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
504 static double IBitwiseOperators<double, double, double>.operator |(double left, double right)
505 {
508 }
509
510 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
511 static double IBitwiseOperators<double, double, double>.operator ^(double left, double right)
512 {
515 }
516
517 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
518 static double IBitwiseOperators<double, double, double>.operator ~(double value)
519 {
520 ulong value2 = ~BitConverter.DoubleToUInt64Bits(value);
521 return BitConverter.UInt64BitsToDouble(value2);
522 }
523
524 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
525 static bool IComparisonOperators<double, double>.operator <(double left, double right)
526 {
527 return left < right;
528 }
529
530 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
531 static bool IComparisonOperators<double, double>.operator <=(double left, double right)
532 {
533 return left <= right;
534 }
535
536 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
537 static bool IComparisonOperators<double, double>.operator >(double left, double right)
538 {
539 return left > right;
540 }
541
542 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
543 static bool IComparisonOperators<double, double>.operator >=(double left, double right)
544 {
545 return left >= right;
546 }
547
548 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
549 static double IDecrementOperators<double>.operator --(double value)
550 {
551 return value -= 1.0;
552 }
553
554 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
555 static double IDivisionOperators<double, double, double>.operator /(double left, double right)
556 {
557 return left / right;
558 }
559
560 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
561 static bool IEqualityOperators<double, double>.operator ==(double left, double right)
562 {
563 return left == right;
564 }
565
566 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
567 static bool IEqualityOperators<double, double>.operator !=(double left, double right)
568 {
569 return left != right;
570 }
571
572 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
573 static double IFloatingPoint<double>.Acos(double x)
574 {
575 return Math.Acos(x);
576 }
577
578 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
579 static double IFloatingPoint<double>.Acosh(double x)
580 {
581 return Math.Acosh(x);
582 }
583
584 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
585 static double IFloatingPoint<double>.Asin(double x)
586 {
587 return Math.Asin(x);
588 }
589
590 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
591 static double IFloatingPoint<double>.Asinh(double x)
592 {
593 return Math.Asinh(x);
594 }
595
596 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
597 static double IFloatingPoint<double>.Atan(double x)
598 {
599 return Math.Atan(x);
600 }
601
602 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
603 static double IFloatingPoint<double>.Atan2(double y, double x)
604 {
605 return Math.Atan2(y, x);
606 }
607
608 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
609 static double IFloatingPoint<double>.Atanh(double x)
610 {
611 return Math.Atanh(x);
612 }
613
614 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
615 static double IFloatingPoint<double>.BitIncrement(double x)
616 {
617 return Math.BitIncrement(x);
618 }
619
620 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
621 static double IFloatingPoint<double>.BitDecrement(double x)
622 {
623 return Math.BitDecrement(x);
624 }
625
626 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
627 static double IFloatingPoint<double>.Cbrt(double x)
628 {
629 return Math.Cbrt(x);
630 }
631
632 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
633 static double IFloatingPoint<double>.Ceiling(double x)
634 {
635 return Math.Ceiling(x);
636 }
637
638 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
639 static double IFloatingPoint<double>.CopySign(double x, double y)
640 {
641 return Math.CopySign(x, y);
642 }
643
644 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
645 static double IFloatingPoint<double>.Cos(double x)
646 {
647 return Math.Cos(x);
648 }
649
650 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
651 static double IFloatingPoint<double>.Cosh(double x)
652 {
653 return Math.Cosh(x);
654 }
655
656 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
657 static double IFloatingPoint<double>.Exp(double x)
658 {
659 return Math.Exp(x);
660 }
661
662 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
663 static double IFloatingPoint<double>.Floor(double x)
664 {
665 return Math.Floor(x);
666 }
667
668 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
669 static double IFloatingPoint<double>.FusedMultiplyAdd(double left, double right, double addend)
670 {
671 return Math.FusedMultiplyAdd(left, right, addend);
672 }
673
674 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
675 static double IFloatingPoint<double>.IEEERemainder(double left, double right)
676 {
677 return Math.IEEERemainder(left, right);
678 }
679
680 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
681 static TInteger IFloatingPoint<double>.ILogB<TInteger>(double x)
682 {
683 return TInteger.Create(Math.ILogB(x));
684 }
685
686 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
687 static double IFloatingPoint<double>.Log(double x)
688 {
689 return Math.Log(x);
690 }
691
692 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
693 static double IFloatingPoint<double>.Log(double x, double newBase)
694 {
695 return Math.Log(x, newBase);
696 }
697
698 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
699 static double IFloatingPoint<double>.Log2(double x)
700 {
701 return Math.Log2(x);
702 }
703
704 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
705 static double IFloatingPoint<double>.Log10(double x)
706 {
707 return Math.Log10(x);
708 }
709
710 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
711 static double IFloatingPoint<double>.MaxMagnitude(double x, double y)
712 {
713 return Math.MaxMagnitude(x, y);
714 }
715
716 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
717 static double IFloatingPoint<double>.MinMagnitude(double x, double y)
718 {
719 return Math.MinMagnitude(x, y);
720 }
721
722 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
723 static double IFloatingPoint<double>.Pow(double x, double y)
724 {
725 return Math.Pow(x, y);
726 }
727
728 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
729 static double IFloatingPoint<double>.Round(double x)
730 {
731 return Math.Round(x);
732 }
733
734 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
735 static double IFloatingPoint<double>.Round<TInteger>(double x, TInteger digits)
736 {
737 return Math.Round(x, int.Create(digits));
738 }
739
740 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
741 static double IFloatingPoint<double>.Round(double x, MidpointRounding mode)
742 {
743 return Math.Round(x, mode);
744 }
745
746 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
747 static double IFloatingPoint<double>.Round<TInteger>(double x, TInteger digits, MidpointRounding mode)
748 {
749 return Math.Round(x, int.Create(digits), mode);
750 }
751
752 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
753 static double IFloatingPoint<double>.ScaleB<TInteger>(double x, TInteger n)
754 {
755 return Math.ScaleB(x, int.Create(n));
756 }
757
758 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
759 static double IFloatingPoint<double>.Sin(double x)
760 {
761 return Math.Sin(x);
762 }
763
764 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
765 static double IFloatingPoint<double>.Sinh(double x)
766 {
767 return Math.Sinh(x);
768 }
769
770 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
771 static double IFloatingPoint<double>.Sqrt(double x)
772 {
773 return Math.Sqrt(x);
774 }
775
776 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
777 static double IFloatingPoint<double>.Tan(double x)
778 {
779 return Math.Tan(x);
780 }
781
782 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
783 static double IFloatingPoint<double>.Tanh(double x)
784 {
785 return Math.Tanh(x);
786 }
787
788 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
789 static double IFloatingPoint<double>.Truncate(double x)
790 {
791 return Math.Truncate(x);
792 }
793
794 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
795 static bool IFloatingPoint<double>.IsFinite(double d)
796 {
797 return IsFinite(d);
798 }
799
800 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
801 static bool IFloatingPoint<double>.IsInfinity(double d)
802 {
803 return IsInfinity(d);
804 }
805
806 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
807 static bool IFloatingPoint<double>.IsNaN(double d)
808 {
809 return IsNaN(d);
810 }
811
812 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
813 static bool IFloatingPoint<double>.IsNegative(double d)
814 {
815 return IsNegative(d);
816 }
817
818 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
820 {
821 return IsNegativeInfinity(d);
822 }
823
824 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
825 static bool IFloatingPoint<double>.IsNormal(double d)
826 {
827 return IsNormal(d);
828 }
829
830 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
832 {
833 return IsPositiveInfinity(d);
834 }
835
836 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
838 {
839 return IsSubnormal(d);
840 }
841
842 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
843 static double IIncrementOperators<double>.operator ++(double value)
844 {
845 return value += 1.0;
846 }
847
848 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
849 static double IModulusOperators<double, double, double>.operator %(double left, double right)
850 {
851 return left % right;
852 }
853
854 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
855 static double IMultiplyOperators<double, double, double>.operator *(double left, double right)
856 {
857 return left * right;
858 }
859
860 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
861 static double INumber<double>.Abs(double value)
862 {
863 return Math.Abs(value);
864 }
865
866 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
867 static double INumber<double>.Clamp(double value, double min, double max)
868 {
869 return Math.Clamp(value, min, max);
870 }
871
872 [MethodImpl(MethodImplOptions.AggressiveInlining)]
873 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
874 static double INumber<double>.Create<TOther>(TOther value)
875 {
876 if (typeof(TOther) == typeof(byte))
877 {
878 return (int)(byte)(object)value;
879 }
880 if (typeof(TOther) == typeof(char))
881 {
882 return (int)(char)(object)value;
883 }
884 if (typeof(TOther) == typeof(decimal))
885 {
886 return (double)(decimal)(object)value;
887 }
888 if (typeof(TOther) == typeof(double))
889 {
890 return (double)(object)value;
891 }
892 if (typeof(TOther) == typeof(short))
893 {
894 return (short)(object)value;
895 }
896 if (typeof(TOther) == typeof(int))
897 {
898 return (int)(object)value;
899 }
900 if (typeof(TOther) == typeof(long))
901 {
902 return (long)(object)value;
903 }
904 if (typeof(TOther) == typeof(IntPtr))
905 {
906 return (nint)(IntPtr)(object)value;
907 }
908 if (typeof(TOther) == typeof(sbyte))
909 {
910 return (sbyte)(object)value;
911 }
912 if (typeof(TOther) == typeof(float))
913 {
914 return (float)(object)value;
915 }
916 if (typeof(TOther) == typeof(ushort))
917 {
918 return (int)(ushort)(object)value;
919 }
920 if (typeof(TOther) == typeof(uint))
921 {
922 return (uint)(object)value;
923 }
924 if (typeof(TOther) == typeof(ulong))
925 {
926 return (ulong)(object)value;
927 }
928 if (typeof(TOther) == typeof(UIntPtr))
929 {
930 return (nint)(nuint)(UIntPtr)(object)value;
931 }
933 return 0.0;
934 }
935
936 [MethodImpl(MethodImplOptions.AggressiveInlining)]
937 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
938 static double INumber<double>.CreateSaturating<TOther>(TOther value)
939 {
940 if (typeof(TOther) == typeof(byte))
941 {
942 return (int)(byte)(object)value;
943 }
944 if (typeof(TOther) == typeof(char))
945 {
946 return (int)(char)(object)value;
947 }
948 if (typeof(TOther) == typeof(decimal))
949 {
950 return (double)(decimal)(object)value;
951 }
952 if (typeof(TOther) == typeof(double))
953 {
954 return (double)(object)value;
955 }
956 if (typeof(TOther) == typeof(short))
957 {
958 return (short)(object)value;
959 }
960 if (typeof(TOther) == typeof(int))
961 {
962 return (int)(object)value;
963 }
964 if (typeof(TOther) == typeof(long))
965 {
966 return (long)(object)value;
967 }
968 if (typeof(TOther) == typeof(IntPtr))
969 {
970 return (nint)(IntPtr)(object)value;
971 }
972 if (typeof(TOther) == typeof(sbyte))
973 {
974 return (sbyte)(object)value;
975 }
976 if (typeof(TOther) == typeof(float))
977 {
978 return (float)(object)value;
979 }
980 if (typeof(TOther) == typeof(ushort))
981 {
982 return (int)(ushort)(object)value;
983 }
984 if (typeof(TOther) == typeof(uint))
985 {
986 return (uint)(object)value;
987 }
988 if (typeof(TOther) == typeof(ulong))
989 {
990 return (ulong)(object)value;
991 }
992 if (typeof(TOther) == typeof(UIntPtr))
993 {
994 return (nint)(nuint)(UIntPtr)(object)value;
995 }
997 return 0.0;
998 }
999
1000 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1001 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1002 static double INumber<double>.CreateTruncating<TOther>(TOther value)
1003 {
1004 if (typeof(TOther) == typeof(byte))
1005 {
1006 return (int)(byte)(object)value;
1007 }
1008 if (typeof(TOther) == typeof(char))
1009 {
1010 return (int)(char)(object)value;
1011 }
1012 if (typeof(TOther) == typeof(decimal))
1013 {
1014 return (double)(decimal)(object)value;
1015 }
1016 if (typeof(TOther) == typeof(double))
1017 {
1018 return (double)(object)value;
1019 }
1020 if (typeof(TOther) == typeof(short))
1021 {
1022 return (short)(object)value;
1023 }
1024 if (typeof(TOther) == typeof(int))
1025 {
1026 return (int)(object)value;
1027 }
1028 if (typeof(TOther) == typeof(long))
1029 {
1030 return (long)(object)value;
1031 }
1032 if (typeof(TOther) == typeof(IntPtr))
1033 {
1034 return (nint)(IntPtr)(object)value;
1035 }
1036 if (typeof(TOther) == typeof(sbyte))
1037 {
1038 return (sbyte)(object)value;
1039 }
1040 if (typeof(TOther) == typeof(float))
1041 {
1042 return (float)(object)value;
1043 }
1044 if (typeof(TOther) == typeof(ushort))
1045 {
1046 return (int)(ushort)(object)value;
1047 }
1048 if (typeof(TOther) == typeof(uint))
1049 {
1050 return (uint)(object)value;
1051 }
1052 if (typeof(TOther) == typeof(ulong))
1053 {
1054 return (ulong)(object)value;
1055 }
1056 if (typeof(TOther) == typeof(UIntPtr))
1057 {
1058 return (nint)(nuint)(UIntPtr)(object)value;
1059 }
1061 return 0.0;
1062 }
1063
1064 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1065 static (double Quotient, double Remainder) INumber<double>.DivRem(double left, double right)
1066 {
1067 return (Quotient: left / right, Remainder: left % right);
1068 }
1069
1070 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1071 static double INumber<double>.Max(double x, double y)
1072 {
1073 return Math.Max(x, y);
1074 }
1075
1076 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1077 static double INumber<double>.Min(double x, double y)
1078 {
1079 return Math.Min(x, y);
1080 }
1081
1082 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1083 static double INumber<double>.Parse(string s, NumberStyles style, IFormatProvider provider)
1084 {
1085 return Parse(s, style, provider);
1086 }
1087
1088 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1090 {
1091 return Parse(s, style, provider);
1092 }
1093
1094 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1095 static double INumber<double>.Sign(double value)
1096 {
1097 return Math.Sign(value);
1098 }
1099
1100 [MethodImpl(MethodImplOptions.AggressiveInlining)]
1101 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1102 static bool INumber<double>.TryCreate<TOther>(TOther value, out double result)
1103 {
1104 if (typeof(TOther) == typeof(byte))
1105 {
1106 result = (int)(byte)(object)value;
1107 return true;
1108 }
1109 if (typeof(TOther) == typeof(char))
1110 {
1111 result = (int)(char)(object)value;
1112 return true;
1113 }
1114 if (typeof(TOther) == typeof(decimal))
1115 {
1116 result = (double)(decimal)(object)value;
1117 return true;
1118 }
1119 if (typeof(TOther) == typeof(double))
1120 {
1121 result = (double)(object)value;
1122 return true;
1123 }
1124 if (typeof(TOther) == typeof(short))
1125 {
1126 result = (short)(object)value;
1127 return true;
1128 }
1129 if (typeof(TOther) == typeof(int))
1130 {
1131 result = (int)(object)value;
1132 return true;
1133 }
1134 if (typeof(TOther) == typeof(long))
1135 {
1136 result = (long)(object)value;
1137 return true;
1138 }
1139 if (typeof(TOther) == typeof(IntPtr))
1140 {
1141 result = (nint)(IntPtr)(object)value;
1142 return true;
1143 }
1144 if (typeof(TOther) == typeof(sbyte))
1145 {
1146 result = (sbyte)(object)value;
1147 return true;
1148 }
1149 if (typeof(TOther) == typeof(float))
1150 {
1151 result = (float)(object)value;
1152 return true;
1153 }
1154 if (typeof(TOther) == typeof(ushort))
1155 {
1156 result = (int)(ushort)(object)value;
1157 return true;
1158 }
1159 if (typeof(TOther) == typeof(uint))
1160 {
1161 result = (uint)(object)value;
1162 return true;
1163 }
1164 if (typeof(TOther) == typeof(ulong))
1165 {
1166 result = (ulong)(object)value;
1167 return true;
1168 }
1169 if (typeof(TOther) == typeof(UIntPtr))
1170 {
1171 result = (nint)(nuint)(UIntPtr)(object)value;
1172 return true;
1173 }
1175 result = 0.0;
1176 return false;
1177 }
1178
1179 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1180 static bool INumber<double>.TryParse([NotNullWhen(true)] string s, NumberStyles style, IFormatProvider provider, out double result)
1181 {
1182 return TryParse(s, style, provider, out result);
1183 }
1184
1185 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1186 static bool INumber<double>.TryParse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider provider, out double result)
1187 {
1188 return TryParse(s, style, provider, out result);
1189 }
1190
1191 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1192 static double IParseable<double>.Parse(string s, IFormatProvider provider)
1193 {
1194 return Parse(s, provider);
1195 }
1196
1197 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1198 static bool IParseable<double>.TryParse([NotNullWhen(true)] string s, IFormatProvider provider, out double result)
1199 {
1200 return TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider, out result);
1201 }
1202
1203 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1205 {
1206 return Parse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider);
1207 }
1208
1209 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1210 static bool ISpanParseable<double>.TryParse(ReadOnlySpan<char> s, IFormatProvider provider, out double result)
1211 {
1212 return TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider, out result);
1213 }
1214
1215 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1216 static double ISubtractionOperators<double, double, double>.operator -(double left, double right)
1217 {
1218 return left - right;
1219 }
1220
1221 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1222 static double IUnaryNegationOperators<double, double>.operator -(double value)
1223 {
1224 return 0.0 - value;
1225 }
1226
1227 [RequiresPreviewFeatures("Generic Math is in preview.", Url = "https://aka.ms/dotnet-warnings/generic-math-preview")]
1228 static double IUnaryPlusOperators<double, double>.operator +(double value)
1229 {
1230 return value;
1231 }
1232}
static ulong DoubleToUInt64Bits(double value)
static unsafe long DoubleToInt64Bits(double value)
static double UInt64BitsToDouble(ulong value)
static decimal ToDecimal(object? value)
Definition Convert.cs:2101
static long ToInt64(object? value)
Definition Convert.cs:1623
static float ToSingle(object? value)
Definition Convert.cs:1881
static int ToInt32(object? value)
Definition Convert.cs:1320
static short ToInt16(object? value)
Definition Convert.cs:1038
static byte ToByte(object? value)
Definition Convert.cs:900
static uint ToUInt32(object? value)
Definition Convert.cs:1470
static ulong ToUInt64(object? value)
Definition Convert.cs:1738
static ushort ToUInt16(object? value)
Definition Convert.cs:1177
static sbyte ToSByte(object? value)
Definition Convert.cs:745
static bool ToBoolean([NotNullWhen(true)] object? value)
Definition Convert.cs:508
static object DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
Definition Convert.cs:269
static NumberFormatInfo GetInstance(IFormatProvider? formatProvider)
static void ValidateParseStyleFloatingPoint(NumberStyles style)
static double Atan(double d)
static double Log2(double x)
static byte Clamp(byte value, byte min, byte max)
Definition Math.cs:435
static double Acos(double d)
static decimal Truncate(decimal d)
Definition Math.cs:1270
static double Cos(double d)
static double Exp(double d)
static double Tanh(double value)
static double Atanh(double d)
static byte Min(byte val1, byte val2)
Definition Math.cs:912
static double ScaleB(double x, int n)
Definition Math.cs:1287
static double CopySign(double x, double y)
Definition Math.cs:312
static double Tan(double a)
static double Atan2(double y, double x)
static double Cbrt(double d)
static double Sqrt(double d)
static double Asin(double d)
static double Pow(double x, double y)
static double MinMagnitude(double x, double y)
Definition Math.cs:1058
static decimal Round(decimal d)
Definition Math.cs:1096
static double Ceiling(double a)
static double Asinh(double d)
const double E
Definition Math.cs:14
static double IEEERemainder(double x, double y)
Definition Math.cs:679
static double Log10(double d)
static double BitDecrement(double x)
Definition Math.cs:273
static double Log(double d)
static double Acosh(double d)
static double Abs(double value)
static double Sin(double a)
const double PI
Definition Math.cs:16
static double BitIncrement(double x)
Definition Math.cs:292
static double Sinh(double value)
static double Floor(double d)
static double Cosh(double value)
static double FusedMultiplyAdd(double x, double y, double z)
static double MaxMagnitude(double x, double y)
Definition Math.cs:892
static int Sign(decimal value)
Definition Math.cs:1202
static byte Max(byte val1, byte val2)
Definition Math.cs:738
static int ILogB(double x)
static unsafe bool TryParseDouble(ReadOnlySpan< char > value, NumberStyles styles, NumberFormatInfo info, out double result)
Definition Number.cs:5665
static bool TryFormatDouble(double value, ReadOnlySpan< char > format, NumberFormatInfo info, Span< char > destination, out int charsWritten)
Definition Number.cs:1619
static double ParseDouble(ReadOnlySpan< char > value, NumberStyles styles, NumberFormatInfo info)
Definition Number.cs:5613
static string FormatDouble(double value, string format, NumberFormatInfo info)
Definition Number.cs:1612
static string InvalidCast_FromTo
Definition SR.cs:1392
static string Arg_MustBeDouble
Definition SR.cs:270
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7
static void ThrowNotSupportedException(ExceptionResource resource)
static void ThrowArgumentNullException(string name)
static TResult AdditiveIdentity
static bool IsPow2(TSelf value)
static TSelf Log2(TSelf value)
short ToInt16(IFormatProvider? provider)
char ToChar(IFormatProvider? provider)
byte ToByte(IFormatProvider? provider)
decimal ToDecimal(IFormatProvider? provider)
object ToType(Type conversionType, IFormatProvider? provider)
uint ToUInt32(IFormatProvider? provider)
DateTime ToDateTime(IFormatProvider? provider)
int ToInt32(IFormatProvider? provider)
long ToInt64(IFormatProvider? provider)
ushort ToUInt16(IFormatProvider? provider)
double ToDouble(IFormatProvider? provider)
float ToSingle(IFormatProvider? provider)
sbyte ToSByte(IFormatProvider? provider)
ulong ToUInt64(IFormatProvider? provider)
bool ToBoolean(IFormatProvider? provider)
static bool IsNaN(TSelf value)
static TSelf CopySign(TSelf x, TSelf y)
static bool IsPositiveInfinity(TSelf value)
static TSelf Acosh(TSelf x)
static TSelf MinMagnitude(TSelf x, TSelf y)
static TSelf Log10(TSelf x)
static TSelf Ceiling(TSelf x)
static bool IsFinite(TSelf value)
static bool IsNegativeInfinity(TSelf value)
static TSelf MaxMagnitude(TSelf x, TSelf y)
static TSelf PositiveInfinity
static TSelf IEEERemainder(TSelf left, TSelf right)
static TSelf Pow(TSelf x, TSelf y)
static TSelf Asin(TSelf x)
static TSelf Floor(TSelf x)
static TSelf Truncate(TSelf x)
static TSelf Asinh(TSelf x)
static TSelf Atanh(TSelf x)
static TSelf NegativeZero
static TSelf Log(TSelf x)
static TSelf Cbrt(TSelf x)
static TSelf BitIncrement(TSelf x)
static TSelf Tan(TSelf x)
static TSelf Sinh(TSelf x)
static bool IsInfinity(TSelf value)
static bool IsSubnormal(TSelf value)
static TSelf Tanh(TSelf x)
static TSelf Exp(TSelf x)
static bool IsNegative(TSelf value)
static TSelf Atan(TSelf x)
static TSelf Sqrt(TSelf x)
static TSelf BitDecrement(TSelf x)
static TSelf FusedMultiplyAdd(TSelf left, TSelf right, TSelf addend)
static TSelf Sin(TSelf x)
static TSelf Acos(TSelf x)
static TSelf Round(TSelf x)
static bool IsNormal(TSelf value)
static TSelf Atan2(TSelf y, TSelf x)
static TSelf Cos(TSelf x)
static TSelf Cosh(TSelf x)
static TSelf NegativeInfinity
static TSelf Log2(TSelf x)
static TSelf MinValue
static TSelf MaxValue
static TSelf Max(TSelf x, TSelf y)
static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out TSelf result)
static TSelf Parse(string s, NumberStyles style, IFormatProvider? provider)
static TSelf Sign(TSelf value)
static TSelf Min(TSelf x, TSelf y)
static TSelf One
Definition INumber.cs:10
static TSelf Zero
Definition INumber.cs:12
static TSelf Abs(TSelf value)
static TSelf Clamp(TSelf value, TSelf min, TSelf max)
static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out TSelf result)
static TSelf Parse(string s, IFormatProvider? provider)
static TSelf NegativeOne
static bool TryParse(ReadOnlySpan< char > s, IFormatProvider? provider, out TSelf result)
static TSelf Parse(ReadOnlySpan< char > s, IFormatProvider? provider)
TypeCode
Definition TypeCode.cs:4
static bool operator==(double left, double right)
Definition Double.cs:226
string ToString(string? format, IFormatProvider? provider)
Definition Double.cs:300
const double MinValue
Definition Double.cs:15
const double MaxValue
Definition Double.cs:17
static bool IsNegativeInfinity(double d)
Definition Double.cs:104
TypeCode GetTypeCode()
Definition Double.cs:391
static bool TryParse(ReadOnlySpan< char > s, NumberStyles style, NumberFormatInfo info, out double result)
Definition Double.cs:386
bool TryFormat(Span< char > destination, out int charsWritten, ReadOnlySpan< char > format=default(ReadOnlySpan< char >), IFormatProvider? provider=null)
Definition Double.cs:305
static double double Remainder INumber< double >. DivRem(double left, double right)
Definition Double.cs:1065
const double Epsilon
Definition Double.cs:19
static double Quotient
Definition Double.cs:1065
static bool TryParse(ReadOnlySpan< char > s, out double result)
Definition Double.cs:364
static double Parse(ReadOnlySpan< char > s, NumberStyles style=NumberStyles.Float|NumberStyles.AllowThousands, IFormatProvider? provider=null)
Definition Double.cs:348
override int GetHashCode()
Definition Double.cs:275
static bool TryParse(ReadOnlySpan< char > s, NumberStyles style, IFormatProvider? provider, out double result)
Definition Double.cs:380
static bool IsNormal(double d)
Definition Double.cs:110
override bool Equals([NotNullWhen(true)] object? obj)
Definition Double.cs:208
static bool operator>(double left, double right)
Definition Double.cs:244
static bool IsFinite(double d)
Definition Double.cs:74
static double Parse(string s)
Definition Double.cs:310
static bool operator<=(double left, double right)
Definition Double.cs:250
string ToString(string? format)
Definition Double.cs:290
static bool IsPositiveInfinity(double d)
Definition Double.cs:123
const double NaN
Definition Double.cs:25
static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out double result)
Definition Double.cs:369
static bool IsInfinity(double d)
Definition Double.cs:82
override string ToString()
Definition Double.cs:285
static bool IsSubnormal(double d)
Definition Double.cs:129
static bool operator!=(double left, double right)
Definition Double.cs:232
string ToString(IFormatProvider? provider)
Definition Double.cs:295
static bool IsNegative(double d)
Definition Double.cs:97
static bool IsNaN(double d)
Definition Double.cs:90
static double Parse(string s, IFormatProvider? provider)
Definition Double.cs:329
static int ExtractExponentFromBits(ulong bits)
Definition Double.cs:140
readonly double m_value
Definition Double.cs:13
static double Parse(string s, NumberStyles style)
Definition Double.cs:319
static bool TryParse([NotNullWhen(true)] string? s, out double result)
Definition Double.cs:354
static double IFloatingPoint< double >. E
Definition Double.cs:31
static ulong ExtractSignificandFromBits(ulong bits)
Definition Double.cs:145
int CompareTo(double value)
Definition Double.cs:183
int CompareTo(object? value)
Definition Double.cs:150
const double NegativeInfinity
Definition Double.cs:21
static double Parse(string s, NumberStyles style, IFormatProvider? provider)
Definition Double.cs:338
static bool operator<(double left, double right)
Definition Double.cs:238
const double PositiveInfinity
Definition Double.cs:23
static bool operator>=(double left, double right)
Definition Double.cs:256
bool Equals(double obj)
Definition Double.cs:261