Re: [R] tried half-precision but size 2 is unknown on this machine

2015-01-04 Thread Uwe Ligges
Following the posting guide and hence reading the help page first helps: Possible sizes are 1, 2, 4 and possibly 8 for integer or logical vectors, and 4, 8 and possibly 12/16 for numeric vectors. Best, Uwe Ligges On 04.01.2015 08:03, Mike Miller wrote: Thanks for the pedantic insult, but

Re: [R] tried half-precision but size 2 is unknown on this machine

2015-01-04 Thread Duncan Murdoch
On 04/01/2015 12:31 AM, Mike Miller wrote: It's an IEEE standard format: http://en.wikipedia.org/wiki/Half-precision_floating-point_format#IEEE_754_half-precision_binary_floating-point_format:_binary16 This is what I see: writeBin(vec , con, size=2 ) Error in writeBin(vec, con, size =

Re: [R] tried half-precision but size 2 is unknown on this machine

2015-01-04 Thread Jeff Newmiller
Sorry about the dead lead on the package... it is hexView. It does not support FP16 directly though... You would have to find another way to make that conversion. Some people have posted code that may be usable with Rcpp [1]. I believe your architecture may support hardware conversion of FP32

Re: [R] tried half-precision but size 2 is unknown on this machine

2015-01-04 Thread Prof Brian Ripley
On 04/01/2015 12:12, Duncan Murdoch wrote: On 04/01/2015 12:31 AM, Mike Miller wrote: It's an IEEE standard format: http://en.wikipedia.org/wiki/Half-precision_floating-point_format#IEEE_754_half-precision_binary_floating-point_format:_binary16 This is what I see: writeBin(vec , con, size=2

Re: [R] tried half-precision but size 2 is unknown on this machine

2015-01-04 Thread Mike Miller
Thanks! So it looks like I can say R writeBin/readBin does not support half-precision floats even though the error message size 2 is unknown on this machine seems to contradict that (for some machine). I tried to figure out from the source code (src/main/connections.c) how it decides what is

[R] tried half-precision but size 2 is unknown on this machine

2015-01-03 Thread Mike Miller
It's an IEEE standard format: http://en.wikipedia.org/wiki/Half-precision_floating-point_format#IEEE_754_half-precision_binary_floating-point_format:_binary16 This is what I see: writeBin(vec , con, size=2 ) Error in writeBin(vec, con, size = 2) : size 2 is unknown on this machine I'm not

Re: [R] tried half-precision but size 2 is unknown on this machine

2015-01-03 Thread Jeff Newmiller
Your message is missing either a reproducible example or an indication of your R environment (such as the output of sessionInfo()). Yes, the machine architecture can prevent certain types of operations. This is however a poor venue for discussing such issues. I suggest that you investigate the

Re: [R] tried half-precision but size 2 is unknown on this machine

2015-01-03 Thread Mike Miller
Thanks for the pedantic insult, but no thanks. I'd rather just hear if anyone reading this is able to make something like this work on any architecture: vec - 1:10/10 con - file( test.bin16, wb ) writeBin( vec , con, size=2 ) close(con) If they can do it, they can tell me about it. That