I read this in the period between 2005 and the early 2010s.
Title and Author: I cannot remember this information.
Media: Online, stand-alone short story (or the first story in a series). Perhaps LiveJournal or other common original fiction archive. At the time of reading, it had not been published commercially and was incomplete.
Genre: Fantasy, gay romance.
Intended audience: Adults / Mature Audience
Characters: The protagonist is from "our" (modern) universe. He studied mathematics and may be an accountant. He is dissatisfied with his life and job in this world. He may be of East Asian or Japanese descent but I am uncertain of this detail. His weapon of choice may be the bow.
The love interest / secondary protagonist is from the alternate universe. He is either a military leader / a fighter of some repute. He is well-known to the king of the alternate universe.
Major themes / Plot / Setting:
When thinking about theoretical mathematics / physics while driving, the protagonist unintentionally travels to an alternate universe.
He returns to "our" (modern) universe at least once, but intentionally travels again to the alternate universe using the same method.
The alternate universe appears to be inspired by the historical fantasy settings (medieval?). When the protagonist first encounters people in the alternate universe, they are travelling - they make camp, have bedrolls, have swords / bows. One of the people he encounters is the love interest.
In the alternate universe, the protagonist's ability to use / understanding of mathematics is akin to magic.
The love interest is incredibly skeptical of the protagonist's abilities (physical self-defence and magical) and is initially very reluctant to allow the protagonist to travel with him.
They travel to a capital city, where they meet the king.
One very specific scene I can remember is when the protagonist and the king discuss remuneration. The king admits that he does not know the cost of things in a market, but knows the cost of a meal (a bowl of rice? Wheat?), the cost of a day's wages of a labourer, and how much tax is worth relative to the wages / cost of a meal. He knows this because such information is important for the purposes of good governance.