wc-duck / datalibrary

Open Source Data Library for data serialization.
Other
42 stars 8 forks source link

Support type limits for defaults #78

Closed lundmark closed 5 years ago

lundmark commented 6 years ago

I'd like to see the possibility to have for example: { "name" : "blah", "type" : "fp32", "default" : "-FLT_MAX" } functionality exposed so that we can set default values to min/max/epsilon etc for types.

wc-duck commented 6 years ago

I guess that could be done... We just need a better syntax than a string. Maybe just support min max in the same way as inf/nan ?

lundmark commented 6 years ago

That sounds like a great idea. min / max / epsilon ? also -max, -min, -epsilon.

On Thu, May 17, 2018 at 2:35 PM, Fredrik Kihlander <notifications@github.com

wrote:

I guess that could be done... We just need a better syntax than a string. Maybe just support min max in the same way as inf/nan ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wc-duck/datalibrary/issues/78#issuecomment-389850819, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXOMotf7GR7YnHXCvqBm4XwSlKqiO2Nks5tzW57gaJpZM4UC9ci .

wc-duck commented 5 years ago

Is this something you would still benefit from?

lundmark commented 5 years ago

Yes this is definitely something that would be good not only for defaults but also for values. I like the idea of max/min/epsilon since then it's possible to set that depending on the actual type.

On Mon, Oct 15, 2018 at 1:39 PM Fredrik Kihlander notifications@github.com wrote:

Is this something you would still benefit from?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wc-duck/datalibrary/issues/78#issuecomment-429817988, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXOMtmoGcKuh3eiuXmfxVPxnwQvdHvTks5ulHQDgaJpZM4UC9ci .

wc-duck commented 5 years ago

Should be fixed now, I however skipped 'epsilon' for float types, if you really need that feel free to add a new ticket!