Skip to content

Conversation

@WhiteBlackGoose
Copy link
Contributor

@WhiteBlackGoose WhiteBlackGoose commented Nov 10, 2021

Summary of the PR

Working on #666

Tasks

  • IsFinite
  • IsInfinity
  • IsNaN
  • IsNegative
  • IsNegativeInfinity
  • IsNormal
  • IsPositiveInfinity
  • Sign

Tests

  • IsFinite
  • IsInfinity
  • IsNaN
  • IsNegative
  • IsNegativeInfinity
  • IsNormal
  • IsPositiveInfinity
  • Sign

Benchmarks

State of number

  • IsFinite
  • IsInfinity
  • IsNaN
  • IsNegative
  • IsNegativeInfinity
  • IsNormal
  • IsPositiveInfinity
  • Sign

Other

  • Bitwise arithmetics
  • Abs

Comment on lines -363 to +365
if (typeof(T) == typeof(int))
if (typeof(T) == typeof(sbyte))
{
return (int) (object) f < 0;
return (sbyte) (object) f < 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bug from scalar

Copy link
Contributor Author

@WhiteBlackGoose WhiteBlackGoose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There turns out a few bugs in scalar 🦆

{
if (typeof(T) == typeof(float))
{
return IsNormal((float) (object) f);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bug from scalar

{
if (typeof(T) == typeof(double))
{
return IsNormal((double) (object) f);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and another bug from scalar

@WhiteBlackGoose WhiteBlackGoose marked this pull request as ready for review November 10, 2021 16:22
@HurricanKai HurricanKai self-requested a review November 10, 2021 16:29
@WhiteBlackGoose
Copy link
Contributor Author

Benchmark reports

Silk.NET.Maths.Benchmark.SimdBenchmarks-asm.md
Silk.NET.Maths.Benchmark.SimdBenchmarks-report-github.md

Some methods are not inlined. Investigating...

@HurricanKai HurricanKai merged commit 4d1070a into dotnet:feature/math-simd Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants