Skip to content

changed expressions in term of algebraic operations with corresponding numeric results #323

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

Merged
merged 5 commits into from
Nov 23, 2017
Merged

changed expressions in term of algebraic operations with corresponding numeric results #323

merged 5 commits into from
Nov 23, 2017

Conversation

gratestas
Copy link
Contributor

as it is on demand, conversion values of a property in UnitDefinition/*.json files and those in CustomCode/*.cs files must be expressed differently in order to lead tests to reasonable execution. in case of specific energy, I noticed that there is no such consistency. on both side conversion factors from/to base unit are expressed identically. For instance,

in UnitDefinition : "FromBaseToUnitFunc": "x/4.184e3"
in CustomCode : "CaloriesPerGramInOneJoulePerKilogram": "x/4.184e3",

@0xferit 0xferit requested a review from angularsen November 17, 2017 13:10
@@ -27,9 +27,9 @@ public class SpecificEnergyTests : SpecificEnergyTestsBase
{
protected override double JoulesPerKilogramInOneJoulePerKilogram => 1.0;

protected override double CaloriesPerGramInOneJoulePerKilogram => 1.0/4.184E3;
protected override double CaloriesPerGramInOneJoulePerKilogram => 2.410800386e-4;
Copy link
Owner

@angularsen angularsen Nov 19, 2017

Choose a reason for hiding this comment

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

Computing this value gives me: 0.00023900573
Was the function not correct to begin with or is this IT vs th calories?
In retrospect, we maybe should have named the units CaloriesIt and CaloiresTh to disambiguate them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like he divided with 4148 instead of 4184. I'm fixing this now.

And perhaps we should either say in README that we don't support IT's but only TH's, or we should name them as you said.


protected override double KilocaloriesPerGramInOneJoulePerKilogram => 1.0/4.184E6;
protected override double KilocaloriesPerGramInOneJoulePerKilogram => 2.410800386e-7;
Copy link
Owner

Choose a reason for hiding this comment

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

Same here.

Ferit Tunçer added 4 commits November 20, 2017 16:37
watt, kilowatt and megawatt tests should have the same number of significant figures
ordered tests according to types and exponents
@0xferit
Copy link
Contributor

0xferit commented Nov 20, 2017

Please take a look @angularsen , I think it's okay now.

@0xferit 0xferit merged commit 6db998c into angularsen:master Nov 23, 2017
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.

3 participants