9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9fans@9fans.net
Subject: Re: [9fans] kenc vlong <asop> double
Date: Sun, 13 Sep 2015 16:23:36 +0200	[thread overview]
Message-ID: <23b1f2e6bdd7d080c9c1ce27478716d0@felloff.net> (raw)
In-Reply-To: <9f4dd8c69f9f67abcba0a3bfc69bfcf9@brasstown.quanstro.net>

the problem is v += d propagates the whole expression
to double. so we somehow need to convert v to double,
do the <asop> then convert back but return the double
result.

i tried (unsuccessfully) to come up with something like
this below in com64, but i dont know what i'm doing and
someone who knows kenc better can probably solve this by
deleting some code instead of adding more:

OCOMMA(
	OAS(ONAME(t, TDOUBLE), OFUNC(_v2d, ONAME(v, TVLONG))),
	OASADD(t, d),
	OCOMMA(
		OAS(ONAME(v, TVLONG), OFUNC(_d2v, ONAME(t, TDOUBLE))),
		NAME(t, TDOUBLE)))

the good news is that double and float are the only cases
where this can happen i think. and its rather silly code,
so maybe it should just give up and throw a error message.

lets see what charles thinks about this.

--
cinap



  reply	other threads:[~2015-09-13 14:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-13  8:09 cinap_lenrek
2015-09-13 13:45 ` erik quanstrom
2015-09-13 14:23   ` cinap_lenrek [this message]
2015-09-13 15:54     ` Charles Forsyth
2015-09-13 17:10     ` Charles Forsyth
2015-09-13 18:01       ` cinap_lenrek
2015-09-13 18:21         ` erik quanstrom
2015-09-13 18:31           ` Charles Forsyth
2015-09-13 18:28             ` erik quanstrom
2015-09-13 18:33         ` Charles Forsyth
2015-09-13 18:46           ` cinap_lenrek
2015-09-13 18:55             ` Charles Forsyth
2015-09-14 12:32               ` Charles Forsyth
2015-09-14 12:59                 ` cinap_lenrek
2015-09-14 13:18                   ` Charles Forsyth
2015-09-14 13:59                     ` Charles Forsyth
2015-09-14 14:50                       ` cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23b1f2e6bdd7d080c9c1ce27478716d0@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).