i accompanied the whale-fishers on several expeditions to the north sea ; i voluntarily endured cold , famine , thirst , and want of sleep ; i often worked harder than the common sailors during the day , and devoted my nights to the study of mathematics , the theory of medicine , and those branches of physical science from which a naval adventurer might derive the greatest practical advantage .