Re: SVG12: conversion to float vs NaN

* Nandini Ramani wrote:
>    Thank you for your comments regarding conversion to float vs NaN [1].
>
>As per the IEEE definition, NaN is returned as a result of an arithmetic
>operation,
>like 0/0. It is not appropriate to use it for conversions. So, in the
>case of getFloatTrait, we have a consistent approach to throw an
>exception when it is called for a trait that cannot be converted to a
>float type.

Okay, I shall rephrase my issue then: the current draft does not seem to
specify when a trait value can be converted to a "float" and does seem
to specify an algorithm to be used for this conversion. A naïve viewer
implementation might keep such values internally as strings and use some
string to number conversion facilities provided by the platform to make
such a conversion and might fail to check for errors; a possible result
of this are viewers that return special values like NaN to unexpecting
DOM applications; the draft should work against naïve implementations by
clearly defining this.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Tuesday, 27 December 2005 22:01:35 UTC