<feed xmlns='http://www.w3.org/2005/Atom'>
<title>7Units/src/main/java/sevenUnits/utils, branch v1.0.0b2</title>
<subtitle>A unit converter made in Java, inspired by GNU Units
</subtitle>
<id>https://git.ahopkins.ca/7units.git/atom?h=v1.0.0b2</id>
<link rel='self' href='https://git.ahopkins.ca/7units.git/atom?h=v1.0.0b2'/>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/'/>
<updated>2025-05-31T01:30:44Z</updated>
<entry>
<title>Ensure LinearUnit&amp;Prefix ==/hash obey contracts</title>
<updated>2025-05-31T01:30:44Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-31T01:10:09Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=7db19d307970b73559239ec343c92c7876510c2a'/>
<id>urn:sha1:7db19d307970b73559239ec343c92c7876510c2a</id>
<content type='text'>
Previously, these classes' equals() and hashCode() methods did not obey
the contracts:

For equals(), I considered two values equal even if there was a very
small deviation, in order to avoid floating-point error.  This equals
relation is not transitive (i.e. it is possible that a = b &amp;&amp; b = c but
a ≠ c), violating the contract of equals.

This also makes it impossible to properly implement hashCode, as if two
values are equal, they must have the same hash code.  The solution I had
provided is an ineffective hack, which could mess with hash maps and
sets.

I have changed the implementation to demand exact equality.  I have also
provided equalsApproximately() methods to both classes that use the old
behaviour.  Hash codes are only really used for hash maps, and the old
implementation doesn't even achieve its purpose, so I did not add a
method to return the old hash behaviour.
</content>
</entry>
<entry>
<title>Throw error on expressions with too many operators</title>
<updated>2025-05-31T00:54:18Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-21T23:42:16Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=8df414ced2018e685f034424c3d8c7813d18805c'/>
<id>urn:sha1:8df414ced2018e685f034424c3d8c7813d18805c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ExpressionParser: use correct operand order</title>
<updated>2025-05-31T00:54:17Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-21T23:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=4cb7e4eb4a9213304ee5b83c9aaa0427e9a8fe31'/>
<id>urn:sha1:4cb7e4eb4a9213304ee5b83c9aaa0427e9a8fe31</id>
<content type='text'>
Most of the internal problems with the expression parser happened
because I was accepting the arguments for binary operators in the wrong
order.  For example, '2 - 1' became '1 2 -', not '2 1 -'.

The likely cause of this error is the following sequence of events:
- In commit 6dbd32cd, I created the code for interpreting RPN.  I
  accepted two arguments from the stack (o1 and o2), then performed o1
  &lt;op&gt; o2.  However, because stacks are in LIFO order, I should have
  actually done o2 &lt;op&gt; o1.
- Later, in commit 94349688, I created the code for converting an infix
  expression to RPN.  Creating the expressions in the correct order did
  not work, because my interpreter used the incorrect order.  To 'fix'
  this problem, I created the expressions in the incorrect order.  I did
  not notice any discrepancy, probably because I was not testing the
  individual methods, only the two-step whole (which found no errors).
</content>
</entry>
<entry>
<title>Setup automated javadoc</title>
<updated>2025-05-18T04:03:29Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-18T04:03:29Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=fc5045c4da18b6fd811c6748aa7b5184a80f6769'/>
<id>urn:sha1:fc5045c4da18b6fd811c6748aa7b5184a80f6769</id>
<content type='text'>
./gradlew javadoc
</content>
</entry>
<entry>
<title>Add tests for NameSymbol</title>
<updated>2025-03-21T20:26:01Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-03-21T20:26:01Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=99ef729b27377b440b15757b789101c7ed87aec1'/>
<id>urn:sha1:99ef729b27377b440b15757b789101c7ed87aec1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow fractional exponents</title>
<updated>2024-08-22T16:45:37Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2024-08-22T15:12:37Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=6f1bbc1024eae98f1815ab5f9e9cb3399f5eef9c'/>
<id>urn:sha1:6f1bbc1024eae98f1815ab5f9e9cb3399f5eef9c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Correct encoding of ±</title>
<updated>2024-08-15T22:26:34Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2024-08-15T21:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=fbb2f4a997e7e7043a2bdf15303b88907f6bcbc6'/>
<id>urn:sha1:fbb2f4a997e7e7043a2bdf15303b88907f6bcbc6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Format source code &amp; set explicit UTF-8</title>
<updated>2024-03-24T18:14:11Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2024-03-24T18:14:11Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=26291e672b0e683edc9d57710a9a9d96ca199c45'/>
<id>urn:sha1:26291e672b0e683edc9d57710a9a9d96ca199c45</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Complete exponentiation of dimensions</title>
<updated>2024-03-23T20:29:12Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2024-03-23T20:25:42Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=4db89a7e775921f4bb29db9f9b6bd939f115b631'/>
<id>urn:sha1:4db89a7e775921f4bb29db9f9b6bd939f115b631</id>
<content type='text'>
Previously, you could only exponentiate individual dimensions in
expressions.  For example, `Length^3` was valid, but `(Length / Time)^2`
was not.  This is now fixed.
</content>
</entry>
<entry>
<title>Bumped version number to 0.4.0b1 &amp; added @since</title>
<updated>2022-07-08T17:46:45Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>ahopk127@my.yorku.ca</email>
</author>
<published>2022-07-08T17:46:45Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=39668f4b274f0e7996f65b4f432a48ae0d88daca'/>
<id>urn:sha1:39668f4b274f0e7996f65b4f432a48ae0d88daca</id>
<content type='text'>
</content>
</entry>
</feed>
