From the 1928 OED:
2. One learned in the Greek language; a Greek scholar. [Attestations omitted]
b. A boy in the highest class of Christ's Hospital (the Blue-coat school).
- Formerly the dress of servants and the lower orders; hence of almoners and charity children. [Attestations omitted]
- (More fully, Blue-coat boy): A scholar of a charity school wearing the almoners blue coat. Of these there are many in England; the most noted being Christ's Hospital in London, whose uniform is a long dark blue gown fastened at the waist with a belt, and bright yellow stockings.
So Hornblower has completed his grammar school education as a charity scholarship student. He seems to be dissembling slightly on his charity status, without making an outright deception.
An 18th (and even 19th) Century liberal arts education revolved around the seven traditional liberal arts, composed of:
-- Grammar (both Latin and Greek; reading, writing, and speaking);
-- Arithmetic (in the Euclidean sense - so Number Theory);
The Trivium was taught in a grammar school and was typically required as prerequisite to university admittance. Completion of the Grammar requirement (at this time) meant the capability of not only reading and writing Latin and Greek, but also of conversing in both to a moderate fluency.
The sines and cosines might have been introduced earlier at a trade school; but would not have been seen formally by Hornblower until reaching university and studying the Geometry and Arithmetic (ie Number Theory) of Euclid's Elements, as well as their practical application in Astronomy (probably physics by this period).
It's not canon unless it's in the books.
You think an education at Eton, or even a lesser English public school, is comparable in cost to purchasing a midshipman's commission in His Majesty's Royal Navy in 1793? Seriously? I doubt the cost of a midshipman's commission would have purchased even a single term at any public school half as notable as Christ's Hospital. Further, charity also includes scholarship and bursary students.
If that Christ's Hospital uniform reminds you also of Harry Potter - I doubt that's just coincidence. Recall tha all wizard children in the United Kingdom were entitled to an education at Hogwart's - regardless of family financial means.