@@ -283,6 +283,99 @@ namespace System {
283283 * (`Half.cs:1879`). */
284284 [[nodiscard]] static Half MinMagnitude (Half x, Half y) noexcept ;
285285
286+ // -----------------------------------------------------------------------------------
287+ // #2384 unit 2b: the transcendental, root, power and angular families.
288+ //
289+ // EVERY ONE IS A FLOAT ROUND-TRIP, and that is .NET's own shape rather than a
290+ // simplification -- `(Half)MathF.Sqrt((float)x)` and friends, verified member by member
291+ // against Half.cs. So unlike units 1 and 2a, there is no bit-level body here to get wrong.
292+ //
293+ // TEN MEMBERS .NET DECLARES ARE ABSENT, AND THAT IS MEASURED RATHER THAN OVERLOOKED:
294+ // Compound, ExpM1, Exp2M1, Exp10M1, LogP1, Log2P1, Log10P1, Lerp, MultiplyAddEstimate and
295+ // ClampNative have NO counterpart in this port's System::MathF OR System::Single, so
296+ // adding them here would mean widening `float`'s surface first -- a different type's
297+ // public API and a different ticket's scope. See the migration note.
298+ // -----------------------------------------------------------------------------------
299+
300+ /* * @brief C++ counterpart of .NET `Half.Acos` -- `(Half)MathF.Acos((float)...)`. */
301+ [[nodiscard]] static Half Acos (Half x) noexcept { return FromSingle (System::MathF::Acos (x.ToSingle ())); }
302+ /* * @brief C++ counterpart of .NET `Half.Acosh` -- `(Half)MathF.Acosh((float)...)`. */
303+ [[nodiscard]] static Half Acosh (Half x) noexcept { return FromSingle (System::MathF::Acosh (x.ToSingle ())); }
304+ /* * @brief C++ counterpart of .NET `Half.Asin` -- `(Half)MathF.Asin((float)...)`. */
305+ [[nodiscard]] static Half Asin (Half x) noexcept { return FromSingle (System::MathF::Asin (x.ToSingle ())); }
306+ /* * @brief C++ counterpart of .NET `Half.Asinh` -- `(Half)MathF.Asinh((float)...)`. */
307+ [[nodiscard]] static Half Asinh (Half x) noexcept { return FromSingle (System::MathF::Asinh (x.ToSingle ())); }
308+ /* * @brief C++ counterpart of .NET `Half.Atan` -- `(Half)MathF.Atan((float)...)`. */
309+ [[nodiscard]] static Half Atan (Half x) noexcept { return FromSingle (System::MathF::Atan (x.ToSingle ())); }
310+ /* * @brief C++ counterpart of .NET `Half.Atanh` -- `(Half)MathF.Atanh((float)...)`. */
311+ [[nodiscard]] static Half Atanh (Half x) noexcept { return FromSingle (System::MathF::Atanh (x.ToSingle ())); }
312+ /* * @brief C++ counterpart of .NET `Half.Atan2` -- `(Half)MathF.Atan2((float)...)`. */
313+ [[nodiscard]] static Half Atan2 (Half y, Half x) noexcept { return FromSingle (System::MathF::Atan2 (y.ToSingle (), x.ToSingle ())); }
314+ /* * @brief C++ counterpart of .NET `Half.Cbrt` -- `(Half)MathF.Cbrt((float)...)`. */
315+ [[nodiscard]] static Half Cbrt (Half x) noexcept { return FromSingle (System::MathF::Cbrt (x.ToSingle ())); }
316+ /* * @brief C++ counterpart of .NET `Half.Cos` -- `(Half)MathF.Cos((float)...)`. */
317+ [[nodiscard]] static Half Cos (Half x) noexcept { return FromSingle (System::MathF::Cos (x.ToSingle ())); }
318+ /* * @brief C++ counterpart of .NET `Half.Cosh` -- `(Half)MathF.Cosh((float)...)`. */
319+ [[nodiscard]] static Half Cosh (Half x) noexcept { return FromSingle (System::MathF::Cosh (x.ToSingle ())); }
320+ /* * @brief C++ counterpart of .NET `Half.Exp` -- `(Half)MathF.Exp((float)...)`. */
321+ [[nodiscard]] static Half Exp (Half x) noexcept { return FromSingle (System::MathF::Exp (x.ToSingle ())); }
322+ /* * @brief C++ counterpart of .NET `Half.Log` -- `(Half)MathF.Log((float)...)`. */
323+ [[nodiscard]] static Half Log (Half x) noexcept { return FromSingle (System::MathF::Log (x.ToSingle ())); }
324+ /* * @brief C++ counterpart of .NET `Half.Log10` -- `(Half)MathF.Log10((float)...)`. */
325+ [[nodiscard]] static Half Log10 (Half x) noexcept { return FromSingle (System::MathF::Log10 (x.ToSingle ())); }
326+ /* * @brief C++ counterpart of .NET `Half.Log2` -- `(Half)MathF.Log2((float)...)`. */
327+ [[nodiscard]] static Half Log2 (Half x) noexcept { return FromSingle (System::MathF::Log2 (x.ToSingle ())); }
328+ /* * @brief C++ counterpart of .NET `Half.Pow` -- `(Half)MathF.Pow((float)...)`. */
329+ [[nodiscard]] static Half Pow (Half x, Half y) noexcept { return FromSingle (System::MathF::Pow (x.ToSingle (), y.ToSingle ())); }
330+ /* * @brief C++ counterpart of .NET `Half.Sin` -- `(Half)MathF.Sin((float)...)`. */
331+ [[nodiscard]] static Half Sin (Half x) noexcept { return FromSingle (System::MathF::Sin (x.ToSingle ())); }
332+ /* * @brief C++ counterpart of .NET `Half.Sinh` -- `(Half)MathF.Sinh((float)...)`. */
333+ [[nodiscard]] static Half Sinh (Half x) noexcept { return FromSingle (System::MathF::Sinh (x.ToSingle ())); }
334+ /* * @brief C++ counterpart of .NET `Half.Sqrt` -- `(Half)MathF.Sqrt((float)...)`. */
335+ [[nodiscard]] static Half Sqrt (Half x) noexcept { return FromSingle (System::MathF::Sqrt (x.ToSingle ())); }
336+ /* * @brief C++ counterpart of .NET `Half.Tan` -- `(Half)MathF.Tan((float)...)`. */
337+ [[nodiscard]] static Half Tan (Half x) noexcept { return FromSingle (System::MathF::Tan (x.ToSingle ())); }
338+ /* * @brief C++ counterpart of .NET `Half.Tanh` -- `(Half)MathF.Tanh((float)...)`. */
339+ [[nodiscard]] static Half Tanh (Half x) noexcept { return FromSingle (System::MathF::Tanh (x.ToSingle ())); }
340+ /* * @brief C++ counterpart of .NET `Half.ScaleB` -- `(Half)MathF.ScaleB((float)...)`. */
341+ [[nodiscard]] static Half ScaleB (Half x, SharpRuntime::intcs n) noexcept { return FromSingle (System::MathF::ScaleB (x.ToSingle (), n)); }
342+ /* * @brief C++ counterpart of .NET `Half.FusedMultiplyAdd` -- `(Half)MathF.FusedMultiplyAdd((float)...)`. */
343+ [[nodiscard]] static Half FusedMultiplyAdd (Half left, Half right, Half addend) noexcept { return FromSingle (System::MathF::FusedMultiplyAdd (left.ToSingle (), right.ToSingle (), addend.ToSingle ())); }
344+ /* * @brief C++ counterpart of .NET `Half.ReciprocalEstimate` -- `(Half)MathF.ReciprocalEstimate((float)...)`. */
345+ [[nodiscard]] static Half ReciprocalEstimate (Half x) noexcept { return FromSingle (System::MathF::ReciprocalEstimate (x.ToSingle ())); }
346+ /* * @brief C++ counterpart of .NET `Half.ReciprocalSqrtEstimate` -- `(Half)MathF.ReciprocalSqrtEstimate((float)...)`. */
347+ [[nodiscard]] static Half ReciprocalSqrtEstimate (Half x) noexcept { return FromSingle (System::MathF::ReciprocalSqrtEstimate (x.ToSingle ())); }
348+ /* * @brief C++ counterpart of .NET `Half.Ieee754Remainder` -- `(Half)MathF.IEEERemainder((float)...)`. */
349+ [[nodiscard]] static Half Ieee754Remainder (Half left, Half right) noexcept { return FromSingle (System::MathF::IEEERemainder (left.ToSingle (), right.ToSingle ())); }
350+ /* * @brief C++ counterpart of .NET `Half.Log` -- `(Half)MathF.Log((float)...)`. */
351+ [[nodiscard]] static Half Log (Half x, Half newBase) noexcept { return FromSingle (System::MathF::Log (x.ToSingle (), newBase.ToSingle ())); }
352+ /* * @brief C++ counterpart of .NET `Half.AcosPi` -- `(Half)Single.AcosPi((float)...)`. */
353+ [[nodiscard]] static Half AcosPi (Half x) noexcept { return FromSingle (System::Single::AcosPi (x.ToSingle ())); }
354+ /* * @brief C++ counterpart of .NET `Half.AsinPi` -- `(Half)Single.AsinPi((float)...)`. */
355+ [[nodiscard]] static Half AsinPi (Half x) noexcept { return FromSingle (System::Single::AsinPi (x.ToSingle ())); }
356+ /* * @brief C++ counterpart of .NET `Half.AtanPi` -- `(Half)Single.AtanPi((float)...)`. */
357+ [[nodiscard]] static Half AtanPi (Half x) noexcept { return FromSingle (System::Single::AtanPi (x.ToSingle ())); }
358+ /* * @brief C++ counterpart of .NET `Half.Atan2Pi` -- `(Half)Single.Atan2Pi((float)...)`. */
359+ [[nodiscard]] static Half Atan2Pi (Half y, Half x) noexcept { return FromSingle (System::Single::Atan2Pi (y.ToSingle (), x.ToSingle ())); }
360+ /* * @brief C++ counterpart of .NET `Half.CosPi` -- `(Half)Single.CosPi((float)...)`. */
361+ [[nodiscard]] static Half CosPi (Half x) noexcept { return FromSingle (System::Single::CosPi (x.ToSingle ())); }
362+ /* * @brief C++ counterpart of .NET `Half.SinPi` -- `(Half)Single.SinPi((float)...)`. */
363+ [[nodiscard]] static Half SinPi (Half x) noexcept { return FromSingle (System::Single::SinPi (x.ToSingle ())); }
364+ /* * @brief C++ counterpart of .NET `Half.TanPi` -- `(Half)Single.TanPi((float)...)`. */
365+ [[nodiscard]] static Half TanPi (Half x) noexcept { return FromSingle (System::Single::TanPi (x.ToSingle ())); }
366+ /* * @brief C++ counterpart of .NET `Half.DegreesToRadians` -- `(Half)Single.DegreesToRadians((float)...)`. */
367+ [[nodiscard]] static Half DegreesToRadians (Half degrees) noexcept { return FromSingle (System::Single::DegreesToRadians (degrees.ToSingle ())); }
368+ /* * @brief C++ counterpart of .NET `Half.RadiansToDegrees` -- `(Half)Single.RadiansToDegrees((float)...)`. */
369+ [[nodiscard]] static Half RadiansToDegrees (Half radians) noexcept { return FromSingle (System::Single::RadiansToDegrees (radians.ToSingle ())); }
370+ /* * @brief C++ counterpart of .NET `Half.Exp10` -- `(Half)Single.Exp10((float)...)`. */
371+ [[nodiscard]] static Half Exp10 (Half x) noexcept { return FromSingle (System::Single::Exp10 (x.ToSingle ())); }
372+ /* * @brief C++ counterpart of .NET `Half.Exp2` -- `(Half)Single.Exp2((float)...)`. */
373+ [[nodiscard]] static Half Exp2 (Half x) noexcept { return FromSingle (System::Single::Exp2 (x.ToSingle ())); }
374+ /* * @brief C++ counterpart of .NET `Half.Hypot` -- `(Half)Single.Hypot((float)...)`. */
375+ [[nodiscard]] static Half Hypot (Half x, Half y) noexcept { return FromSingle (System::Single::Hypot (x.ToSingle (), y.ToSingle ())); }
376+ /* * @brief C++ counterpart of .NET `Half.RootN` -- `(Half)Single.RootN((float)...)`. */
377+ [[nodiscard]] static Half RootN (Half x, SharpRuntime::intcs n) noexcept { return FromSingle (System::Single::RootN (x.ToSingle (), n)); }
378+
286379 // -----------------------------------------------------------------------------------
287380 // #2384 unit 2a: rounding, Sign, and the IEEE 754:2019 *Number family.
288381 //
0 commit comments