Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate duplicate configuration #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kant2002
Copy link

Configuration applied both to Debug and Release, so I merge this settings.
Obviously unrelated to bug, but cannot resist and not cleanup

Configuration applied both to Debug and Release, so I merge this settings.
Obviously unrelated to bug, but cannot resist and not cleanup
@c-ohle
Copy link
Owner

c-ohle commented Jul 31, 2022

Hello, no problem, would you like to work together?

@kant2002
Copy link
Author

I already figure out the issue with drag drop. FYI: Also on RC1 you have to implement bunch of methods and properties and Pi property can be a problem for example

@c-ohle
Copy link
Owner

c-ohle commented Jul 31, 2022

Please, whats the problem with Pi? And witch (group of) functions are missing?

public static BigRational Pi(int digits)

@kant2002
Copy link
Author

@c-ohle
Copy link
Owner

c-ohle commented Jul 31, 2022

Thanks, I see, so far I don't support IFoatingPoint. It wouldn't be no problem to implement something, but does it make sense for such a number type? There is no constant for this, not even a cache (but it is planned). Within calculations, even low-level, cpu.sin, cpu.tan, when pi is requested, it is calculated in real-time in the currently desired precision.

But these are the design questions I really need help with.
It would be easy and quick to change everything.

@kant2002
Copy link
Author

You cannot not implement it, or you have to implement, but make it throw NotImplementedException, that interface is part of INumber<T> so with latest preview or nightly RC1 you will hit compilation error

@c-ohle
Copy link
Owner

c-ohle commented Jul 31, 2022

I use this as reference:
https://source.dot.net/#System.Private.CoreLib/INumber.cs,0f558758e750a740
and
https://source.dot.net/#System.Private.CoreLib/IFloatingPointConstants.cs,9ff158e2a0a8fb1f

There in INumber and INumberBase IFloatingPointConstants is not included.
Is there a better link for pre-versions or something?

@kant2002
Copy link
Author

I'm not sure from which version of .NET source.dot.net gets source code, but I give you source code for latest bits from main branch. That's where dev works. And that's for sure would be either in Preview 7, or in RC1. If you install RC1 from here https://github.com/dotnet/installer you will see the issue yourself. Just be prepared before release to update things.

@kant2002
Copy link
Author

Please take a look at approximate changes which would be required #7

@c-ohle
Copy link
Owner

c-ohle commented Jul 31, 2022

Many thanks for the hints - I need time to check.
And sorry for the CreatePixelShader bug - but would be interesting to know what graphics hardware it is, usually there is a fallback to the reference renderer.

@c-ohle
Copy link
Owner

c-ohle commented Jul 31, 2022

I have it, they put IFloatingPointConstants in IRootFunctions, ITrigonometricFunctions.
What nonsense. Anyway, will update that it works and check in.
Will think later how to create a halfway logically interface on this - this time probably with a glass of vodka.

Thanks for hardware...
Maybe the mentioned further drag-drop bugs fixed - will check and let you know.

@kant2002
Copy link
Author

My idea was rename Pi to AproximatePi, that way methods still make sense. Just an idea

@c-ohle
Copy link
Owner

c-ohle commented Jul 31, 2022

This works too:

static BigRational IFloatingPointConstants<BigRational>.Pi => Pi(1000) // :-)

@c-ohle
Copy link
Owner

c-ohle commented Jul 31, 2022

Thanks again, that was all very helpful. Latest NET7 version checked in, no more conflicts.
Maybe the DX11 problem is solved too.

From this morning, have you seen the last notes?
These problems are definitely still in. Probably relating to issue 6976 but must somewhere else in the source and this since longer.
Before I start a new issue, it will probably go faster if you continue this.

Please not wondering if BigInteger sometimes crashes.
I found some old bugs are fixed. Also BigInteger bugs I reported. But there is a new issue with BigInteger and maybe mutch deeper in the system. In the tests and benchmarks, after massive calculations BigInteger calculates wrong numbers, sometimes exceptions, but it's not determined, does not depend on the numbers.
Maybe they forgot a span.Clear() but two times I got exception from ArrayPool.Shared.Rent (was in threads and difficult to debug).
Did not report this before I can reproduce.

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.

None yet

2 participants