-- simple conversion between Kelvin, Celsius, and Fahrenheit -- from http://en.wikipedia.org/wiki/Temperature_conversion |context> => |context: temperature> + |context: temperature conversion> -- NB: simple arithmetic is allowed in .sw, no need to label this a .swc -- The full rules about what is allowed in .sw vs .swc is not yet fleshed out. to-Kelvin |temperature: Kelvin: _x > => |temperature: Kelvin: _x > to-Celsius |temperature: Kelvin: _x > => |temperature: Celsius: (_x - 273.15) > to-Fahrenheit |temperature: Kelvin: _x> => |temperature: Fahrenheit: (_x*9/5 - 459.67) > to-Kelvin |temperature: Celsius: _x > => |temperature: Kelvin: (_x + 273.15) > to-Celsius |temperature: Celsius: _x> => |temperature: Celsius: _x > to-Fahrenheit |temperature: Celsius: _x> => |temperature: Fahrenheit: (_x*9/5 + 32) > to-Kelvin |temperature: Fahrenheit: _x > => |temperature: Kelvin: (_x + 459.67)*5/9 > to-Celsius |temperature: Fahrenheit: _x > => |temperature: Celsius: (_x - 32)*5/9 > to-Fahrenheit |temperature: Fahrenheit: _x > => |temperature: Fahrenheit: _x > -- where to get more information: more-info |context: temperature> => |url: http://en.wikipedia.org/wiki/Temperature_conversion> + |sw-url: http://semantic-db.org/temperature.sw>